Go Back   OXYLUS Flash Board > Support > Flash Menus > Sliding List

Closed Thread
 
LinkBack Thread Tools Display Modes
Old 11-23-2008, 06:25 PM   #1 (permalink)
OYXLUSFlash.com Staff Member
 
Adrian's Avatar
 
Join Date: May 2008
Posts: 1,981
Send a message via Yahoo to Adrian Send a message via Skype™ to Adrian
Default FIRING ACTIONS ON ITEM CLICK - Updated

First , create an instance of the Sliding list on the stage (drag it from the library) and give it a name, for example, PList_mc.

The handler function will look like this (write it on a timeline frame action script):

Code:
PList_mc.onItemSelect= function(n:XMLNode){ ... }
1. To trigger a getURL action, open the xml and add for each xml item tag new attributes and modify the handler function:
Code:
<item title="New mayor to tone down glitz" url="www.url.com" target="_blank" />
The handler function can look like:
Code:
PList_mc.onItemSelect= function(n:XMLNode){ 
	getURL(n.attributes.url, n.attributes.target);
 }
2. To play a certain frame:

Code:
<item title="New mayor to tone down glitz" frame="5" />
The handler function can look like:
Code:
PList_mc.onItemSelect= function(n:XMLNode){ 
	your_movie_clip.gotoAndStop(Number(n.attributes.frame));
 }
Replace your_movie_clip with the instance name of the movie clip you want to control.

3. To load an external clip:

Code:
<item title="New mayor to tone down glitz" clip="clips/contact.swf" />

The handler function can look like:
Code:
PList_mc.onItemSelect= function(n:XMLNode){ 
	your_movie_clip.loadMovie(n.attributes.clip);
 }
Replace your_movie_clip with the instance name of the movie clip you want to be the holder of the external clip.

An alternative using MovieClipLoader class would be:
Code:
var mcl = new MovieClipLoader();

PList_mc.onItemSelect= function(n:XMLNode){ 

	mcl.loadClip(n.attributes.clip, your_movie_clip);
 }

Last edited by Adrian; 11-23-2008 at 06:31 PM.
Adrian is offline  
Closed Thread

Bookmarks

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 06:42 PM.