Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

layer on top of a flash movie

Status
Not open for further replies.

MJB3K

Programmer
Jul 16, 2004
524
GB
Hi, i have a flash movie and want to put a layer about it so you can click the layer and it goes to another url.

How would i do this??

-------DIV LAYER-------- << clickable to another url.
------FLASH MOVIE------ << still visible underneath

any ideas??

Regards,

Martin

Computing Help And Info:
 
Why not put a button in the flash movie?

Make a large square over the whole movie.
Make it a MovieClip
Set a getURL action on it
Make it invisible (set it's Alpha to 0)

Job done.

Foamcow Heavy Industries - Web design and ranting
Target Marketing Communications - Advertising, Direct Marketing and Public Relations
I wonder what possesses people to make those animated gifs. Do you just get up in the morning and think, "You know what web design r
 
I don't want a button in the movie because i will be loading the link urls from a mysql db and want a layer over the top so i can easily edit the link url.

Any ideas??

Regards,

Martin

Computing Help And Info:
 
You can get the button's actual link URL from a parameter passed when embedding the flash movie.

I did something similar here


See the little "hear sample" thingies?
They are flash elements. But there is only 1 flash movie for the whole site.

If you look at the code I call the swf like so

Code:
<object type="application/x-shockwave-flash" data="[b]audioPlayer.swf?trackName=i_found_lovin.mp3[/b]" width="64" height="32">
			<param name="movie" value="[b]audioPlayer.swf?trackName=i_found_lovin.mp3[/b]" />
			<param name="loop" value="false" />
			<param name="wmode" value="transparent" />
</object>



What happens is that my audioplayer.swf contains some actionscript that will stream the mp3 file with the filename passed to it in the URL parameter, "trackName".

So if I were to do something with a link button, I might call the swf like this

Code:
mymovie.swf?link=coolPage.html

and the actionscript on the overlay button might look like this

Code:
on (release){
 getURL(link)
}

So whenever I click the button in the flash movie it loads the page defined in the parameter used when embedding it!

So you can have just one flash movie and call it with a different URL each time you embed the movie into your page.

Foamcow Heavy Industries - Web design and ranting
Target Marketing Communications - Advertising, Direct Marketing and Public Relations
I wonder what possesses people to make those animated gifs. Do you just get up in the morning and think, "You know what web design r
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top