Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-10-31 14:29:50

wii
Member
Registered: 2005-05-08
Posts: 77

Insert Flash code ?

Hi, except for the option to insert flash using iframes, how can I insert Flash code that validates ? Like this:

<div id=“flashcontent”> <h1>Oops!</h1> <p>It looks like you don’t have flash player 6 installed. <a href=“http://www.macromedia.com/go/getflashplayer” >Click here</a> to go to Macromedia download page. </p>
</div>
<script type=“text/javascript”> var so = new SWFObject(“flashGallery.swf”, “gallery”, “100%”, “100%”, “6”, “#FFFFFF”);

// by default gallery will look in same directory for setup.xml(setupfile) and flashGallery.php(scriptpath) // you can change these defaults by uncommenting and defining the variables below. Very useful for testing locally. //so.addVariable(“setupfile”, “http://yourdomain.com/setup.xml”); //so.addVariable(“scriptpath”, “http://yourdomain.com/flashGallery.php”); //so.addVariable(“gallerypath”, “http://yourdomain.com/images/”); so.write(“flashcontent”); </script>

Offline

#2 2006-10-31 14:56:30

Walker
Plugin Author
From: Boston, MA
Registered: 2004-02-24
Posts: 592
Website

Re: Insert Flash code ?

Have you considered using UFO or SWFObject? I see that you’re trying to use SWFObject in the code shown above. Is this true?

They’re both really nice libraries that auto-detect flash and them either embed the flash movie or show alternate content.

Offline

#3 2006-10-31 15:03:10

wii
Member
Registered: 2005-05-08
Posts: 77

Re: Insert Flash code ?

Yes, the code above works fine, but textpattern won´t allow me to use this code in an article, how can I do this ? The only way I see now is to include the code in the template, not the article itself.

Offline

#4 2006-10-31 16:24:30

Walker
Plugin Author
From: Boston, MA
Registered: 2004-02-24
Posts: 592
Website

Re: Insert Flash code ?

Yeah, the other thing you might want to check for would be a plugin that enables use within articles. That would work….I think I even saw that someone had written one for SWFObject already.

Offline

Board footer

Powered by FluxBB