A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: delete this.onPress

  1. #1
    the cheesy child bounceboy's Avatar
    Join Date
    Dec 2008
    Location
    Australia
    Posts
    323

    delete this.onPress

    I am making a cool puzzle game where you can do heaps of secret little things to get points or to go to another part of the level.

    I made a movieclip that everytime you click on it plays until the next stop();
    it all works great except one thing...

    this.onPress = function(){
    play();
    }

    this is what i use to make the movieclip play. i do not want this changed.

    i want to make it so that on the last frame it will delete the this.onPress so i tried using delete this.onPress;

    but i click on it again while it is on the last frame and it goes back to the first!!! how can i delete the onPress?

  2. #2
    the cheesy child bounceboy's Avatar
    Join Date
    Dec 2008
    Location
    Australia
    Posts
    323
    can anybody tell me how to get rid of this.onPress

  3. #3
    |-'|-'|
    Join Date
    Jan 2006
    Posts
    273
    on last frame just set this.onPress=function(){}; or this.enabled=false;

  4. #4
    the cheesy child bounceboy's Avatar
    Join Date
    Dec 2008
    Location
    Australia
    Posts
    323
    ok cool

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