flash - ActionScript-3 Call Function on Every Frame Without Having to KeyFrame every Frame in between -


I want to call a frame when the frame between keyframe 1 and keyframe 60 once, but I do not want to call the function One keyframe on each one frame in the middle of an action going. Is there a simpler way like this tweing to perform this function without having to produce 60 unique keyframes on each frame?

Keep a count variable and use ENTER_FRAME event something like this: / P>

  // Make a count anywhere in your class or whatever personal var m_currCount: int = 0; // Add an EnterFrame Event Listener to the Forum. This.stage.addEventListener (Event.ENTER_FRAME, this._onUpdate); // Our Update Function Private Function _Onupdate (E: Event): Zero {// Call Your Function Here something (); // Let us calculate this. M_currCount ++; // If it is 60, then stop (this. M_currCount> = 60) this.stage.removeEventListener (Event.ENTER_FRAME, this._onUpdate); }    

Comments

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -