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);
}