1. Use cakephp to do this dirty work!
2. Use $html->url() to create your urls... it will create true
absolute urls, even if your cake app is a few levels deep.

eg.

use this as your controller/action path to send to flash

echo $html->url('/images/getImagesForFlash/');

and then in your getImagesForFlash view, using something like this:

&myimg=<?php echo $html->url('/files/images/myimgname.jpg') ?>

Obviously this is very rough since I don't know what models and output
format you're using, etc, but should give you an idea.

Cheers,
Adam

On Aug 18, 9:49 pm, Pettor <[EMAIL PROTECTED]> wrote:
> Hi, i have a strange problem with a Flash script and CakePHP.
>
> The Flash load images from paths that the database keeps. Because i
> have no clue how to make Flash work togheter with the CakePHP
> framework i wrote a simple read.php file that just connects to the
> database, grabs the paths and prints them. The Flash file use the
> command :"loadVariables("read.php", target_mc);" to fetch the paths
> thats been written by the read.php file into the variable target_mc.
> The read.php file is put in the same folder as the Flash file to make
> it work (the folder is webroot/flash/).
>
> However if i run the Flash file (.swf) by opening it from it's folder
> in webroot/flash/ it works fine. But now i started using CakePHP and
> all this webroot stuff is happening. So when i open the index.php,
> with the flash file attached to it, it doesn't load from the read.php
> because it can't find it. If i in the Flash file use an absolute path
> in the command loadVariables it works fine. The problem is that by
> doing this i have to know the path system on the server the file will
> finally be put on and i can't know that. So i must use a relative path
> and just can't get it to work.
>
> Any tips? Thanks for any help!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
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