PDA

View Full Version : Actionscript that runs Flash animation


samiujan
10-27-2008, 09:41 AM
Hi

I tried out the 101 flash tutorial here -
http://www.adobe.com/designcenter/flash/articles/flacs3_createfla_02.html

The animation works fine (the circle moves from left to right thanks
to a "motion tween") but can I see the actionScript code for that?

The question is essentially, if you make a flash animation using this
GUI editor, can you see the actionScript commands that drive this
animation? e.g. I have Alias Maya before and that generates MEL script
code for all animations so you can control your animation via the GUI
editor in addition to a script editor also

This would be useful if you could switch between GUI view and
command-editor view for your animation - I could not locate this on
the net ...

Thanks

- Sami

gnomeontherun
10-27-2008, 10:21 AM
When you use the GUI to design things, the code is not visible (far as I know unless you decompile the SWF and then I think the code is likely to be hard to understand).

However the same things can be done with Actionscript. In fact, a lot of Flash (if not pretty much everything) can be controlled with Actionscript, but it requires compilation before you can see the results. This is why people like to learn the basics of Flash using the GUI, because they can see their results played out immediately.

So far as I know also, there is no source-code viewer for elements that are created in the GUI.

samiujan
10-27-2008, 10:37 AM
thanks Jeremy

I could not locate a "code editor" that showed the actionScript for *that* animation - I have used Maya before and that spits out MEL code for all its actions ...

gnomeontherun
10-27-2008, 10:51 AM
If it is made in the GUI, the code is hidden from you. I think it probably is so that people can use the program, and not mess up what is on the stage when they do actionscripting.

The only thing I can think of is that when you write stuff in Actionscript, it does allow you to use a command trace() which provides information about the program as it runs (if you tell it to output something, you can trace it for example).