views:

123

answers:

2

I'm a complete Flash n00b, but I'm having difficulty and I thought posting my question here was worth a shot, even if it's probably too complex to effectively convey here.

My client wanted a Flash intro (yuck!) so I made it so that it results in a menu with links to other pages on the site. To minimize annoying visitors, I'm using a cookie to determine if the user was already on the home page, and if so skip the whole animation and just show the menu.

I'm using the ActiveContent JavaScript library to embed Flash to my page. I'm passing a value to the Flash file via the query string (e.g., myflash.swf?animation=false) and in Flash when reading that value using gotoAndPlay() to jump to the last frame of the animation. I'm using ActionScript 3.

In Internet Explorer 8, and only IE, it works as intended. Unfortunately, no other browsers do this; they all show the full animation. The cookie is working correctly, but it's like Flash is totally ignoring the gotoAndPlay command.

Since I don't really know what I'm doing, I've probably done this wrong. Like I said, I know this is a longshot without posting gobs of code, but anyone have any ideas?

A: 

It seems to me the flash is working correctly (since it is working in IE), but somehow the parameter isn't passed to the flash from the other browsers. I suggest adding something in the flash to make sure you are actually getting the parameter you are expecting. Then check in the different browsers to see if it is getting passed.

If you could post the ActiveContent call you are using to embed the flash, that would help to see if there is anything wrong with how it is passing the argument to the flash movie.

ylebre
+1  A: 

Since it's unlikely you have a flash bug, I'd presume that you're running into differences in how each browser handles the idea of passing variables into embeds. While that's probably fixable for any given browser, a fix that works in every browser may be hairy (especially with older browsers). And of course you never really know you're safe until you test in everything.

It would be a lot more robust to look at SharedObject. SOs are essentially cookies, except that the Flash player stores and retrieves them itself, without going through the browser. (They're also not serialized, you can just store a Boolean or whatever.) This sidesteps any differences in how browsers deal with embeds. It also means that if even if a viewer checks the site in IE and then later opens it in Firefox, you can still tell they've already seen the intro.

fenomas