Skip to main content
Participating Frequently
December 29, 2006
Question

Easing animation navigation like Yugo

  • December 29, 2006
  • 7 replies
  • 504 views
Peace fam

I am new to this Fuse Kit and I wanted to know if anyone knows of a tutorial or something that will allow me to do a navigation system like this one here: http://www.showlogic.com/

There is a similar example below at the Laco site for the Yugo navigation:
http://laco.wz.cz/tween/?page=examples

Any help would be appreciated. I do not even know where to begin the process of creating it. Even if you have a method not using Fuse Kit, I would appreciate that as well.
This topic has been closed for replies.

7 replies

Imhotep06Author
Participating Frequently
January 6, 2007
Okay, finally got it to work "again" and wanted to know if there was a better way of doing this. What I ended up doing was creating a function. Is there a way to create multiple functions without creating seperate functions for each button? I have a total of 6 buttons.


Here is what I created

link1 = function() {
getURL(" http://www.mochasuite.com", _blank);
}

yugopMenu0.addItem("Icon1","LABEL0",link1);
Inspiring
January 6, 2007
Well, for a total of 6 buttons it's not that much work...
But, you can change the addItem() and addItemAt() methods to accept a fourth parameter: a string that holds the url.
You need to change those functions in YugopMenu.as
Then add implicit getter and setter methods in YugopItem.as and add a private property that will hold the url.
Attached the changed classes where you can review what I changed there.
Now you can use:
yugopMenu0.addItem("Icon1","LABEL0",link1," http://www.yoururl.com");
with a function:
link1 = function() {
if(this.www!=undefined){
getURL(this.www);
}
}

Imhotep06Author
Participating Frequently
January 6, 2007
I appreciate the information, but I am familiar with that. I have the code on how to do what I initially wanted to do. The issue now is how can I get the buttons generated by the "addItem" code above to get a url when clicked?

Everytime I put the getUrl info in that section of "addItem," it gets the url, but does it at runtime instead of when the button is clicked. How can I make the event happen, using the code above, when the user clicks the button?
Known Participant
January 6, 2007
HI!

Check this out!

Video tutorials, some are using Fuse kit...
http://gotoandlearn.com/
http://www.theflashblog.com/

Fuse is well documented also on
http://www.mosessupposes.com/Fuse/fuse2.1docs/

HTH
Imhotep06Author
Participating Frequently
January 5, 2007
I take it back. When I put in

yugopMenu0.addItem("Icon1","LABEL0",getURL("link.com", _blank));

As soon as the swf is published, it retrieves the link, instead of waiting for the mouse to click the button. How can I put an onRelease command, in the addItem section which will retrieve the link AFTER the button has been clicked?

Thanks in advance
Imhotep06Author
Participating Frequently
January 4, 2007
okay, I solved my last question. I just entered

getURL("link.com", _blank)

....where it said "testHandler" and it worked.
Imhotep06Author
Participating Frequently
January 4, 2007
This helps alot. I will study the code. Hopefully it has a place in it to put actual links to get external pages.
Imhotep06Author
Participating Frequently
January 4, 2007
Okay I checked the code out and it seems pretty simple. But I don't know how to add a URL in the "addItem" section. The code used to generate the buttons is as follows:

quote:

testHandler = function(){
trace("Itemnumber: " + this.id);
}

yugopMenu0.addItem("Icon1","LABEL0",testHandler);
yugopMenu0.addItem("Icon1","LABEL2",testHandler);
yugopMenu0.addItem("Icon1","LABEL3",testHandler);
yugopMenu0.addItem("Icon1","LABEL4",testHandler);
yugopMenu0.addItemAt(1,"Icon1","LABEL1",testHandler);

yugopMenu0.minDimension = 20;
yugopMenu0.maxDimension = 200;{


The break down of the code is this

quote:


/***************************************************************************
// YugopMenu Methods
***************************************************************************/

/*
addItem(iconLibID:String,label:String, handler:Function);
Adds an item at the last position

addItemAt(position:Number,iconLibID:String,label:String,handler:Function);
Adds an item at a specified position

update();
Refreshs the menu

removeItemAt(position:Number);
Delets an item at specified position

removeAll();
Removes all items

destroy();
Destroys the whole menu
*/



I'm assuming that the url needs to go into the handler:Function but I don't know how to do it. Can someone help me out? I pretty much get everything else but it is useless if I can't get the buttons to get external URL's.
Inspiring
December 30, 2006
They have some downloadable samples of that technique here (scroll down the page):

http://www.betriebsraum.de/blog/downloads/