GetSimple Support Forum

Full Version: Insert flash file
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello!!.

I want to insert a flash file in a page, but only in one page.
if I put the code to insert a flash in the template file, I get on every page.
How must i to do it?

Thanks and regards.
Duplicate your template.php and rename your copy to template_flash.php and insert your flash thing.
Now in edit page option select your template_flash.php under Template for the page you want have the flash.
And it will show only on the one page.
Thanks Rich.
Now, the page works ok... Smile
hi, i'm having a problem actually getting my flash applications to point files required for them to function,i need to point my flash object to a xml settings file and to some audio files.

my theme is in
getsimple/themes/mytheme/
and my files are in
getsimple/themes/mytheme/flashfiles/

i can't seem to point my flash object to those files.
my flash object takes this information in the form of variables declared and assigned in a swfobject javascript declaration

example:

flashvars.pathToFiles = "flashfiles/";
flashvars.settingsPath = "xml/settings.xml";
flashvars.xmlPath = "xml/mp3_player.xml";

xml folder is located within flash files folder

this object does work in regular html page but not in my getsimple template.

any suggestions?

thanks a lot! Smile
When a theme file is read your browser is not actually in the theme folder. So if you write "flashfiles/" but your browser is at the homepage http://example.ms/ it is going to check the folder http://example.ms/flashfiles/ and not your theme folder.

You will have to link to the folder in the same way as you link to a stylesheet and everything else, by telling it to look in the theme folder:
Code:
flashvars.pathToFiles = "<?php get_theme_url(); ?>/flashfiles/";
Zegnåt Wrote:When a theme file is read your browser is not actually in the theme folder. So if you write "flashfiles/" but your browser is at the homepage http://example.ms/ it is going to check the folder http://example.ms/flashfiles/ and not your theme folder.

You will have to link to the folder in the same way as you link to a stylesheet and everything else, by telling it to look in the theme folder:
Code:
flashvars.pathToFiles = "<?php get_theme_url(); ?>/flashfiles/";

-----------
Thanks, i'll give it a try when i get back to my pc
thanks!! i got it to work! actually ended up just moving my flash in to the root and out of the theme folder,but it only made sense after your explanation, thanks a lot!
Hi,

I am having problems with a flash file - it refuses to play! The file, when invoked plays OK: www.cambridgetouringtheatre.co.uk/data/uploads/CTT_2010.swf.

The code to call this used to be:
<p class="showreel">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="380" height="264" id="CTT_2010" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="<?php get_site_url(); ?>data/uploads/CTT_2010.swf" /><param name="quality" value="high" /><param name="autoPlay" value="false" /><param name="bgcolor" value="#ffffff" /><embed src="<?php get_site_url(); ?>data/uploads/CTT_2010.swf" quality="high" bgcolor="#ffffff" width="380" height="264" name="<?php get_site_url(); ?>/data/uploads/CTT_2010" align="middle" autoPlay="false" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</p>

I have had to remove this from the main website as per client instructions. It was embedded into a component called from various templates in the site, I have tried it from the page itself - same result.

Any ideas about what to look into? I have tried this with IE, FF and Chrome, same result. Flash is clearly working in the browsers as the call to the SWF file works, but not when embedded in a GETSimple XML file ...?

Many thanks
Does it play when you replace the <?php get_site_url(); ?> calls and just put in the full URL for the SWF file?

There are also a couple of typos:

<?php get_site_url(); ?> should be follwoed by a "/"

Code:
<p class="showreel">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="380" height="264" id="CTT_2010" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="<?php get_site_url(); ?>/data/uploads/CTT_2010.swf" /><param name="quality" value="high" /><param name="autoPlay" value="false" /><param name="bgcolor" value="#ffffff" /><embed src="<?php get_site_url(); ?>/data/uploads/CTT_2010.swf" quality="high" bgcolor="#ffffff" width="380" height="264" name="<?php get_site_url(); ?>/data/uploads/CTT_2010.swf" align="middle" autoPlay="false" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</p>
Thanks, that seems to ahve fixed it ... I went back to the orignal HTML file generated by FLASH, chanegd the path appropriately and it is now playing .... it's usually something simple :0

Thanks for the pointer.