PDA

View Full Version : how to use JSFL


mayur_vnit
10-07-2004, 07:26 AM
i want to make use of the JSFL .. i am totally ignorat about it :p ..but want to learn it.. i want to know where to start and how to go about it

splict
10-07-2004, 12:01 PM
To get started, I would recommend macromedia's info that they have on it. The Flash help panel has documentation on it now, if you've updated it. This thread (http://www.actionscript.org/forums/showthread.php3?t=35283) also has links to info at their website.

Keith Peters has a blog (http://www.bit-101.com/blog/) where he has little snippets of jsfl scattered about. He also has a fantastic book (http://www.amazon.com/exec/obidos/tg/detail/-/1590593049/qid=1097150076/sr=8-1/ref=sr_8_xs_ap_i1_xgl14/103-0835814-9738209?v=glance&s=books&n=507846) and an accompanying website (http://www.flashextensibility.com/). His book is where I learned jsfl - it goes through everything from the basics on up. Since jsfl is javascript, it helps if you are comfortable with that. Of course, if you know actionscript then its not much different since they are based on the same standard.

hangalot
10-07-2004, 05:47 PM
and subsrcibing to the extendflash mailing list hosted by guy watson @ flashguru.co.uk is handy as well.

mayur_vnit
10-08-2004, 11:49 AM
thanks a lot for the help. :) . i have started with it.. had tried scaling objects on the stage,attaching actionscript to button and movie clip etc..It is fun to do it... :)

mayur_vnit
10-12-2004, 09:24 AM
I want to creat new layer in the currently opened document.
How should i do it?

hangalot
10-12-2004, 09:34 AM
fl.getDocumentDOM().getTimeline().addNewLayer()

mayur_vnit
10-12-2004, 09:45 AM
Thanks a lot :) :)

mayur_vnit
10-12-2004, 09:57 AM
how to create frames on any perticular layer??

hangalot
10-12-2004, 10:12 AM
there is a propeerty currentLayer on the timeline object.

mayur_vnit
10-12-2004, 10:17 AM
Ya, there is a property but how to add new frame
like say on layer labled "firstlayer" we have to create 100 new frames then how to achieve this

hangalot
10-12-2004, 10:21 AM
u set the current layer, then on the timeline object u call one of the following methods:
insertFrames,insertKeyFrame,insertBlankKeyFrame which ever takes ur fancy.

trying looking at the manual as well!!!

mayur_vnit
10-12-2004, 10:24 AM
i got it!!!!!!
we can do it bu using
fl.getDocumentDOM().getTimeline().insertFrames();

:) :) :) :)

mayur_vnit
10-12-2004, 10:29 AM
thanks a lot
i am searching in that mannual only

mayur_vnit
10-12-2004, 11:11 AM
i got how to add a btn on the stage.. we can do so by using
fl.componentsPanel.addItemToDocument({x:0, y:200}, "UI Components", "Button");


but how to add a movie clip :confused:
and that too on a selected layer and slected frame

Please help me out

hangalot
10-12-2004, 12:12 PM
var succeed = targetDocument.addItem({x:0,y:0}, parentLibItem);

where targetDocument specifies the document u want to add 2, and the parentLibItem a item object from the library

mayur_vnit
10-12-2004, 12:39 PM
thanks
k will try it out
currently doing
something else
will let u know

mayur_vnit
10-12-2004, 01:25 PM
:) Thanks a lot for ur help .. it helped to do my work in very less time ...
still i have one morw difficulty::
How to retirve the symbol name in the library of the object which is on the stage like by using this we will get the instance name :

fl.getDocumentDOM().getTimeline().layers[0].frames[0].elements[0].name

butwhat to do if we have to get the symbol name? like if we have to find that ,of which symbol the current object is instace of :confused:

hangalot
10-12-2004, 03:38 PM
i replied to the other post about this.

jota
11-01-2004, 01:40 AM
I made a JSF file and it is seen under teh commands menu up top. But, i want it to run when a button is pressed, any way to go about doing that?
Thanks
-JJ

tdoublea
11-01-2004, 02:08 AM
i'm only aware of running commands through a WindowSWF when using events to trigger them, using MMExecute.
You can't run a command from the SWF, or from an instance on the stage as far as i know. Do you mean a shortcut key?

-t

jota
11-01-2004, 04:30 AM
like what i want to do is save data generated by the flash file to the user's computer. I wanted ot use FLfile.createFolder("file:///C:/myfold/") and the write command when the data is all inputted. Should i be using something else?
-JJ

hangalot
11-01-2004, 10:20 AM
flFile only exists at authoring time. if u want to persist data look at shared object.

jota
11-01-2004, 07:28 PM
ok i looked at the tutorial on sharedobjects and put the code in, but it doesnt seem to work. Shouldnt this work?

on(release)
{
mySO = SharedObject.getLocal("test");
mySO.data.stickAround = "I'll be here for years to come!";
mySO.flush();
delete mySO;
}

Thank you, JJ

hangalot
11-02-2004, 07:31 AM
create a sperate thread in an appropriate forum for this plz