PDA

View Full Version : random


dancanm
10-31-2004, 04:42 PM
how do i make something come across the screen at random times? in random spots. i also need someone to debug a game i made. should I post it here? i dont want it stolen...

Ozero
10-31-2004, 11:58 PM
well, how good are you with action script? The short version, is that you generate a random x, and y, and make it appear there... but erm.. hm.. might be helpful to know more about the situation..

EtherealChaos
11-01-2004, 01:38 AM
something simple to start on would be to attach the following onto the stage:

i=0
_root.onEnterFrame=function(){
i++
object.duplicateMovieClip("object"+i,i,{_x:0,_y:random(400)})
//change "object" to the mc u want to move around's instance name.

then in the "object" movieclip, have the following code:

this._x+=10 //change 10 to any value

that's just an example of having an object duplicated and flown across the screen. You cud then tweak the values, mayb slow the duplicating down, add random _alpha, _xscale and _yscale, etc etc.

EtherealChaos
11-01-2004, 01:41 AM
oh u mentioned at random times as well. well u can REPLACE the first block of code above with the following:

i=0
_root.onEnterFrame=function(){
if(i<random(300)+100){i++}
else{
i=0
object.duplicateMovieClip("object"+i,i,{_x:0,_y:random(400)}) }
}
//change numbers to any value.

dancanm
12-05-2004, 05:52 PM
i REALLy need help making my movie work. can I post it here so someone can help me. i can give a link to the source file

Xeef
12-05-2004, 07:13 PM
hi

to debug a game it's lot's of work !
if it's just a smale game (200-300KB) and you can upload it HERE i will take a look
i don't think some body will steal it
and think on it if some body can fix it he also can write it which is sometime faster then to debuge it!

acros the sceene at random times check the attacment :

coolioman
12-22-2004, 04:02 PM
that "hit hit" game needs some MAJOR debugging.
when i try 2 load it, it just crashes flash. i am using f5, and my compies kinda slow. that miight be related to the problem somehow....

Xeef
12-22-2004, 06:10 PM
Hmmm

hithit is saved in MX2004 format so you will NOT by abel to open it in F5

coolioman
12-22-2004, 06:11 PM
ok, thanks 4 tellin me. i was kinda confused there 4 a min