Re: flash files which load other flash files

2007-10-25 Thread Adam Royle

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:
>
>  codeBase=http://active.macromedia.com/flash2/cabs/
> swflash.cab#version=4,0,0,0
> id=index name=index width="100%" height="500">
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   http://localhost/cake/img/";>
>   
>   
>
>   
>   
>   
>   http://localhost/cake/img/"; src="INDEX.SWF"
> quality="high" scale="exactfit" salign="L" bgcolor="#ff"
> WIDTH="780" HEIGHT="418" NAME="index" TYPE="application/x-shockwave-
> flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/
> index.cgi?P1_Prod_Version=ShockwaveFlash">
> 
>
> 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
-~--~~~~--~~--~--~---



Re: flash files which load other flash files

2007-10-25 Thread keymaster

Managed to find the problem. Will document it here for those that
follow. Thanks to all who helped.

The way I figured out what was going on, was by looking at the apache
server access logs, and seeing what url was being generated to load
the original flash file, as well as the subsequent urls generated for
the remaining files.

In my case the server was receiving:

/cake/INDEX.SWF for the original flash file

and was logging a 404 error.

I immediately understood the problem and changed the INDEX.SWF to  img/
INDEX.SWF. It still didn't work, so I defined the base vars as Martin
suggested, and that did it.

For those interested, here is the full working html, where all
the .swf files are in cake/app/webroot/img/:

http://active.macromedia.com/flash2/cabs/
swflash.cab#version=4,0,0,0
id=index name=index width="100%" height="50807">
  
  
  
  

  
  
  
  
  
  
  http://localhost/cake/img/";>
  
  

  
  
  
  http://localhost/cake/img/"; src="img/INDEX.SWF"
quality="high" scale="exactfit" salign="L" bgcolor="#ff"
WIDTH="780" HEIGHT="418" NAME="index" TYPE="application/x-shockwave-
flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/
index.cgi?P1_Prod_Version=ShockwaveFlash">
  

Thanks to those who took the time to help.

Hope this helps someone else.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: flash files which load other flash files

2007-10-25 Thread keymaster

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:

http://active.macromedia.com/flash2/cabs/
swflash.cab#version=4,0,0,0
id=index name=index width="100%" height="500">
  
  
  
  
  
  
  
  
  
  
  http://localhost/cake/img/";>
  
  

  
  
  
  http://localhost/cake/img/"; src="INDEX.SWF"
quality="high" scale="exactfit" salign="L" bgcolor="#ff"
WIDTH="780" HEIGHT="418" NAME="index" TYPE="application/x-shockwave-
flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/
index.cgi?P1_Prod_Version=ShockwaveFlash">


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
-~--~~~~--~~--~--~---



Re: flash files which load other flash files

2007-10-24 Thread Martin Wood-Mitrovski

you can set a parameter for the flash movie so it knows what its base url is.

like this :

" />

also set the "base" attribute on the embed tag to the same

here's the Adobe technote :

http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_04157&sliceId=1

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



RE: flash files which load other flash files

2007-10-24 Thread Paul Webster

Can you just not use absolute urls? /img/swf/menu.swf
Or if they need to be configurable pass them in as flash vars or xml?
There are plenty of quick web tut's out there showing how to do such things.



-Original Message-
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of keymaster
Sent: Thursday, 25 October 2007 6:54 a.m.
To: Cake PHP
Subject: flash files which load other flash files


On our cake site which is nearly finished, our graphics/flash
designer  has created a beautiful flash-based intro.

Normally, I have no problems embedding flash files into cake. I have
done it many times before by placing them in a subdirectory within the
cake webroot and then referencing  $this->webroot within the 
tag, like so:

" />

This time however, I received an unpleasant surprise.

The flash designer decided to do things more "efficiently" to save
load time, and he broke up his flash intro into multiple flash files,
where there is one "main" .swf which, once loaded into the browser,
requests the others as needed.

Great idea, but...

How do I get the main .swf to generate the correct cake urls?

All my .swf's are sitting in webroot/img/swf/.

I know the main .swf needs to generate an url of:

http://domain.com/img/swf/filename.swf

Our flash designer is only an artist type, not a flash developer/
programmer. I am also not a flash programmer just a well-meaning PHP/
MySQL type.

Is there any way out of this ?

I thought perhaps of the following possibilities:
1. have the flash designer combine everything into a single flash file
(but it will take much longer to load).
2. have the flash designer hardcode the cake urls of the several dozen
flash files into his main swf (lots of work and nonportable)
3. (don't know if this will work) make the cake webroot the same as
the site root so the urls will be the same (?)

Is there any simple way to do this?





__ NOD32 2611 (20071023) Information __

This message was checked by NOD32 antivirus system.
http://www.eset.com



--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



flash files which load other flash files

2007-10-24 Thread keymaster

On our cake site which is nearly finished, our graphics/flash
designer  has created a beautiful flash-based intro.

Normally, I have no problems embedding flash files into cake. I have
done it many times before by placing them in a subdirectory within the
cake webroot and then referencing  $this->webroot within the 
tag, like so:

" />

This time however, I received an unpleasant surprise.

The flash designer decided to do things more "efficiently" to save
load time, and he broke up his flash intro into multiple flash files,
where there is one "main" .swf which, once loaded into the browser,
requests the others as needed.

Great idea, but...

How do I get the main .swf to generate the correct cake urls?

All my .swf's are sitting in webroot/img/swf/.

I know the main .swf needs to generate an url of:

http://domain.com/img/swf/filename.swf

Our flash designer is only an artist type, not a flash developer/
programmer. I am also not a flash programmer just a well-meaning PHP/
MySQL type.

Is there any way out of this ?

I thought perhaps of the following possibilities:
1. have the flash designer combine everything into a single flash file
(but it will take much longer to load).
2. have the flash designer hardcode the cake urls of the several dozen
flash files into his main swf (lots of work and nonportable)
3. (don't know if this will work) make the cake webroot the same as
the site root so the urls will be the same (?)

Is there any simple way to do this?


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---