TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

May 18, 2024, 01:23:28 AM

Login with username, password and session length
Members
  • Total Members: 3,886
  • Latest: Grendor
Stats
  • Total Posts: 195,189
  • Total Topics: 21,220
  • Online today: 107
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 57
  • Total: 57

.swf file into a block ?

Started by rowedf, January 31, 2007, 05:32:39 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

rowedf

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.

Lesmond


rowedf

That looks like its for a java script, I always thought you had to embed an .swf file ?

knat

#3
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  ;)

rowedf

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.

IchBin

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.

akulion

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

JOSHSKORN

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.

IchBin

You take the html same code and put it into a scriptbox. There's no tutorial on it.