A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: onEnterFrame inside AS file

  1. #1

    onEnterFrame inside AS file

    Ok, I need some Actionscript 2.0 help.

    I want to use onEnterFrame inside my AS file. Well, my AS file isn't recognizing the onEnterFrame function. I bet I have to import something. I actually want this to work like the Tween class. Tell it to run, perhaps with some peramitors, then it runs.

    I've done this so that I didn't need the onEnterFrame inside the AS file, I called the AS file function from inside an onEnterFrame in my movie for it to give me the next value, but that wasn't as nice.

    If anyone can help that would be great. If you need some more info or a demo file or code let me know.
    _____________
    Portfolio E
    & stuff

  2. #2
    Anyone know how to impliment onEnterFrame stuff in AS 2?
    _____________
    Portfolio E
    & stuff

  3. #3
    Qwaizang:syntax_entity_ Q__Hybrid's Avatar
    Join Date
    Aug 2005
    Posts
    270
    E,

    Inside your AS file, do something like:
    Code:
    function whatToDoPerFrame() {
      // what the function does...
    }
    myClip.onEnterFrame = whatToDoPerFrame;
    "myClip" must already be created before you can attach the onEnterFrame event handler to it. I suggest you use an initclip block instead, if possible.

    +Q__
    Qwai•zang \kwî-'zan\ n [origin unknown] 1 : abstract designer, esp. of complex real-time experiments, c. 21st century

  4. #4
    what is myClip? Is that a movieclip on the stage that you need to name the same in the AS file? I'm not sure what you are talking about with the initclip.
    _____________
    Portfolio E
    & stuff

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center