dimanche 19 mars 2017

Using stop in action script 3.0 for two objects

I have an instance of Gear and one of bLine. When the Gear gets on the bLine, they both start moving simultaneously. I am trying to stop both of them at one frame, I don't want the objects to go off the stage. Since my gear's move was created through a motion tween and my bLine moves through a function, I am not sure how that can be accomplished.

Code inside of the Gear instance:

var ev2:Event = new Event("transfer");


Code inside of bLine:

import flash.events.Event;


function Move(e:Event):void {


Main timeline:


function transferGear(e:Event) {


I don't know if there is a way how I could stop the bLine inside of the Gear instance, in order to be able to stop both objects at the same time.

Aucun commentaire:

Enregistrer un commentaire