PDA

View Full Version : How to "Extend" flash?


stanley123
06-04-2007, 07:13 AM
Hi,

I have been wasting a lot of days to try to find out 'HOW TO EXTEND FLAAAASSSSSSHHHHH".........sorry....that was my frustration.

I browsed through the help files, this forum, adobe site etc etc. they all mention the same explanation for DOM (fl.getDocumentDOM()) wherein it contains ALL the useful functions like insertKeyframe, insertBlankkeyframe etc.

I tried copy-pasting all these codes on the on(release) event of my button in Flash8 as well as Flash MX 2004. But the thing doesnt work !!!!!!!!!!! Even tried it in the "frame"'s code, no use. AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA !!!!!!!!!!!!!!!!!!!!!!!!!!

So here are a few questions i "plead" you to answer in a beginners terms:

1. WHAT is fl.getDocumentDOM() ? (Too basic huh?)

2. Where do we use it? (In .JSFL or .AS file or in the button-actions etc...in other words "where do i type the fl.* codes?)

3. To use the fl.* codes, do we have to have the Flash IDE open, or can we code it into an swf file which will execute the fl.*codes at runtime? (so that it can run on any target machine having only a flash player)

4. How do we use .as files? Under what circumstances do we use it? (as opposed to a .jsfl file)

5. can we create a new swf file from an swf file?


PLEEEEEEEEEEEEEEZ help....am too frustrated. dont know where and how to start learning this.:confused:

Hope someone WILL reply,

Thanx

Stan

Flash Gordon
06-04-2007, 07:23 AM
http://www.tutorialsbyibrent.com/

abeall
06-23-2007, 05:15 AM
Extending Flash has nothing to do with SWFs. Extending and using JSFL(the javascript language used to extend Flash) lets you do things in the IDE.

1) fl.getDocumentDOM() gives you access to edit the open document in the IDE, so you can do stuff to it using JSFL.

2) Only in JSFL, never in AS. Look at the help file Extending Flash > Introduction > Overview of the Macromedia Flash JavaScript API > Running JSFL files to see all the ways you can execute JSFL in the IDE.

3) All extensibility features run only in the IDE. They help you at author time, they don't apply to SWFs. You can, however, make a SWF which calls JSFL using MMExecute(), and if that SWF is run inside the IDE it will run the JSFL in the IDE.

4) AS files are used to create scripts for SWFs which do stuff in any Flash Player at runtime.

5) No.

So "Extending" and JSFL is used for making changes in the IDE, AS is used for running in a SWF at runtime. They both use the very similar and at times the same syntax, so it can be confusing.

epicwolfboy
06-27-2007, 07:47 PM
i need this too, cant find any where on the web or adobe how to create your own command.

:mad:

abeall
07-02-2007, 04:08 PM
There's an entire book in your F1 reference called "Extending Flash" complete with samples.