PDA

View Full Version : [AS2] if.instance.frame(2)?


Powersclan
09-12-2009, 12:32 AM
Posts: 206
Hi I was making kind of an invintory and I need to find out how this will work the code is

(on the instance picklock_btn)
onRelease{
if { invslot1_mc.frame(2)
door_mc.gotoAndPlay(2)
if {invslot11_mc.frame(1)
door_mc.gotoAndPlay(3)
}
}
}

picklock_btn is the button that tells you to picklock
Door_mc is the door where you picklock
invslot1_mc is the invintory slot and frame 2 is a pick lock in it
I
m new to actionscript pretty sure it wont work but what i want to do is you press the button,It decides if invslot is on frame 1 or 2, if 2 play the second frame of door_mc (congradulation you picked it) but if you dont it playes 3 (sorry you cant pick the lock) I am using actionscript 2.0 please help me. thanks,
And tell me if by mirical it will work

rrh
09-12-2009, 01:50 AM
if (invslot1_mc._currentframe==2)

Powersclan
09-12-2009, 05:06 AM
thank you so much!:):D:cool: