Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-26-2005, 07:48 AM
Member
 
Join Date: Jan 2005
Posts: 50
Default trouble with state.enable

I have a script like this:

//soundoff

Menu.onUpdateItem = function (id, state)
{
switch (id)
{
case "id3":
state.enable = true;
break;

case "id4":
state.enable = false;
break;
}

}


I also have another script that defines id1 and id2


The funny thing! is that when I run my 'soundoff script
it somehow also affects my id1 and id2, - because their state are set to enable = true!!


How can this be?? ???


Kind regards

Godowsky
Reply With Quote
  #2 (permalink)  
Old 01-26-2005, 08:10 AM
Member
 
Join Date: Jan 2005
Posts: 50
Default Re:trouble with state.enable

Well, it works if I set a global var to indicate the state of the state.enable var.

like this, - not a beauty....

//soundoff

Menu.onUpdateItem = function (id, state)
{
switch (id)
{
case "id3":
state.enable = true;
break;

case "id4":
state.enable = false;
break;


}

if(rememberMax == 1)
{
switch (id)
{
case "id1":
state.enable = false;
break;

case "id2":
state.enable = true;
break;
}

} else
{

switch (id)
{
case "id1":
state.enable = true;
break;

case "id2":
state.enable = false;
break;
}
}

}



after putting var rememberMax = 1 in my init script.

Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



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


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.