USERNAME:
PASSWORD:
Save Info!
Logging in…
This topic is 1 page long.
[ Profile | Posts | Contact ]
Posted at: 4/9/09 03:02 PM
Sign-Up: 06/13/08
Posts: 924
onClipEvent (load) { }
function newpos():Void { ranx = Math.round((Math.random()*500)); rany = Math.round((Math.random()*500)) }
The Review Request Club Join the cause
Posted at: 4/9/09 03:09 PM
Sign-Up: 05/17/05
Posts: 1,610
At 4/9/09 03:02 PM, piggy123 wrote: onClipEvent (load) { } function newpos():Void { ranx = Math.round((Math.random()*500)); rany = Math.round((Math.random()*500)) }
How about telling the nice people what you need help with exactly? Posting some random code isn't helping anyone. Help us help you.
iamcoreyg.com // campnorth Need a website? music? graphics? CONTACT ME.
Posted at: 4/9/09 03:12 PM
Sign-Up: 03/01/08
Posts: 18
Uhmm dont know if this will help but if your making a platformer its pretty cool
-SorryItsAShortFlash-
Posted at: 4/9/09 04:56 PM
i need to make something move randomly
Posted at: 4/9/09 05:06 PM
Sign-Up: 09/17/04
Posts: 1,517
onClipEvent(enterFrame) { ranx = Math.round((Math.random()*500)); rany = Math.round((Math.random()*500)) }
?
Or change enterFrame to load if you want it to do it the once.
Sig by ApothicFlash <3
Posted at: 4/9/09 05:26 PM
At 4/9/09 05:06 PM, CaiWengi wrote: onClipEvent(enterFrame) { ranx = Math.round((Math.random()*500)); rany = Math.round((Math.random()*500)) } ? Or change enterFrame to load if you want it to do it the once.
onClipEvent (load) { ranx = Math.round((Math.random()*500)); rany = Math.round((Math.random()*500)); }
onClipEvent (enterFrame) { if (this.hitTest(_root.player)) { _root.gotoAndStop(3);
} }
does not work
Posted at: 4/9/09 11:35 PM
anyone???
Posted at: 4/9/09 11:41 PM
Sign-Up: 04/12/02
Posts: 387
you have to be more specific for what you are looking to do, right now you are setting some variables to random numbers, but you never actualy move anything. if you want it to move change the _x and _y properties.
Posted at: 4/9/09 11:42 PM
Sign-Up: 08/21/05
Posts: 2,375
At this point all you've done is set up variables that store random numbers for what would appear to be the x and y movement. For the object to move you actually have to change the properties. ie the _x and _y values need to be changed. Understand that creating a random number in ranx does not actually change anything except the value of a variable named ranx.
AS:Main
All times are Eastern Standard Time (GMT -5) | Current Time: 12:30 AM
<< Back