Go Back   OXYLUS Flash Board > Support > Sliding List

Closed Thread
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-23-2008, 06:25 PM
Super Moderator
 
Join Date: May 2008
Posts: 656
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.
Closed Thread

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


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.