Buttons with URL and Effect using AS3

Posted by richyjassal 
Buttons with URL and Effect using AS3
November 16, 2010 11:33AM
Hi,
Is it posible to code an object to have 'overState', 'downState' and 'selectedUpSate' whilst also having a URL, so using both FEBEffect and FECNavigateToURL for buttons ?
Thanks
Richy

Here is my code:

var btn1:FEBEffect = new FEBEffect();
btn1.overState = overStateXML;
btn1.downState = downStateXML;
btn1.selectedUpState = selectedUpStateXML;

var btn1URL:FECNavigateToURL = new FECNavigateToURL();
btn1URL.url = "/aboutus.php";
btn1URL.browserTarget = "_self";

// Create the first FlashEff2 instance and
// add it to the display list.
var effect1:FlashEff2Code = new FlashEff2Code();
effect1.useHandCursor = true;
effect1.groupName = "topNav";
effect1.addCommand(btn1URL, "release");
if (selectedMenu == "aboutus") {
effect1.selected = true;
}
effect1.buttonEffect = btn1;
addChild(effect1);

var btn2:FEBEffect = new FEBEffect();
btn2.overState = overStateXML;
btn2.downState = downStateXML;
btn2.selectedUpState = selectedUpStateXML;

var btn2URL:FECNavigateToURL = new FECNavigateToURL();
btn2URL.url = "/events.php";
btn2URL.browserTarget = "_self";

// Create the first FlashEff2 instance and
// add it to the display list.
var effect2:FlashEff2Code = new FlashEff2Code();
effect2.useHandCursor = true;
effect2.groupName = "topNav";
effect2.addCommand(btn2URL, "release");
if (selectedMenu == "events") {
effect2.selected = true;
}
effect2.buttonEffect = btn2;
addChild(effect2);



Edited 1 time(s). Last edit at 11/16/2010 11:35AM by richyjassal.
Re: Buttons with URL and Effect using AS3
November 17, 2010 08:04AM
"Is it posible to code an object to have 'overState', 'downState' and 'selectedUpSate' whilst also having a URL, so using both FEBEffect and FECNavigateToURL for buttons ?"
Yes, that is possible, you can add url while using button states.
Sorry, you do not have permission to post/reply in this forum.