Welcome to WebmasterWorld Guest from 54.196.147.57

Forum Moderators: not2easy

Message Too Old, No Replies

Hyperlink a .SWF

     

flyerguy

4:21 pm on Apr 14, 2006 (gmt 0)

10+ Year Member



This may be an incredibly dumb question, but I can't for the life of me figure this out:

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!

zackattack

5:04 pm on Apr 14, 2006 (gmt 0)

10+ Year Member



Hi

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

ZA

flyerguy

5:16 pm on Apr 14, 2006 (gmt 0)

10+ Year Member



The .swf's are small previews of for-sale MPJEG and MOV files, so it's important that they are not just static GIF's: they are the product preview.

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)?

thanks

zackattack

6:08 pm on Apr 14, 2006 (gmt 0)

10+ Year Member



Unfortunatley you cant get any div above the layer of the swf - belive me I have tried this before

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 :-(

ZA

zackattack

6:15 pm on Apr 14, 2006 (gmt 0)

10+ Year Member



Um actually just re-read your last post - you can use dymanic links..

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

ZA

flyerguy

3:48 pm on Apr 17, 2006 (gmt 0)

10+ Year Member



Well I understand how to make a dynamic link in a SWF but I doubt most of my participants have such knowledge.. or even desire to learn how. :)

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?

markanthony

5:07 pm on Apr 21, 2006 (gmt 0)

10+ Year Member



Write your dynamic link code in a .as file......

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...

 

Featured Threads

Hot Threads This Week

Hot Threads This Month