That's a neat approach to changing scripted animation speed globally but
made me realise that I'd assumed Lee was talking about chaging the runtime
speed of timeline animations created at authortime. Upon reading more
carefully, I think I may have been wrong in this assumption. Lee, are you
talking frame-rate or how quickly a scripted animation runs?


On 3/23/06, Scott Fanetti <[EMAIL PROTECTED]> wrote:
>
> I have been playing with Flex 2 a lot recently, so I forgot a lot of the
> AS2 syntax for this, but this is pseudocode for what I would do.
>
> What I would do is initialize the MovieClip as an event broadcaster:
>
> AsBroadcaster.initialize(MovieClip);
>
> then add a broadcaster to the MovieClip prototype
>
> MovieClip.prototype.broadcastEnterFrame = function(){
>     this.broadcastMessage("enterFrameEvent")
> }
>
> then in the root create a movieClip that will be your central animation
> broadcaster
>
> _root.createEmptyMovieClip("broadcaster_mc",999999);
>
> then create a setInterval to iteratively call the broadcaster
>
> speedInterval = setInterval(broadcast_mc,"broadcastEnterFrame",33);
>
> then to get anything to animate, you simple add it as an event listener
> to the MovieClip prototype - and have the animation code in an
> "enterFrameEvent" function.  To change the global playback rate, you set
> 33 to some other number (  in milliseconds )
>
> my_mc.enterFrameEvent = function(){
>     this._x += 3
>     if(this._x >10)MovieClip.removeListener(this)
> }
>
> MovieClip.addListener(my_mc);
>
>
>
>
>
> _______________________________________________
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to