Hi keymaster...

This is due to how flash loads relative URLs. When embedded into html,
flash loads urls relative to the HTML, not the swf file. If you load
the swf directly, it IS relative to the swf file.

So if you embed a swf in the page "/products/view/1", and then from
that flash movie you load "movie2.swf", it will try to find it in "/
products/view/movie2.swf".

I always use load relative urls starting from root (ie. "/swf/
movie2swf") so this is never a problem.

In addition, if you haven't already installed Firebug, do it now
because you can see what URLs it is trying to load, and will tell you
if you get a 404 because of an incorrect path (and show you the path!)

Hope this helps,
Adam

On Oct 26, 12:32 am, keymaster <[EMAIL PROTECTED]> wrote:
> Thank you both for your replies.
>
> When I manually type this url directly into the browser address bar,
> the flash file loads, gets all the other files it needs, and works
> fine:
>
> http://localhost/cake/img/INDEX.SWF
>
> where, the .swf files are located in:
> /cake/app/webroot/img/
>
> However, when I use the following html in my layout, the flash file
> does not load at all:
>
> <OBJECT classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000
>                 codeBase=http://active.macromedia.com/flash2/cabs/
> swflash.cab#version=4,0,0,0
>                 id=index name=index width="100%" height="500">
>                   <param name="_cx" value="24262">
>                   <param name="_cy" value="1344269">
>                   <param name="Movie" value="INDEX.SWF"">
>                   <param name="Src" value="INDEX.SWF">
>                   <param name="WMode" value="Window">
>                   <param name="Play" value="1">
>                   <param name="Loop" value="-1">
>                   <param name="Quality" value="High">
>                   <param name="SAlign" value="L">
>                   <param name=menu value=true>
>                   <param name="Base" value="http://localhost/cake/img/";>
>                   <param name="Scale" value="ExactFit">
>                   <param name="DeviceFont" value="0">
>
>                   <param name="EmbedMovie" value="0">
>                   <param name="BGColor" value="#ffffff">
>                   <param name="SWRemote" value>
>                   <embed base="http://localhost/cake/img/"; src="INDEX.SWF"
> quality="high" scale="exactfit" salign="L" bgcolor="#ffffff"
> WIDTH="780" HEIGHT="418" NAME="index" TYPE="application/x-shockwave-
> flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/
> index.cgi?P1_Prod_Version=ShockwaveFlash">
>         </OBJECT>
>
> Would anyone have an idea why manually typing the url into the browser
> address bar brings up the .swf, but this html doesn't?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to