PDA

View Full Version : Flash4 and _parent.mc2.gotoAndStop(1)?


Filipinho
01-10-2003, 03:01 PM
Hi!

I´m creating a projekt that has to work with Flash4 and I´m using this script that is soposed to work with Flash Player 4.

this is my script that is on a button:

on(release){
_parent.MC2.gotoAndStop(1)
_parent.MC3.gotoAndStop(1)
_parent.MC4.gotoAndStop(1)
temp=2
}

Flash says that I have to export it as a Flash 5 movie.
I have read in the flash dictionary that _parent.MC2.gotoAndStop(1) is soposed to work with Flash4, thay even has example that says _parent.gotoAndStop(10).

Why doesn´t it work?

two3rdswater
01-10-2003, 03:13 PM
its a bit of a pain really.. i think your problem is because the dot format and the use of "_parent" was only introduced for flash 5.

instead of your code line

_parent.MC2.gotoAndStop(1)

flash 4 code would be

tellTarget ("../mc2") {
gotoAndStop(1);
}

unfortunatly i think it may require you to to redo all your code in this ugly style.

i'm going to stop know cos i'm getting a nosebleed and i'm destined for nighmares tonight having to think about using flash4 actionscript!!

good luck...

if you need anyother help please post a follow up question

Filipinho
01-10-2003, 03:19 PM
The strange thing is that this is written in the Flash Dictionary:

Availability

Flash Player 4.

Usage

_parent.property
_parent._parent.property

Example

_parent.gotoAndStop(10);

???

two3rdswater
01-10-2003, 03:24 PM
yes.. because that is the correct usage NOW

actionscript was completly reinvented between versions 4 and 5... i've had trouble with this sort of thing before.

flash 4 actionscript worked in a completly different way and i think the only way to get what you want to work in the flash 4 player is to do it as i described

sorry :(

Filipinho
01-10-2003, 03:54 PM
ahhh ok!

Thanks for the explanation!

Don´t likle Flash4 :(

two3rdswater
01-10-2003, 04:00 PM
yeah.. me too..

makes u appreciate how far actionscript has come since then tho huh :|