TinyPortal

Development => Block Codes => Topic started by: rowedf on January 31, 2007, 05:32:39 PM

Title: .swf file into a block ?
Post by: rowedf on January 31, 2007, 05:32:39 PM
Yes, I have searched and have not found enough useful suggestions to get a .swf file (just button menu) to show in a block.  Any help would be much appreciated, thanks.
Title: Re: .swf file into a block ?
Post by: Lesmond on January 31, 2007, 05:44:56 PM
I found one here http://www.tinyportal.net/index.php?topic=5287.0 hope it helps :)
Title: Re: .swf file into a block ?
Post by: rowedf on January 31, 2007, 06:17:34 PM
That looks like its for a java script, I always thought you had to embed an .swf file ?
Title: Re: .swf file into a block ?
Post by: knat on January 31, 2007, 09:43:25 PM
You have to embed the file with javascript

i have this script in my block

<script type="text/javascript" src="swfobject.js"></script>
<div id="flashcontent">
<strong>Flash not installed</strong>
You dont have flash installed. Well to bad for you !
</div>

<script type="text/javascript">
// <![CDATA[

var so = new SWFObject("name_of_your_flash.swf", "name_of_your_flash", "290", "210", "8.0.23", "#FFFFFF", true);
so.addVariable("flashVarText", "this is passed in via FlashVars"); // this line is optional, but this example uses the variable and displays this text inside the flash movie
so.write("flashcontent");

// ]]>
</script>


and the attached file is in the root on my server.. This will fix the "you have to click the flash to activate the flash" bug that is in IE  ;)

fill in your fileinfo on this line: "name_of_your_flash.swf", "name_of_your_flash",

It works for me so maybe it will work for you to  ;)
Title: Re: .swf file into a block ?
Post by: rowedf on January 31, 2007, 11:12:40 PM
Thank you so much.  So your saying I HAVE to have the .swf file in my root?  I'm just a huge organizatoinal freak and hate doing that LOL.
Title: Re: .swf file into a block ?
Post by: IchBin on January 31, 2007, 11:41:51 PM
No you don't have to have the file there. As long as your path is pointing to the correct location you can put it anywhere in your site.
Title: Re: .swf file into a block ?
Post by: akulion on February 01, 2007, 10:06:48 AM
Also be sure to put the full path for the swfobject.js file

you may be wondering why use JS to embed flash?
Well because Adobe.com recommends it and insists upon it otherwise flash dosent work properly in IE and requires 1 extra click
Title: Re: .swf file into a block ?
Post by: JOSHSKORN on August 27, 2007, 07:05:11 AM
Can we get a simple tutorial on this?  I'm using flashbuttons.com to generate buttons.  Maybe someone can recommend something they've used that works.  Sorry if this double-posts.
Title: Re: .swf file into a block ?
Post by: IchBin on August 27, 2007, 05:22:45 PM
You take the html same code and put it into a scriptbox. There's no tutorial on it.