PDA

View Full Version : Is this new or am i dumb?



Macsy
May 8th, 2007, 12:20 PM
Hi, when i attempt to add AS to a MC or a button, it says i cant add actions to the selected object...

Is this something new ?
I can do this in old flash.

sekasi
May 8th, 2007, 12:29 PM
You can no longer add actionscript to movieclips in AS3.

Thank god, no more hidden sneaky code.

GPhillips
May 8th, 2007, 12:47 PM
You have to add the code directly to the Timeline now, no more movie clips or buttons or anything.

I try not to put code on objects anyway but it sucks that we are forced not too.

McGuffin
May 8th, 2007, 01:28 PM
You have to add the code directly to the Timeline now, no more movie clips or buttons or anything.

I try not to put code on objects anyway but it sucks that we are forced not too.

No, it's fabulous. No more hidden code, and now code will be much more organized. The transition might be difficult for those that relied heavily on putting code on movieclips, etc. but in the end, you shouldn't be doing that anyway.

sepu
May 8th, 2007, 02:05 PM
100% agree with this ! in my work everybody is use code in MC and Bnts .... now if they want to upgrade they will be force change their way !

thank god !

Scarybug
May 8th, 2007, 04:48 PM
I normally despise it when people put code inside movieclips, but occasionally it made sense. Like setting a flag to say I'm at a certain point in an animation.

Does it even not let you add stop(); to a frame??? I use that all the time in my activities. If you want to have 2 or 3 graphical states, it's much easier to separate them by labels in one movieclip and use gotoAndStop(), or gotoAndPlay() to swap states.

Or say you want an animation that plays in "intro" and then goes into a "repeat". It was useful to add that code in the movieclip's timeline. Leaving the main timeline (and .as files) to handle the "real" programming.

sekasi
May 8th, 2007, 05:42 PM
You can still add code to keyframes but you cant attach code onto symbols (like the 1880 fashion of on(Release) { this.gotoAndStop(5); } )