Welcome to WebmasterWorld Guest from 220.127.116.11
Forum Moderators: not2easy
I have a bunch of Flash .SWF files embedded in my page, how do I hyperlink them? I tried putting an <a href around them, tried putting them in a hyperlinked DIV, nothing works.
No, I do not have access to the FLA for the SWF's nor do I have the desire to do an Onlick event in the Actionscript itself.. just a simple hyperlink.. I must be absorbing too much monitor radiation this one should be simple!
nor do I have the desire to do an Onlick event in the Actionscript itself
This is the normal method of linking an swf, you need to add a button or movieclip with mouse events inside the .fla
As far as I am aware you cannot wrap an swf inside an <a> tag and expect it to work - SWF files behave as if they are on a layer of their own in most browsers.
If the animations are simple, convert them to .gifs and link these, otherwise I think you are going to need to edit the .fla
I dont think you are suffering from screen radiation sickness, your options actually are, I believe, quite limited
Asking the original creators to hyerlink inside the SWF is not an option, as the link is a dynamic DB URL:i.e. default.asp?product=2328098.
Is there no way to have an OnClick event on a div in this sense and have it perform the hyperlink? As mentioned,I tried doing a <div onlick=a href type link.. but there was no effect. Is there a way to set the Z-index of a DIV above the SWF file (if this is the problem)?
is it out of the question to have text and or a background image as a link above/below/left or right of the swf..? probably a crap solution I know, but I am not sure there is a straight answer.
Or just another thought (although it is messy) have you tried layering another (invisible background) swf over the top using CSS positioning and z-indexing - and put a link in there.... mmmn what a terrible messy idea :-(
Get the people who made the swf to add functionality so that the swf will except the URL as a variable, that way you wont need to edit the .fla and re-publish the swf, more importantly however the URL can be fed into the swf dynamically as the page loads
This is a very straight forward solution
I find it really strange that Flash completely supersedes any HTML on the page, in terms of interface-hierarchy.
Heres an idea; what about a transparent GIF over the SWF, with an imagemap clickable area?
Send it to your people....then have them put the standard pragma stuff in the first frame....#import..whatever.
In your code draw an invisible button the size of the visible movie with the appropriate methods on it for retrieving the proper link and applying it to the event actions of the drawn movie clip....
Make sure to stick the movie on a high layer and check to see that it is an empty layer also...
You don't have have to do anything except send new .as files to your people as you make changes...
There are so many ways to get the link into the swf...with xml being the best bet but getting in through the url works also...