Welcome, Guest. Please login or register.
Did you miss your activation email?
02/08/12, 07:44
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  General
| |-+  Flash 8 (Moderators: Jorge Solis, ..:: Mazhar Hasan ::.., Andresss)
| | |-+  Interval function working except for---------
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: Interval function working except for---------  (Read 882 times)
Jaylada
Seasoned Programmer
***
Posts: 142



View Profile WWW Email
« on: 02/02/10, 00:09 »

I've called the function below and everything works turning items on and off, except the Label_x.
I've tried to name it a number of different things, and defined it as a Movie or Dynamic Text, but nothing seems to work.......   Any suggestions?

Many thanks


_______________________________
function ContCheck():Void {
 
if(_root.VerX==50){

   Label_x._visible=false;
   ULBtn._visible=true;
   DELETE1._visible=true;
   Label1._visible=true;


}
else{
   Label_x._visible=true;
   ULBtn._visible=false;
   DELETE1._visible=false;
   Label1._visible=false;

   clearInterval(intervalId);

}
}
intervalId = setInterval(this, "ContCheck", duration);
Logged
Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14593


View Profile
« Reply #1 on: 02/02/10, 07:41 »

Probably Label_x is out of scope, try tracing it:

Label_x._visible=false;
trace("Label_x->"+Label_x)

Jorge
Logged

Jaylada
Seasoned Programmer
***
Posts: 142



View Profile WWW Email
« Reply #2 on: 02/05/10, 02:47 »

I'm not sure what you mean, 'out of scope'

Here is what I got from the trace
Label_x->_level0.PD.tierXmovie.Label_x
Logged
Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14593


View Profile
« Reply #3 on: 02/05/10, 04:55 »

Take a look at this about scope: http://www.flash-db.com/Board/index.php/topic,4072.0.html
So if your sentence reach the MovieClip and it's so simple then there are aonly a couple of choices:

- The target you expect to be hidden is not Label_x, but another
- Something is unhidden the clip from another place

Hide/unhide outside the setInterval to see if this make sense

Jorge
Logged

Pages: [1] Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
anything