View Full Version : flash swf file
tesscm
09-04-2002, 03:02 PM
Is it possible to insert a swf file into html, and have it link to a url , as if it were a gif. Also using flash, can you add a link to a swf file? Can you take a swf file and get a fla file from it or is only the opposite true: a swf file is the end product of a fla file?
ACJavascript
09-04-2002, 04:54 PM
I only know the answer to a couple of those questions hehe, sorry:D:D..
1) you implement swf files into html like so....
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="400" height="600">
<param name=movie value="intro.swf">
<param name=quality value=high>
<embed src="intro.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="400" height="600">
</embed>
</object>
Were it is bold face is were you put your Flash.swf.
To make it a link you would do this.
<a href="Whereever.html">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="400" height="600">
<param name=movie value="intro.swf">
<param name=quality value=high>
<embed src="intro.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="400" height="600">
</embed>
</object> </a>
Hope this helps :D:D
whackaxe
09-04-2002, 06:02 PM
instead of copying the code supplied by AC just go to file, publish(or edit, whatever) and select HTML and take the code from the HTML generated. for links you can make a transparent button over the whole stage or use the a href tag like AC has (but i dont know if that works). no you cant do swf -> fla you can only fla -> swf because flash is like C++, for example, when you publish it compiles and compresses a fla into a swf so that you cant view the source and reduce the size. you can also password protect the swf if you like but people can easily get a flash file cracker and import it into there movie (cept they can edi it as much as a fla)
hope that helps
codewarrior
09-04-2002, 06:32 PM
There is an option inside Flash that would let you put in url in flash file's property.
tesscm
09-04-2002, 07:04 PM
I tried both of the suggestions that were mentioned. However, in both cases, when I tried to click on the flash image, although the url showed in the status bar, the flash movie kept on playing and nothing happened. There was not even a "hand" when I moused over the flash image, but just the usual pointer. I was optimistic about the layer suggestion, but the same thing happened there.
As far as the last suggestion, how can I get into the swf file to add the url? I do not have the fla file. It seems to me that the swf is a finished product, and no changes can be made to it.
whackaxe
09-04-2002, 07:28 PM
noone was saying anything about a layer? i said a button! what you do is you create a new symbole type:button and then in the last frame named "hit" you put a big green(or any color that takes your fancy as long as it isnt transparent) and draw a big square. that is sure to take up the whole stage. then put that button on the stage and use actionscript on the button element to adapt it for your navigation needs
oracleguy
09-05-2002, 12:45 AM
Originally posted by whackaxe
noone was saying anything about a layer? i said a button! what you do is you create a new symbole type:button and then in the last frame named "hit" you put a big green(or any color that takes your fancy as long as it isnt transparent) and draw a big square. that is sure to take up the whole stage. then put that button on the stage and use actionscript on the button element to adapt it for your navigation needs
It sounds like he doesn't have the fla to edit just the swf file.
tesscm
09-05-2002, 09:14 AM
Thank you Whackaxe and Oracleguy. I only have the swf file, and I believe nothing can be added to it in flash. What I was trying to do, using Dreamweaver and html ,is to make the swf function like a gif. I thought adding a transparent button (gif) in a layer over it would work. You would click on that transparent button that links to the url.And the user thinks he's clicking on the flash swf.
However, this did not work as of yet. thanks for any suggestions.Here is my code:
<div id="Layer1" style="position:absolute; width:200px; height:115px; z-index:2"><a href="contentaza.htm"><img src="clear.gif" width="468" height="60" border="0"></a></div>
<div id="Layer2" style="position:absolute; width:200px; height:115px; z-index:1">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="468" height="60">
<param name=movie value="AishBanner.swf">
<param name=quality value=high>
<embed src="AishBanner.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="468" height="60">
</embed>
</object> </div>
brothercake
09-05-2002, 05:13 PM
I would say your best bet is if you can edit the flash movie - there are programs out there that can reverse-engineer SWF files - http://www.flashguru.co.uk/000122.php might be a good palce to start.
Once you have that there's a method in actionscript called getURL; generically it looks like this:
getURL("http://www.domain.com/page.html");
you can also use it to execute JS statements using the javascript: pseudo protocol
getURL("javascript:functionName(arguments)");
see http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary353.html for more info
oracleguy
09-06-2002, 05:36 AM
Your layers idea may work its just you gotta get the flash movie in the background. Refer to the parameter that is discussed in this thread: http://www.codingforums.com/showthread.php?s=&threadid=5536
tesscm
09-08-2002, 08:12 PM
Your suggestion worked. The addition of the following param did the trick.
<param name='wmode' value='transparent'>
Thanks again!
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.