Newgrounds.com — Everything, By Everyone.

Checking login status…

USERNAME:

PASSWORD:

Logging in…

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


Forum Topic: _x and _y troubles

(99 views • 4 replies)

This topic is 1 page long.

<< < > >>
None

mooseisloose

Reply To Post Reply & Quote

Posted at: 5/15/07 06:07 PM

mooseisloose FAB LEVEL 31

Sign-Up: 12/06/04

Posts: 2,259

onClipEvent (enterFrame) {
_x = random(450);
}

I put that on my MC because I wanted it to appear anywhere on the X axis inside the canvas... but every frame it appears somewhere else randomly, how do I make it so it appears in a random place on frame 104 and stays there for the rest of the movie? o.O


None

Nuggs

Reply To Post Reply & Quote

Posted at: 5/15/07 06:25 PM

Nuggs LIGHT LEVEL 18

Sign-Up: 12/17/05

Posts: 1,205

onClipEvent (load) {
_x = random(450);
}

Use load. That will only let the script run oncec.

Games|1|2|3| Movies|1|2|

BBS Signature

None

mooseisloose

Reply To Post Reply & Quote

Posted at: 5/15/07 06:32 PM

mooseisloose FAB LEVEL 31

Sign-Up: 12/06/04

Posts: 2,259

At 5/15/07 06:25 PM, Nuggs wrote: onClipEvent (load) {
_x = random(450);
}

Use load. That will only let the script run oncec.

now it doesnt appear at all o.O


None

mooseisloose

Reply To Post Reply & Quote

Posted at: 5/15/07 06:38 PM

mooseisloose FAB LEVEL 31

Sign-Up: 12/06/04

Posts: 2,259

right okay now it appears where i've already placed it on stage, everytime... it doesnt go randomly it always appears where I placed it in on the stage


None

mooseisloose

Reply To Post Reply & Quote

Posted at: 5/15/07 06:44 PM

mooseisloose FAB LEVEL 31

Sign-Up: 12/06/04

Posts: 2,259

okay I fixed it... but I had to take something else OFF the mc....

onClipEvent (enterFrame) {
if (this.hitTest(_root.ship)) {
_root.4secs.play();

}
}

(the mc is called 4secs) now i cant put that on either ship or 4secs because whichever I put it on...... all other scripts on that MC stop working! :'(


All times are Eastern Daylight Time (GMT -4) | Current Time: 06:22 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!