Skip to main content
kili
Known Participant
February 8, 2016
Answered

Flash AS3 -- Got ff.fla code importing cl.as class -- cl class has a tt:Timer -- How do I get a tt:Timer event to run a function on ff.fla code?

  • February 8, 2016
  • 1 reply
  • 478 views

Flash AS3 -- Got ff.fla code importing cl.as class -- cl class has a tt:Timer -- How do I get a tt:Timer event to run a function on ff.fla code?

This topic has been closed for replies.
Correct answer kglad

kili wrote:

Thankyou. Please, I need further assistance.

My ff. fla has

****************

import CC

var mm:CC = new CC();


mm.addEventListener('fromCCE',aaa);

function aaa(e:Event){

trace(“****”);

}

*****************

my CC.as file has

*******************

                       var tt:Timer = new Timer(……);

tt.addEventListener(TimerEvent.TIMER_COMPLETE, YYYY)

tt.start();

function YYYY(e:TimerEvent):void{
dispatchEvent(new Event('fromCCE')); // or if you want to dispach e, do so
}

1 reply

kglad
Community Expert
Community Expert
February 8, 2016

add a listener there.

kili
kiliAuthor
Known Participant
February 8, 2016

Thankyou. Please, I need further assistance.

My ff. fla has

****************

import CC

var mm:CC = new CC;

function aaa(XXXX){

trace(“****”);

}

*****************

my CC.as file has

*******************

var tt:Timer = new Timer(……);

tt.addEventListener(TimerEvent.TIMER_COMPLETE, YYYY)

tt.start();

***********************************

Question: I need the Event to call function aaa. What do I write instead of XXXX and YYYY?

Thanks again

Héctor

De: kglad

Enviado el: lunes, 8 de febrero de 2016 17:15

Para: Héctor Kilijanski

Asunto: Flash AS3 -- Got ff.fla code importing cl.as class -- cl class has a tt:Timer -- How do I get a tt:Timer event to run a function on ff.fla code?

Flash AS3 -- Got ff.fla code importing cl.as class -- cl class has a tt:Timer -- How do I get a tt:Timer event to run a function on ff.fla code?

created by kglad <https://forums.adobe.com/people/kglad> in ActionScript 3 - View the full discussion <https://forums.adobe.com/message/8475587#8475587>

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
February 9, 2016

kili wrote:

Thankyou. Please, I need further assistance.

My ff. fla has

****************

import CC

var mm:CC = new CC();


mm.addEventListener('fromCCE',aaa);

function aaa(e:Event){

trace(“****”);

}

*****************

my CC.as file has

*******************

                       var tt:Timer = new Timer(……);

tt.addEventListener(TimerEvent.TIMER_COMPLETE, YYYY)

tt.start();

function YYYY(e:TimerEvent):void{
dispatchEvent(new Event('fromCCE')); // or if you want to dispach e, do so
}