Skip to main content
Participant
May 7, 2014
Answered

Definition flash.event could not be found

  • May 7, 2014
  • 2 replies
  • 728 views

import flash.utils.Timer;

import flash.event.TimerEvent;

import fl.transitions.Tween;

import fl.transitions.easing.*;

mc1.alpha = 0;

mc2.alpha = 0;

mc3.alpha = 0;

var timer:Timer=new Timer(500,27);

timer.addEventListener(TimerEvent.TIMER,timerListener);

timer.start();

function timerListener(event:TimerEvent):void

{

  if(timer.currentCount == 1)

  {

  if(count==1)

  {

  var tween6:Tween = new Tween(mc3,"alpha",Strong.easeOut,1,0,1,true);

  }

  var tween1:Tween = new Tween(mc1,"alpha",Strong.easeOut,0,1,2,true);

}

if(timer.currentCount == 10)

{

  var tween2:Tween = new Tween(mc1,"alpha",Strong.easeOut,1,0,1,true);

  var tween3:Tween = new Tween(mc2,"alpha",Strong.easeOut,0,1,2,true);

}

if(timer.currentCount == 19)

{

  var tween4:Tween =new Tween(mc2,"alpha",Strong.easeOut,1,0,1,true);

  var tween5:Tween =new Tween(mc3,"alpha",Strong.easeOut,0,1,2,true);

}

if(timer.currentCount == 27)

{

  timer.reset();

  timer.start();

  var count = 1;

}

this is what i get ....

Scene 1, Layer 'Action Script', Frame 1, Line 21172: Definition flash.event:TimerEvent could not be found.
This topic has been closed for replies.
Correct answer kglad

that should be:

import flash.events.TimerEvent;

2 replies

Participant
May 7, 2014

Thank you so much i was about to throw the i mac out thee widow ....lol

kglad
Community Expert
Community Expert
May 7, 2014

i understand that!

some things are just hard to see and the longer you look, the less you see.

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
May 7, 2014

that should be:

import flash.events.TimerEvent;