Copy link to clipboard
Copied
Okay here's part two:
I used to have this:
/*IndexNext1.addEventListener(MouseEvent.CLICK, IndxNext1);
function IndxNext1(event:MouseEvent):void
{
gotoAndPlay("Indx1");
}
Left Turn Stalk Behavior
leftStalk.addEventListener(MouseEvent.MOUSE_OVER, leftOver);
function leftOver(event:MouseEvent):void
{
this.leftStalk.gotoAndPlay("over");
}
leftStalk.addEventListener(MouseEvent.MOUSE_OUT, leftOut);
function leftOut(event:MouseEvent):void
{
this.leftStalk.gotoAndStop("stop");
}
leftStalk.addEventListener(MouseEvent.MOUSE_DOWN, leftClick);
function leftClick(event:MouseEvent):void
{
this.leftStalk.gotoAndStop("down");
}
leftStalk.addEventListener(MouseEvent.MOUSE_UP, leftUp);
function leftUp(event:MouseEvent):void
{
this.leftStalk.gotoAndPlay("over");
}
*/
And I tried replacing it with this.
this.leftStalk.addEventListener("mouseover", leftOver);
function leftOver()
{
this.leftStalk.gotoAndPlay('over');
}
this.leftStalk.addEventListener("mouseout", leftOut);
function leftOut()
{
this.leftStalk.gotoAndStop('stop');
}
this.leftStalk.addEventListener("onmousedown", leftClick.bind(this));
function leftClick()
{
this.leftStalk.gotoAndStop('down');
}
this.leftStalk.addEventListener("onmouseup", leftUp.bind(this));
function leftUp()
{
this.leftStalk.gotoAndPlay('over');
}
How much am I getting wrong? LOL
Thanks in advance!
Rick
with as3, you don't need to explicitly reference the timeline that contains the objects and that you want to control. with createjs, you need to explicitly reference those: and with createjs and js, in general, there's no object typing: and inside createjs functions, the timeline reference is lost. one way to resolve that is to pass a reference to it using bind():
this.IndexNext1.addEventListener("click", IndxNext1.bind(this));
function IndxNext1(e)
{
this.gotoAndPlay("Indx1");
}
//Left Turn
Copy link to clipboard
Copied
Perhaps. but there's one file in particular that will be a major pain. Our IT folks said they'd look at it, but to be honest, they are encased in a culture of "no, it can't be done." : )
Copy link to clipboard
Copied
ok.
let me know if you want me to bid on converting it. (with new clients i quote a cost that doesn't need to be paid until i finish and the work is accepted.)
Copy link to clipboard
Copied
I'll do that. Talking to the boss this afternoon.