A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: delete this.onEnterframe function?

  1. #1
    Bob (the singing sock)
    Join Date
    Aug 2000
    Location
    Århus, Denmark
    Posts
    472

    delete this.onEnterframe function?

    To avoid unneccesary onEnterFrame checks I wonder if i can delete it after '} else {'. I dont want to removeMovieClip.

    PHP Code:
    onClipEvent(load) {
        function 
    expand(endSize) {
            
    this.onEnterFrame = function  () {
                var 
    myHeight _height;
                if(
    _height endSize) {
                    
    myHeight myHeight*1.2 1;
                    if(
    myHeight endSize) {
                        
    myheight =endSize;
                    }
                } else {
                    
    myheight =endSize;
                }
                
    _height _parent.mask._height myheight;
                
    _parent.videoplayerbg._y _parent.player._y myheight 7;
    // delete the onEnterframe function?
            
    }
        }

    Any thougts or cool tricks out there?
    //pod

  2. #2
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Don't know if it would work in your situation... I guess it would, did you try it?
    code:

    delete this.onEnterFrame;


  3. #3
    Bob (the singing sock)
    Join Date
    Aug 2000
    Location
    Århus, Denmark
    Posts
    472
    ohh my god ... it works

    No more endless enterframes.

    Cheers mate!
    //pod

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