SKITSANOS FOR RIA

Skitsanos

Monday, July 28, 2008

Actionscript 3 Hidden Gem: addFrameScript

by Games and Tech

So it’s no big secret any more that in ActionScript 3, the MovieClip class has a hidden method that enables developers to add frame scripts at runtime. However, with great power comes great responsibility. It would help if this were documented in the Flash docs but it isn’t. If you don’t want your SWF files to crash when using this method you MUST ensure that the playhead is stopped before calling this method. I discovered this by experimenting with when, and what I could do with this method, and yes you can remove any frame scripts added at design-time or run-time (at least with the current version of Flash player). Actually, the playhead does not have to be stopped if you are setting a null frame script.

Read full article...

1 comments:

mrsteel said...

I didn't realize its undocumented... it's very usefull

Webware development dedicated blog by Skitsanos R&D Labs. ASP.NET, XML, RIA, Adobe Flex, ActionScript 3, AIR, AJAX, Web 2.0, Backbase, CGI development with RealBasic and other web development issues.
News
Downloads