Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-07-2008, 10:04 AM
Member
 
Join Date: Apr 2005
Location: Antwerp, Belgium
Posts: 40
Default default menu item by code

Hi,

In the menu editor you can set a (sub) menu item as default (making it bold).

How can I do this if I create a menu by code (either from AS3 or from FFish)
I can't find it in the help ...

tnx!
Gert
Reply With Quote
  #2 (permalink)  
Old 08-07-2008, 12:16 PM
Member
 
Join Date: Apr 2005
Location: Antwerp, Belgium
Posts: 40
Default Re: default menu item by code

I also want to set and evaluate the "Checked" option by code. Some help about that would also be great.
Reply With Quote
  #3 (permalink)  
Old 08-08-2008, 10:58 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: default menu item by code

To set an item to be checked, please handle the "onUpdateItem" event as shown in the following code
Code:
Menu.onUpdateItem = function (id, state)
{
	trace(id);
  if (id == "id0")
  	state.check = true;
}
And it doesn't work if the menu item has an icon.

About the default item, the current version of swfkit hasn't such a method. However, you can first create a menu with a default item in the "Menu creator" and then modify it by using ffishscript code.
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 05:19 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.