Hi, I'm also having similar problems, but the embed doesnt seem to do
anything for me.. I have several flash image which i need to
dynamically load, and i have the following js function:

function imgSwap(type, file)
{
        if(type == 'Photo')
        {
                document.getElementById('villa_img').innerHTML = '<img 
src="/img/
uploads/villas/' + file + '" alt="" />';
        }

        if(type == 'Panorama')
        {
                var so = new SWFObject("/img/uploads/panoramas/" + file, file,
"254", "198", "8");
                so.addParam("scale", "noscale");
                so.write("villa_img");
        }
}

It seems to be doing something as a flash box of the above dimensions
appears, whith a black background, but the flash just doesnt seem to
load. When using the embedSWF, nothing seems to happen at all when i
click on the link... any ideas what I am doing wrong here?

Thanks

Patrick


On May 15, 5:39 am, alxlevin <[EMAIL PROTECTED]> wrote:
> Success!  The problem was twofold.  First, for whatever reason, I had
> to use the embedSWF command instead of setting up a newSWFObject.
> Second, the path to the swf file had to be a more fully qualified
> path.  I'm including my working code below.  Hopefully it will help
> someone else with a similar problem.  Thanks to everyone who helped me
> with this one.
>
> echo $javascript->codeBlock("
>
>    swfobject.embedSWF('/pickme/app/webroot/_swf/test.swf',
> 'myContent', '300', '120', '9.0.0');
>
> ");
>
> On May 14, 5:21 pm, alxlevin <[EMAIL PROTECTED]> wrote:
>
> > Clark, what should it be there?  That would certainly explain things
> > if the path is incorrect.
>
> > Jonathon, I've set the safe parameter to false in the javascript
> > codeblock call and that made no difference.
>
> > On May 14, 5:18 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> > wrote:
>
> > > pickme/index.php/_swf/test.swf' <-- that's not right
>
> > > On May 14, 5:01 pm, alxlevin <[EMAIL PROTECTED]> wrote:
>
> > > > I appreciate the help as I'm pretty stumped on this one.  Firebug
> > > > doesn't seem to give any errors.  As far as I can tell, the js file is
> > > > correctly being loaded (I can see the code in Firebug).  Here's what
> > > > the javascript parts come out to in the source:
>
> > > > <script type="text/javascript">
>
> > > > //<![CDATA[
>
> > > >  var so = newSWFObject('/pickme/index.php/_swf/test.swf',
> > > > 'myContent', '300', '120', '6');
> > > >  so.write('myContent');
>
> > > > //]]>
>
> > > > </script>
>
> > > > As far as I can tell, that path looks correct.  There isn't anything
> > > > in Cake that I need to set to enable Flash?  Anything on the webserver
> > > > (IIS)?
>
> > > > On May 14, 4:51 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> > > > wrote:
>
> > > > > that probably doesn't have anything at all to do with cake
>
> > > > > check your HTML source and see if / is indeed your web root; look at
> > > > > how the URLs for your CSS and JS file are getting written, and if they
> > > > > are actually being loaded
>
> > > > > also install FireBug for Firefox and see if you're getting any
> > > > > Javascript errors
>
> > > > > On May 14, 4:41 pm, alxlevin <[EMAIL PROTECTED]> wrote:
>
> > > > > > Hi.  I'm trying to use CakePHP with Flash and can't seem to actually
> > > > > > get the movie to appear.  I'm trying to use theswfobjectand have
> > > > > > some pretty simple code which isn't working.  I'm sure I'm missing
> > > > > > something simple.  I have the swf file located in webroot/_swf/.  
> > > > > > Any
> > > > > > help would be greatly appreciated.
>
> > > > > > <?php
> > > > > > echo $javascript->link('swfobject.js', false);
> > > > > > ?>
>
> > > > > > <div id="myContent"></div>
> > > > > > <?php
> > > > > > echo $javascript->codeBlock("
> > > > > >     var so = newSWFObject('".$html->url('/_swf/test.swf')."',
> > > > > > 'myContent', '300', '120', '6');
> > > > > >     so.write('myContent');
> > > > > > ");
> > > > > > ?>- Hide quoted text -
>
> > > > > - Show quoted text -- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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