swfobject doesn't have a built-in redirect. your code won't work.
if you don't plan on using alternate content and decide to redirect users,
you have to do it with javascript:
if(swfobject.hasFlashPlayerVersion("8.0.0")){
swfobject.embedSWF...
} else {
window.location = "http://www.google.com";
}
however i suggest you stick to swfobject.embedSWF() as described in the
swfobject 2.2 documentation. use expressinstall and proper fallback content.
http://code.google.com/p/swfobject/wiki/documentation
- philip
On Fri, Sep 4, 2009 at 8:11 PM, unsustainableDesign <
[email protected]> wrote:
>
> Alright so I update swfObject and below is my code.
> Both Alerts work as expected. Do I have the correct code for the
> redirect? I have tried a few variations but can't seem to find the
> correct code.
> Any help would be great.
>
>
> <script type="text/javascript" src="http://austenmenges.com/js/
> swfobject.js <http://austenmenges.com/js/%0Aswfobject.js>"></script>
>
> <script type="text/javascript">
> if(swfobject.hasFlashPlayerVersion("8.0.0")){
> alert("I have flash");
>
> } else {
> alert("get flash");
> //so.setAttribute('redirectUrl',
> 'http://www.google.com/'<http://www.google.com/%27>
> );
> //setAttribute('redirectUrl',
> 'http://www.google.com/'<http://www.google.com/%27>
> );
> //attributes = {redirectUrl:'http://google.com'};
> //redirectUrl:'http://google.com'
> }
> </script>
>
>
> On Sep 4, 1:37 am, Philip Hutchison <[email protected]> wrote:
> > ah-ha... there's your problem. you're using SWFObject 1.5 syntax.
> > SWFObject 2.x uses completely different syntax.
> >
> > you previously posted that you wanted to use
> > swfobject.hasFlashPlayerVersion(version); this syntax is for SWFObject
> 2.x.
> >
> > so upgrade your SWFObject to 2.2 (
> http://code.google.com/p/swfobject/downloads/list) then use this code to
> > determine whether the correct version of Flash is installed:
> >
> > if(swfobject.hasFlashPlayerVersion("9.0.0")){
> > //do one thing} else {
> >
> > //do something else
> >
> > }
> >
> > On Thu, Sep 3, 2009 at 8:09 PM, unsustainableDesign <
> >
> >
> >
> > [email protected]> wrote:
> >
> > > For the life of me I can not get the redirectUrl to work.
> > > What do I need to do to get it to work? I have checked my path to the
> > > swfObject code and that is correct.
> > > I have un installed flash as well on my machine and just have no idea
> > > what I could be missing.
> >
> > > I have tried this bit of code as well as many others that I found
> > > posted on various sites.
> > > <script type="text/javascript">
> > > var so = new SWFObject("main.swf", "sotester", "1", "1", "8",
> > > "#fff");
> > > so.setAttribute('redirectUrl', 'http://www.google.com/'<
> http://www.google.com/%27>
> > > );
> > > so.addVariable("sec", "");
> > > so.write("flashcontent");
> > > </script>
> >
> > > Any help would be appreciated!
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"SWFObject" 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/swfobject?hl=en
-~----------~----~----~----~------~----~------~--~---