Cross-file referencing in javascript extensions?

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

noamgat
Posts: 10
Joined: 02 Dec 2009, 14:15

Cross-file referencing in javascript extensions?

Postby noamgat » 02 Feb 2010, 10:24

Hi,

I have a question about SFS's javascript extension capabilities :

Is it possible to call functions from other javascript files (they are in the same directory) from a javascript extension?
(I have some framework-type javascript code, which I don't want to paste inside each extension for maintainence reasons)

Thanks!
Noam
User avatar
Lapo
Site Admin
Posts: 23026
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 02 Feb 2010, 11:42

Yes you can use the #include directive, which is not standard in Javascript but it is in Actionscript ( the Adobe's brother language of Javascript )

Example:

Code: Select all

#include "myLibrary.as"
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “Server Side Extension Development”

Who is online

Users browsing this forum: No registered users and 19 guests