Go Back   OXYLUS Flash Board > Support > Vertical XML Multilevel Menu

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-19-2008, 02:14 PM
Junior Member
 
Join Date: May 2008
Posts: 1
Default How to specify "_self" or "_blank" trough the XML

I purchased your menue a few days ago and it is Superb!!! Can you help with a modification so that the targets “_self”, “_blank” can be set within the XML . I need different targets using the within the same menue…

Many thanx!!!
Reply With Quote
  #2 (permalink)  
Old 05-20-2008, 08:13 PM
Super Moderator
 
Join Date: May 2008
Posts: 561
Send a message via Skype™ to Adrian
Default

Hi,
In the xml file you must add an additional attribute for specifing the target:

Code:
<item label="Super Beatle" url="asdsd" target="_blank"></item>
Now open GenericMenuItem.as and find this block of code:

Code:
	public function onRelease() {
		if (_url_ != "") {
			getURL(_url_, "_self");
		}
	}
replace it with:

Code:
	public function onRelease() {
                var _target_ = Node.attributes.target;
		if (_url_ != "") {
			getURL(_url_, _target_);
		}
	}
This should do the trick.
Reply With Quote
  #3 (permalink)  
Old 06-19-2008, 12:30 AM
Junior Member
 
Join Date: Jun 2008
Posts: 2
Default changing URL to gotoAndPlay

How would you change it so the url node is changed from getUrl functionality to a gotoAndPlay functionality. So you could control a movieClip from the XML?

Thanks for any help...
Reply With Quote
  #4 (permalink)  
Old 06-20-2008, 09:53 AM
Super Moderator
 
Join Date: May 2008
Posts: 561
Send a message via Skype™ to Adrian
Default

Try this approach:

in the xml
Code:
<item label="Super Beatle" url="frame number" target="absolute movie clip path"></item>
like for example:
Code:
<item label="Super Beatle" url="5" target="_root.testmc.wheel"></item>
in the GenericMenuItem.as :

Code:
public function onRelease() {
                var targetMC:MovieClip = eval(Node.attributes.target);
		if (_url_ != "") {
			targetMC.gotoAndStop(Number(_url_));
		}
	}
Reply With Quote
  #5 (permalink)  
Old 06-23-2008, 08:07 PM
Junior Member
 
Join Date: Jun 2008
Posts: 2
Default changing URL to gotoAndPlay

Thanks for the detailed explanation. For some reason it won't work for me. I have a movie clip with three frames, and I updated my "public function onRelease" and the XML. Any idea what I might have done wrong?

Here's my code
Code:
public function onRelease() {
        var targetMC:MovieClip = eval(Node.attributes.target);
		if (_url_ != "") {
			targetMC.gotoAndStop(Number(_url_));
		}
	}
Here's my XML
Code:
<item label="early example url/" url="2" target="_root.content1" ></item>
Reply With Quote
  #6 (permalink)  
Old 06-28-2008, 10:55 AM
aox aox is offline
Junior Member
 
Join Date: Jun 2008
Posts: 3
Default Help

The menu is used as the main menu inside the flash file.

I want to have the functionality of on release, loadmovie to a specific blank movie clip.

How can I achieve this?

Thanks.
Reply With Quote
  #7 (permalink)  
Old 10-21-2008, 02:38 PM
Junior Member
 
Join Date: Oct 2008
Posts: 1
Default Need Help

I agree the above script does not work for me. I tried everything.

Someone help.
Reply With Quote
Reply

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 - 2008, Jelsoft Enterprises Ltd.