Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 03-21-2010, 03:43 PM   #1
skyfix
Registered User
 
Join Date: Mar 2010
Posts: 3
Default onRelease question

ActionScript Code:
stop(); var Tred:Number= 1; var count:Number= 1; r1_mc.rv.onRelease = function() {     Tred = Tred + count;     trace(Tred);     r1_mc.gotoAndStop("r_act"); } r1_mc.rr.onRelease = function() {     Tred = Tred - count;     trace(Tred);     r1_mc.gotoAndStop("r_init"); }


the .rv and .rr are 2 different instances, both representing the same button in different states,(rr in the r_init, and rv in the r_act)
now...
the first on release works perfectly...
once it's on the frame 'r_act' on the other hand, it doesn't do anything... doesn't even recognize it as a button (no hand, just arrow)
what am I doing wrong?
skyfix is offline   Reply With Quote
Old 03-22-2010, 01:38 PM   #2
skyfix
Registered User
 
Join Date: Mar 2010
Posts: 3
Default

please?
skyfix is offline   Reply With Quote
Old 03-23-2010, 03:34 PM   #3
skyfix
Registered User
 
Join Date: Mar 2010
Posts: 3
Default

realy, nobody?
waw...thanks a lot...
skyfix is offline   Reply With Quote
Old 03-24-2010, 02:52 PM   #4
Yui
Senior Member
 
Join Date: Jun 2008
Location: Romania
Posts: 162
Default

try this code and you'll realize that r1_mc.rr is null:

ActionScript Code:
stop(); var Tred:Number= 1; var count:Number= 1; r1_mc.rv.onRelease = function() {     Tred = Tred + count;     trace(Tred);     r1_mc.gotoAndStop("r_act"); } trace(r1_mc.rr); //output: null

make sure all the objects you use (buttons, mc's etc) exist when you want them to do something.
Yui is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:28 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.