-
XML driven menu
Hi,
i've been cracking my head on flash menu driven by xml. I saw a couple of example of xml driven menu that has the button to load external pages. What i would like to do is to "loadMovie" onto the stage instead of opening URL everytime the button is pressed.
-
Can't Re-Member
here's an example.... that loads in external swf's into an empty movieclip...
Hope this helps
http://artofficialintel.com/download...nu_ext_swf.zip
-
That's an extremely good example! Thanx mate. However i need it to place it inside a scrollpane. Do u have any suggestions?
-
Can't Re-Member
simple give your scrollpane an instance name (such as 'my_sp') then change the target. Depending on whether you're loading directly into the scrollpane (i.e scrollpane component) or a custom scrollpane, you may have to create an empty movieclip inside the scrollpane to hold the loaded swf. then just change this line
Code:
item.onRelease = function() {
holder.loadMovie(this.myUrl);
}
// to ------->
item.onRelease = function() {
my_sp.loadMovie(this.myUrl);
}
if you want/need a custom scrollpane (for movieclips/swfs/text) i stuck a few up here http://artofficialintel.com/downloads/ that you are welcome to download/pick apart/study/use/improve on/etc just type 'scroll' in the little search window and hit return and it'll find all related files....
hope that helps
-
madzigian,
i'm at lost for words by the help rendered... I must however burden u a bit more. How do create the empty movieclip inside the scrollpane? I tried editing the scrollpane component by dbl-clicking from the library but i can't seem to edit it. I really apologise if i am taxing you. i hv successfully change :
item.onRelease = function() {
my_sp.loadMovie(this.myUrl);
I really appreciate your help....
-
Can't Re-Member
If you are using Flash's IU ScrollPane Component... All the info you need is in Flash's HELP files. THis is from the MX04 files :
ScrollPane.contentPath
-----------------------------------------
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX 2004.
Usage
scrollPaneInstance.contentPath
Description
Property; a string that indicates an absolute or relative URL of the SWF or JPEG file to load into the scroll pane. A relative path must be relative to the SWF file that loads the content.
If you load content using a relative URL, the loaded content must be relative to the location of the SWF file that contains the scroll pane. For example, an application using a ScrollPane component that resides in the directory /scrollpane/nav/example.swf could load contents from the directory /scrollpane/content/flash/logo.swf by using the following contentPath property: "../ content/flash/logo.swf"
Example
The following example tells the scroll pane to display the contents of an image from the Internet:
scrollPane.contentPath ="http://imagecache2.allposters.com/images/43/033_302.jpg";
The following example tells the scroll pane to display the contents of a symbol from the library:
scrollPane.contentPath ="movieClip_Name";
The following example tells the scroll pane to display the contents of the local file logo.swf:
scrollPane.contentPath ="logo.swf";
----->
So basically... all you should have to do is substitute :
Code:
item.onRelease = function() {
my_sp.loadMovie(this.myUrl);
}
with
Code:
item.onRelease = function() {
my_sp.contentPath = this.myUrl;
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|