invisible button question

Posted by mentality 
invisible button question
January 26, 2009 12:15AM
Nice plug in btw, I use CS3 for everything but Flash banner design as I was using Swish Max because of the effects. You guys have come pretty close so now I can animate my banner work on my mac instead of going to my pc to use Swish. Anyway, as you know banners usually need to link to urls and I"m used to creating a button hit state and , scaling it the size of the banner then dropping it over the movie then adding the actions. I'm also not too familiar with AS 3.0 and I see you can make buttons out of symbols , how can you do invisible buttons or should I keep working my old way of doing it?

rdee
Re: invisible button question
January 26, 2009 08:27AM
You can do this in a simple way (probably there are more ways of doing it) you create a new layer, place it on the top of your layers, to be first from top to bottom. Then create a new rectangle ( hotkey: R ) and resize it to make it as large as your banner is. After you've done that select the rectangle you've just created and make it a symbol (hotkey: F8). When you've done that you will have to make it invisible. The most simple and efficient way of making it invisible is to give it a instance name( eg: myInvisibleClip) and then go to the Action panel (hotkey:F9) where you will write this:

myInvisibleClip.alpha = 0;

Now when you compile(CTRL+ENTER) the movie clip it will be invisible. To add a link when you click on the banner you will have to add the following code in the same Actions panel:

import flash.net.navigateToURL;
import flash.events.MouseEvent;
myInvisibleClip.alpha = 0;//this is how the code should look at the end
myInvisibleClip.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
function mouseDownHandler(event:MouseEvent):void {
var adobeURL:URLRequest = new URLRequest("[www.adobe.com];);
navigateToURL(adobeURL);
}

Hope this helps.
-Ionut.
Sorry, you do not have permission to post/reply in this forum.