Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Data Integration / February 2006



Tip: Looking for answers? Try searching our database.

How do you add dynamic href's to .swf files

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
atom heart - 23 Feb 2006 17:19 GMT
In a tool we developed a simple wizard tool that generates code (links)
dynamically for over 1200 diferent entities.It can create text links, button
image links and banner ads. We use Java script to make the call to a .asp page
which goes to the data base for that specific link with the unique ID for one
of those 1200 users. This works fine for adding an href for an animated .gif
file but with flash files it has to be embedded into the movie. Is there a way
to create one flash /.swf file that can have the possiblity of being wrapped
with 1200 different links? Maybe use some sort of variables inside the file?
Anyone have any suggestions . . .
srisumeet - 25 Feb 2006 07:08 GMT
Yes, there is. First of all, I assume you have the button (as a movie symbol or
button) created by now. Also as for it's instance name lets put it as . Once
you've placed the dynBtn onto the main stage. Select the Layer->Frame->Actions
on which you've placed the button an put this code:

_root.dynBtn.onRelease = function() {
    getURL( _root.btnURL);
}

Now there's only one more thing to do in the ASP/HTML file of yours were you
have to embed this as SWF. Again i assume you must know how to publish the swf
and put it's code on to your web page. Further we need to have one <PARAM> tag
added to the earlier/default ones.

<PARAM name="flashvars value="btnURL=<%= aspDynamicallyFetchedURLVariable %>"
/>

Include this anywhere in between the opening <OBJECT> and <EMBED> tag and
further this will filter on to the flash button's action. Hope this helps you
out.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.