Saturday, August 05, 2006

gotoAndStop causing browser to crash



This bug is driving me up the wall. I am embedding a movieclip into one of my classes using this method:
[Embed(source='/sprites.swf', symbol='PlayerSprite')]
private var PlayerSprite:Class;



I need to use gotoAndStop to reflect a state change... e.g.:
if(_isMoving){
mc.gotoAndStop("walk_"+angle);
}else{
mc.gotoAndStop("idle_"+angle);
}



The script works but it causes both IE and FireFox to crash completly at random times when gotoAndStop is executed.

Has anybody else experienced this?

6 comments:

Jensa said...

Yup. Some years ago, but I seem to remember that it could be resolved by making sure the Goto-command was at the end of the script. The culprit was that changing frames at the wrong time would cause the currently executing Object to be removed from stage.

Not sure if this applies to you since you're doing AS2/AS3 and my problems was back in AS1 days with code littered across every movieclip in the FLA, but yes - I have experienced the same :)

J

Anonymous said...

Hi John,

I see a similar bug on file for Flash Player 9. We'll jump on it in the next few days. I'd be happy to send you an early build next week if you'd like to confirm its been fixed for your scenario. Shoot me an email if you're interested. Sorry for the inconvenience.

BTW - You've greated some great stuff with Flash.

--- Paul
Flash Player Engineering
pbetlem@adobe.com

Anonymous said...

hey Chipps...nice blog. nigsi-b

Anonymous said...

Nonydaynoma
[url=http://healthplusrx.com/contact-us]contact us[/url]
clutuappite

Anonymous said...

I'm gonna reenact a scene from the Thundarr the Barbarian episode "Prophecy of Peril", but with the dialogue altered to best describe how I feel about Jaymee's departure.

Jaymee: Welcome to ESPN Sportscenter.

(back at the island fortress of the Mega Man robot Avalanche Yeti located in the middle of the bay)

Avalanche Yeti: The gem, my power, my kingdom gone forever!

Louise Belcher: What of Jaymee Sire? Where is she?

Toki (from Hokuto No Ken/Fist of the North Star): She's gone too, but I'd wager not forever.

(Louise Belcher, Toki and Shane Gooseman have a moment of silence remembering about their time with Jaymee Sire before moving on)

-astrothagard

Anonymous said...

Excellent review on the Swat Kats's flaws by Mr Mouse.

"BADAZZ" EXTREEEEME 90s show.... Yeah?

These are the AWESOME adventures of Chance and Jake, two KRAZY cats masquerading as EXTREME vigilantes with their RADICAL jet, aided by cute feline insider in protecting MEGA Kat City while erring on the wrong side of the UNCOOL commander who doesn't quite care for those "lawless" vigilantes and their reckless ways.

OK, I'm gonna drop the 90s lingo, as I'm sure you know where I'm going with this.
Going against our duo is the standard rogues gallery, including but not limited to the dark mysterious foe (who'd rather use his few victorious moments to gloat evilly and NOT finish the Kats), the insssane mutated ssscientissst, complete with ssssnake sssspeak to emphasssize how ssslimy and evil he issss, and an time-travelling dictator from the past with ancient powers.

Wrap it all up in an inconsistent art-style (going from one season of cartoony furries to another of anime-esque humanoids) the wailing of an electric guitar when our heroes are on screen, and grand scenarios that are rushed in an effort to fill 23 minutes (negating any sense of urgency or continuity) and you've got yourself a Troperific Cliche Storm of the 90s. You've seen all of these characters and plots before, acting out the same roles and emotions and resulting in the same contrivances to keep the monster-of-the-week formula alive.

Now Saturday morning cheese itself isn't a bad thing, mind you; that IS a part of what makes those shows fun. For example, as inconsistent as the art-style is, the animation itself was slick. The main characters designs stand out from their ugly backdrop, and cats engaging in "dog" fights is nice breath of fresh air from the ninja martial artists and toy vehicle armies running rampant then.

The problem I had with it is that, like I mentioned before, is that there is arguably nothing noteworthy about it. The stories are predictable, the villains lame, and character development almost nonexistent. It relies on the grittiness to set it apart, but it falls flat due to recycling the rest of its elements. When compared to a show like Batman TAS, which could deliver on all these, its a wonder to this reviewer how Swat Kats has the following it does.

At the end of the day, Swat Kats is a bland creation pretending it isn't. If you're up for an 90s show, give it a whirl; though unless you're a dedicated fan, YMMV on the BADAZZ EXTREEEEME part.