A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: How change a parent variable

  1. #1
    Junior Member
    Join Date
    Sep 2007
    Posts
    11

    How change a parent variable

    I have a variable called tres into symbol 1. I create a button and need that if the user clicks 3 times go to frame 140 in the symbol1.


    in the frame action i put tres = 0

    in the buton i put

    on (release) {
    _parent.tres = Number(tres)+1
    if (_parent.tres = 3) _parent.gotoAndStop(140);


    }

    BUT NOT WORK!!!!

  2. #2
    Student
    Join Date
    Apr 2001
    Location
    -
    Posts
    4,756
    the button isn´t equal of a movieClip and therefore doesn´t add a xtra hierarchy depth. Just use
    PHP Code:
    on (release) {
        
    tres Number(tres)+1
        
    if (tres 3gotoAndStop(140);


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