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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I pass input to a Flash movie? 1

Status
Not open for further replies.

tekdeth

Programmer
Feb 1, 2001
3
US
I am currently making flash banners for a website. I want to have a user be able to click on a flash banner and then jump to another url.

The problem I run into is that I want to be able to use the same banner on different pages to link to different pages.

I tried wrapping the flash movie within an anchor tag but that did not work. I then made a link symbol within the movie except the URL must be static there.

I know flash has the ability to read in a file that contains variables. I want to stay away from that to make it easier for my customers to maintain the banners.

So my question is is it possible to pass in a URL from the html code?
 
hi

If all your pages/banners are kept on the same server you could load variables from a text file containing:

1=" etc,etc

Then, load these variables into your banner and have the banner link action as:

getURL: random(4+1) (set to expression and assuming 5 different links) (and I'm writing blind so I don't know if this syntax is spot-on)

This method assumes that you want the link to be random, so oI don't know if it will help you exactly, but it's worth a try anyway.

Hope it helps
dD davdesign@hotmail.com

^^^^^^^^^^^^^^^^
 
Our site has a associate program. People place banners on their site and if a customer comes to our site through their banner we compensate them.

The way it currently works is like this......

<a href=&quot; src=&quot;banners/A.gif&quot; width=&quot;480&quot; height=&quot;60&quot; border=&quot;0&quot;><;/a>

I want the new banner code to look like this......

<EMBED
src='loop='true'
quality='high'
bgcolor='#000000'
WIDTH='468'
HEIGHT='60'
TYPE='application/x-shockwave-flash' PLUGINSPAGE='
But I need to somehow get the flashbanner to link to like in the first example.

The constraints of the design are:
I need to create HTML code dynamically depending on the associate.
I need to make it easy for them to cut and paste
It needs to be backwards compatable with our old system.

Thanks for help BTW.

-Jerry
 
I think that what you are looking to do is this:

Place this code in your typical html embed flash movie
<param name=movie
value=getURL.swf?page=
the important part is after the question mark. that is where you are passing the movie the page to go to. You are assigning it to the variable &quot;page&quot;

in your flash code your &quot;on release&quot; action should look like this:
on (release) {
mypage = page;
getURL (mypage, &quot;_blank&quot;);}

&quot;mypage&quot; is recieving the input of the &quot;page variable&quot;
and is then passed to the getURL action.

I think you can even skip the step of assigning &quot;page&quot; to &quot;mypage&quot; and pass &quot;page&quot; straight into the getURL parameters.

To change the link all you need to do is change the address after the question mark in the &quot;value=&quot; part of the html.

I hope this helps
 
Oh my God!!!! Thank you so much that worked!!!

Woo Hoo!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top