A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Simple On Relase Code Doesn't Work?

  1. #1
    Junior Member
    Join Date
    Sep 2012
    Posts
    9

    Unhappy Simple On Release Code Doesn't Work?

    Code:
    on(release){
    if(_root.class1=="A"){_root.add1=4}
    }
    This seems pretty simple, but it won't work for the life of me. No matter what I do, the number never changes from the beginning number, which is set at 5. Any ideas? Please respond ASAP, as in this project is due by tomorrow. So.. yeah. Help would be appreciated!
    Last edited by Beocro; 09-27-2012 at 11:28 PM.

  2. #2
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Location
    Here, no there
    Posts
    1,813
    Well I guess the first obvious question to ask is was version of actionscript are you using? The next would be have you added any trace elements to see if the event is actually being fired.
    Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.

  3. #3
    Junior Member
    Join Date
    Sep 2012
    Posts
    9
    Well, considering it shows Flash 8, AS2. And yes, I have. Nothing happened, for some reason it doesn't recognize class1 is A.

  4. #4
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Location
    Here, no there
    Posts
    1,813
    In you placed a trace within the onRelease tag and it doesn't appear, then your function is not being called.
    Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.

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