I want my swf file as anchor link but seems not working... I use the following code to do the job but won't work <a href="targeturl"><embed width='170' height='120' src='http://myurls.com/ads/Movie4.swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' ></embed> </a> Code (markup): The embeded file is showing but it's not clickable, seems the a href not working with it.
Try <embed onclick="document.location.href='http://google.com'" width='170' height='120' src='http://myurls.com/ads/Movie4.swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' > </embed> Code (markup): I'd highly recommend against Flash ads though.
Embed, gag. Okay, it's Flash, so here's what you do: open the fla (don't have it? Can't make it a link then, sorry, outta luck) Make a new layer and call it something like "button" <-- make sure it's the TOP LAYER put a fill-box there, aligned to all the sides of the stage. So, a box without a border, fill-only, no stroke, and covers the other frames below it make it a Symbol, type=button go inside the symbol up by the Frames on top, move the selected dot over to Hit (makes this button invisible and everywhere where that fill-box is, will be clickable) get out of the symbol and check that there's an aqua colour over your Flash (means there's a button there on top)... Test Movie should give you a hand cursor Go to Actions window and make sure you are in the button, not Frame. This means this fla had better been made with Actionscript 2.0 and not 3!!! The properties panel on the bottom should also say "Button" on the left side. So now you can type your URL codes: in Actions panel/window: on (release) { getURL("http://www.example.com"); } Make sure the little eye up in the Frames is crossed out and you won't see the button anymore. If you Test Movie you should be able to click on it. I haven't gotten this to work with Actionscript3 so maybe it's possible, but I use Actionscript 2 instead. Nothing wrong with Flash banners but make sure they are as small as possible. It's really easy to get huge file sizes, esp if you have imported raster images (jpg's, gif's, etc)
Oh....a long time since I've used actionscript, but I believe there is a way to do it: var site = "http://google.com"; var httpRequest:URLRequest = new URLRequest(site,'_self'); on(release){ navigateToURL(httpRequest); } Code (markup): You may want to try putting it in a try...catch statement (is that the word) because knowing my Actionscript abilities, at least one thing is wrong with that code. EDIT: Fixed 3 bugs
But where does he set that variable? He still needs the fla right? Or can that Actionscript be reached via JS on the page? (that would be easier, as the same banner can have its URL set by the site owner without them needing the Fla)
so no chance to used this flash file as clickable because I don't have the fla file... thanks for the input guys