Newgrounds.com — Everything, By Everyone.

Checking login status…

USERNAME:

PASSWORD:

Logging in…

Logged in as:
.
Logging out…
Inbox My Account Log Out


Forum Topic: Fishy Clone

(156 views • 4 replies)

This topic is 1 page long.

<< < > >>
None

h4x3r

Reply To Post Reply & Quote

Posted at: 9/23/07 11:05 AM

h4x3r LIGHT LEVEL 07

Sign-Up: 09/16/06

Posts: 275

Ok, so im re programming the game fishy from scratch. so far its going great! But unfortunatly the remove movieClip Code doesnt work... can someone either link my to the tutorial or explain it to me?

BBS Signature

None

TrueDarkness

Reply To Post Reply & Quote

Posted at: 9/23/07 12:02 PM

TrueDarkness EVIL LEVEL 27

Sign-Up: 08/31/04

Posts: 4,718

To use "removeMovieClip();" the object must have a depth. Depth is assigned to an object when it is either duplicated, or manually assigned one, by using "this.swapDepths(#);"

Once the object has a depth, to remove it, you simple put this code on it:
this.removeMovieClip();

or.. You can do it from outside the MC, and say:
_root["fish"+i].removeMovieClip();

Or something similar.

If I wasn't clear on that swapDepths thing, here's how that works:

this.swapDepths(100);
this.removeMovieClip();

If you put that on an object, it gives the object a depth of 100 over everything else, or possibly under anything else with a depth over 100. Then, the code removes itself, deleteing it and it's assigned depth.


None

Kirk-Cocaine

Reply To Post Reply & Quote

Posted at: 9/23/07 12:04 PM

Kirk-Cocaine EVIL LEVEL 33

Sign-Up: 08/17/03

Posts: 16,381

At 9/23/07 11:05 AM, h4x3r wrote: But unfortunatly the remove movieClip Code doesnt work.

If something's not working, you should post your code so we can see what it is you're doing. Regardless, removeMovieClip code should look like this:

_root.MyMC.removeMovieClip();

However, if your MCs weren't created dynamically, you'll need to give them positive depths:

_root.MyMC.swapDepths(999);

Further reading:

removeMovieClip AS Dictionary Entry
swapDepths AS Dictionary Entry
Fishy Tutorial!

Now the time has come I just wish I could erase all the damage done,
All this pain, all this heartache.
It's only just begun, it's been fun, we were fucked up and numb

BBS Signature

None

TrueDarkness

Reply To Post Reply & Quote

Posted at: 9/23/07 12:06 PM

TrueDarkness EVIL LEVEL 27

Sign-Up: 08/31/04

Posts: 4,718

At 9/23/07 12:04 PM, Kirk-Cocaine wrote:

Wow, can I ask how you did that AS thing? I've never seen that before...


Happy

Kirk-Cocaine

Reply To Post Reply & Quote

Posted at: 9/23/07 12:13 PM

Kirk-Cocaine EVIL LEVEL 33

Sign-Up: 08/17/03

Posts: 16,381

At 9/23/07 12:06 PM, TrueDarkness wrote:
At 9/23/07 12:04 PM, Kirk-Cocaine wrote:
Wow, can I ask how you did that AS thing? I've never seen that before...

mod powers ftw!

Only joking, we've got fancy new <code> tags!

Now the time has come I just wish I could erase all the damage done,
All this pain, all this heartache.
It's only just begun, it's been fun, we were fucked up and numb

BBS Signature

All times are Eastern Daylight Time (GMT -4) | Current Time: 12:06 AM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!