[thelist] attachMovie ActionScript bringing my Mac to it's knees

Tim Hansen - Pink Candy Productions tim at pinkcandyproductions.com
Wed Nov 13 21:27:01 CST 2002


--
[ Picked text/plain from multipart/alternative ]
Hi all,
A 'lil actionscript question/problem...
I have a script which loads movie clips (of jpegs fading in) into a target
mc. I used this script because it has a "visited state" which shows which
mc's have already been viewed.
My problem is that the script works perfectly on a PC but is painfully slow
on my Mac. I've eliminated all the other components in my movie and I'm
pretty sure this is the problem. I can't figure out why this script causes
my G4 to grind to a halt!

I know about the slow Mac plugin issue and the rest of my site works at an
acceptable speed on the Mac (although it's much faster on my PC).

Here's the code:

In a keyframe:

// load initial pic
target.attachMovie("fly", "inTarget", 9001);
// send initial pic to 100% opacity
target.inTarget.gotoAndPlay("end");
// send bttn to down state
this.pic1.gotoAndStop("down");
currTarget = this._name;


attached to the button:

on (rollOver) {
    this.gotoAndStop("over");}
on (rollOut) {
    if (this.state == "visited") {
        this.gotoAndStop("visited");
    } else {
        this.gotoAndStop("up");
    }
}
on (release) {
    _root[_root.currTarget].gotoAndStop("visited");
    _root.target.attachMovie(this.clip_to_load, "inTarget", 9001);
    this.gotoAndStop("down");
    _root.currTarget = this._name;
    // this sets the y position for the top blue bar
    setProperty("_level100.blue0", _y, "-34");
    // this sets the y position for the bttm logo bar
    setProperty("_level100.logo_bar0", _y, "60");
}

Does anyone know if this is a common problem & if there are any workarounds?
Any help would be totally appreciated.
Thanks,
Tim
--





More information about the thelist mailing list