PDA

View Full Version : Using Flash in Templates


tdPhil
04-23-2008, 10:01 AM
If I edit a template in Dreamweaver that has some Flash Media on it - the media just appears as a white empty box on the other pages linked to the template.

The only way I can get around it is if I make my graphics as "Editable". But this makes it pointless having a template as I have to edit every other page I whenever I change the graphics.

Can you use Flash in a template or does it completely screw it up?

Anyone else have this problem or know how to fix it? I've watched a few tutorial vids but they don't seem to explain this bit.

Cheers if you can help,
Phil

Ricky55
04-23-2008, 11:04 AM
I've just run a quick test and they work fine for me with Dreamweaver CS3.

I think the most likely thing is that the links to either the flash swf or the script file that embeds the swf file has been broken.

When you first saved the template went it asked you to update links did you click yes?

Just have a look at the code on one of your pages, look at the grey code thats frozen and just take a look at the path the code is using to find the swf and the script file. The path should be correct to find the swf and the script file from where ever the template is saved.

So if you have your template in a folder called templates and your swf in the root of your site the path would be ../test.swf and the path to the script would be ../Scripts/AC_RunActiveContent.js assuming that the script is where Dreamweaver puts them by default in a folder called scripts.

This does work so just check out these things.

Ricky55
04-23-2008, 11:08 AM
Although why cant the swf be editable anyway?

If all the pages are referring to the same swf they would just update automatically. Or am I missing something.

tdPhil
04-23-2008, 01:11 PM
That's true. Only problem is if I need to resize the graphics of completely change them I will have to do it for every page.

I'll have a look at the code later to see if this resolves the problem.

Thanks

johnregan
04-23-2008, 03:49 PM
I am experiencing the same problem with Flash not working in my template if I make a change. I dont think it can be related to where the file is in the directory as i created a new template just inserting a flash file and nothing else, when i applied this template to a page and previewed it I could see my .swf no problem. When i then went back into my template and added just an "x" resaved my template, updated my page and previewed it, the .swf changed into a white box?????

I would have assumed that if either the flash swf or the script file that embeds the swf file has been broken it wouldn't work at all, not work when first made and then as soon as I make a change to the template it stops working.

Any Ideas???

johnregan
04-23-2008, 05:55 PM
Hi all, we've manage to sus the problem out!!! If you open Dreamweaver, go to edit; preferences then to code re-writing and at the bottom there are 2 boxes under active content, these need to de-selected. Phew!!! :lol: