Confused? Me too.
Say I have this in a class:
private var _image:String;
public function set image( value:String ):void
{
this._image = value;
checkValues();
}
private var _vid:String;
public function set vid( value:String ):void
{
this._vid = value;
checkValues();
}
private var _pdf:String;
public function set pdf( value:String ):void
{
this._pdf = value;
checkValues();
}
private var _loadMC:Sprite;
public function set loadMC( value:Sprite ):void
{
this._loadMC = value;
checkValues();
}
private function checkValues():void
{
if( _image && _loadMC)
{
var _imageLoad:ImageLoad = new ImageLoad();
_imageLoad.image = _image;
_imageLoad.loadMC = _loadMC;
}
else if( _vid && _loadMC)
{
var _vidLoad:VidLoad = new VidLoad();
_vidLoad.vid = _vid;
_vidLoad.loadMC = _loadMC;
}
else if( _pdf && _loadMC)
{
var _pdfLoad: PdfLoad = new PdfLoad();
_pdfLoad.pdf = _pdf;
_pdfLoad.loadMC = _loadMC;
}
else
{
trace("defining properties");
}
}
From the document class I send _image and _imageMC to the above class and I get the error:
"VidLoad.as, Line 76 -- 1046: Type was not found or was not a compile-time constant: VideoEvent."
but I shouldn't have gotten that anyway as I didn't send _vid in the first place... why would it worry about anything in VidLoad.as when it doesn't even get inside that else if?!
I know it never gets in because "trace("loading video");" is never triggered.


