Page 1 of 1
					
				Insert .swf with HTML?
				Posted: Fri Dec 10, 2004 6:02 am
				by 2ner
				Does anybody know if it is possible to put the .swf file exported from Moho into a web page with simple HTML code?
			 
			
					
				
				Posted: Fri Dec 10, 2004 6:13 am
				by jahnocli
				it's really easy. Publish a swf export from Flash, and then adapt it for your movie. If you haven't got Flash (Macromedia do a 30-day trial anyway), I can email you the code, or put it up here. It's very obvious what everything is, and what variables you need to change.
Jah
			 
			
					
				
				Posted: Fri Dec 10, 2004 6:37 am
				by JohnO
				Try something like this:
Code: Select all
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="100" height="100" title="A Flash Movie Made With Moho">
   <param name="movie" value="../relative_path/your_movie.swf" />
   <param name="quality" value="autolow" />
   <param name="wmode" value="transparent" />
   <embed src="../relative_path/your_movie.swf" width="100" height="100" quality="autolow" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"></embed>
</object>
Using both the 'object' and 'embed' tags should keep things cool for older browsers. Most of the parameters should be self explanatory, but here are a couple that you may need to tweak:
wmode... sets the display window type for the flash movie. options are 'opaque', transparent' or 'window'.
quality... sets the playback quality. options are 'low', 'medium', 'high', 'autolow', 'autohigh' and 'best'.
 
			 
			
					
				
				Posted: Fri Dec 10, 2004 7:04 am
				by jahnocli
				...there you go...
			 
			
					
				
				Posted: Fri Dec 10, 2004 11:05 am
				by 2ner
				That's great! Thanks a lot. I was hoping it would be that simple.
So it actually goes to macromedia and dowloads the player? I thought the plugin was already in the browser.
I suppose there is a loop parameter?
			 
			
					
				
				Posted: Fri Dec 10, 2004 2:46 pm
				by JohnO
				The <object> 'codebase' and <embed> 'pluginspace' attributes identify where the browser can find the activex control and plugin respectively. They are not downloaded unless they are required - either because they are not already installed or the movie needs a newer player than the one currently installed.
Yup, there's a 'loop' attribute which can be either 'true' or 'false' for both the <object> and <embed> tags. The default value is 'true' so you don't generally need to include it.
John O
			 
			
					
				
				Posted: Mon Dec 13, 2004 5:46 am
				by 2ner
				That code works fine JohnO. I don't have a website yet, but it works well on my system. Is there a way to play it forward then backward and keep looping like that?
			 
			
					
				
				Posted: Mon Dec 13, 2004 8:28 am
				by JohnO
				'Fraid not. You'll have to build the SWF file to do that for you, which can be difficult if you don't have Flash.  

 
			 
			
					
				
				Posted: Mon Dec 13, 2004 8:45 am
				by 2ner
				That's ok, I could do it in Moho. I just noticed it was an option in an animated gif program I was looking at so I thought there might be a toggle for it. I've never played with flash before. It's pretty slick.
Thanks for the help.