#1
  1. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2001
    Location
    Missouri
    Posts
    31
    Rep Power
    0

    Question How can I tame ".onEnterFrame = function()"?


    In one frame I have: boxOne.onEnterFrame = function() { ... }

    Among other things, it tweens the _alpha of boxOne.

    The problem I am having is that once the desired effect is acheived with the onEnterFrame function, it interupts another function trying to alter the _alpha. From what I understand, onEnterFrame means that the function is evoked for each frame after the event handler is called. So, how do I stop it? And by "it", I mean the conditional loops that are running, checking to make sure that boxOne._alpha == x.
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Posts
    15
    Rep Power
    0
    Not quite sure exactly what you're trying to do, but you can get rid of the function altogether by using:

    delete boxOne.onEnterFrame;

    or

    boxOne.onEnterFrame = null;

    Alternatively, if you don't want to wipe out the entire function, you need to put the statements that should only happen under certain conditions within some sort of conditional structure like an "if...else" or a "while" loop, etc.

    Hope this helps. Like I said, I'm not too sure exactly what you were after.

IMN logo majestic logo threadwatch logo seochat tools logo