PDA

View Full Version : Delete an IF ?



larcho
May 30th, 2004, 06:11 PM
Is it posible to delete an IF expression? Like when you delete an onEnterFrame ?

pom
May 30th, 2004, 06:13 PM
No. What are you trying to do? :huh:

larcho
May 30th, 2004, 06:27 PM
No. What are you trying to do? :huh:
I'm doing a Animation with AS.

Like this

mc_movie.moveobject_y(230);

if (mc_movie._y == 230) {
mc_movie.moveobject_y(250);
}

if (mc_movie._y == 250) {
mc_movie.moveobject_y(280): //Here is where I want to delete the previous IF
}

The secuence is much more complex than this, and I need the previous if stoped from function for it to work.

Prophet
May 30th, 2004, 10:01 PM
erm... i guess u kinda can....
if you assign a variable such as i as 0 at the first frame and then insert the old
if ( i == 0 ){
if (mc_movie._y == 230) {
mc_movie.moveobject_y(250);
i++
}
}
or alternatively you can put the i++ in the second if statement - its up to you...
(it was so tempting to write "yer sure you can delete if statements... just hold down backspace!" lol)

so you cant dynamically delete code no, but you can disregard it ;)

i think this is what your after... but i could be very wrong!!

Prophet.

pom
May 31st, 2004, 08:20 AM
Are you trying to move your clip around with that piece of code? And where did you put that code?