Sunday, 1 September 2013

Targeting objects in AS3

Targeting objects in AS3

I am wondering how to target specific objects/instances in flash as3. I
have 2 objects on the stage, for now we'll call them obj1 and obj2 (with
instance names). I am trying to have ob1's rotation speed based on obj2's
y position. I want to place the code inside of obj1 so I figured if I
wanted to target obj2 from inside obj1 I'd just use something like
this.rotation = this.obj2.y / 10; but for some reason the thing just keeps
it's rotation still. I used the "Target" button at the top of the native
code editor but it still gave me the same this.obj2. Any ideas? Thanks in
advance.

No comments:

Post a Comment