Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-30-2007, 08:34 PM
Member
 
Join Date: Nov 2007
Posts: 46
Default check problem

i'm struggling with this problem: if 'on' is checked, i want 'off' to be unchecked,and when 'off' is checked, i wan't 'on' to be unchecked.
i use this code:
Code:
var checkSwitch = false;
Menu.onUpdateItem = function (identifier, state)
{ 
	if (identifier == 'on') state.check = checkSwitch;
  if (identifier == 'off') state.check = checkSwitch;
 }
Menu.onCommand = function (identifier){{
	if (identifier == 'off') checkSwitch = checkSwitch;
  if (identifier == 'on') checkSwitch = checkSwitch;
  }
Reply With Quote
  #2 (permalink)  
Old 12-31-2007, 09:56 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: check problem

var checkSwitch = false;
Menu.onUpdateItem = function (identifier, state) {
if (identifier == 'on') state.check = checkSwitch;
else if (identifier == 'off') state.check = !checkSwitch;
}


Menu.onCommand = function (identifier) {
if (identifier == 'off') checkSwitch = false;
else if (identifier == 'on') checkSwitch = true;
}
Reply With Quote
  #3 (permalink)  
Old 12-31-2007, 12:25 PM
Member
 
Join Date: Nov 2007
Posts: 46
Default Re: check problem

thanks that works great

but i'm breaking myhead with this:
i want to check c:\my.ini if yes = true, and when yes is true, 'yes' needs to be checked, if yes is false, 'no' needs to be checked.
thanksin advantage ;D
Reply With Quote
  #4 (permalink)  
Old 12-31-2007, 09:15 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: check problem

Code:
checkSwitch = myIni.getString("section", "yes") == "true";
Reply With Quote
  #5 (permalink)  
Old 01-01-2008, 12:06 PM
Member
 
Join Date: Nov 2007
Posts: 46
Default Re: check problem

great thanks ;D
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 04:47 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.