PDA

View Full Version : type was not found?


ACKtion
11-13-2009, 08:25 PM
1046: Type was not found or was not a compile-time constant:Play

my flash movie is one movieclip called player (instance player_mc) controlled through the class file Player.as (package com.wide.audio)

here is the code from Player.as:

package com.wide.audio
{
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
import flash.net.*;

public class Player extends MovieClip
{
public var channel:SoundChannel;
public var sound:Sound;
public var resumeTime:Number =0;

public function Player()
{
play_mc.buttonMode = true;
pause_mc.buttonMode = true;
// hide pause button
pause_mc.visible = false;
}
}
}

I have checked and rechecked my folder structure and made sure that the movieclip player_mc is exported for actionscript correctly. what could it be? and what does it mean, not compile time constant? :mad:

krayzeebean
11-13-2009, 08:48 PM
It means you either forgot to import a class or you misspelled a class, either the import or when you are setting the type of var. Is this all the code in your entire project? It seems somewhere you are trying to use a class called Play but it doesn't exist.