Error #1010 A term is undefined...
hey mates!
I'm new here and I'm new to Flash and AS3.0 too.
So, I'm making a little gallery inside a movieclip so that I latter can put it in my website that is made in flash.
I made a folder (Portfolio), inside this folder I have 2 layer(actions, content). Inside actions I have only "stop();" and the content layer have the movieclip (gallery_mc).
Inside this movieclip I made some buttons and have converted them to a movieclip too. Then I have 8 folders, each folder named differently (fotos, wallpapers, logos...) inside those I have 2 layer too, content and actions.
Then I made 8 frame labels for each button and at last the layer called Actions that have all important code.
http://i48.tinypic.com/245mr8n.jpghttp://i45.tinypic.com/11t0d3p.jpg
The AS3.0 is...
Quote:
/////////////////////////////////////////////////////////////////////
stop();
buttons_mc.stop();
/////////////////////////////////////////////////////////////////////
// Event Setup.
/////////////////////////////////////////////////////////////////////
buttons_mc.fotografia_btn.addEventListener(MouseEv ent.CLICK, navigationClicked);
buttons_mc.tratamentoimg_btn.addEventListener(Mous eEvent.CLICK, navigationClicked);
buttons_mc.artedigital_btn.addEventListener(MouseE vent.CLICK, navigationClicked);
buttons_mc.flayers_btn.addEventListener(MouseEvent .CLICK, navigationClicked);
buttons_mc.cartazes_btn.addEventListener(MouseEven t.CLICK, navigationClicked);
buttons_mc.logo_btn.addEventListener(MouseEvent.CL ICK, navigationClicked);
buttons_mc.cartoes_btn.addEventListener(MouseEvent .CLICK, navigationClicked);
buttons_mc.videos_btn.addEventListener(MouseEvent. CLICK, navigationClicked);
/////////////////////////////////////////////////////////////////////
function navigationClicked(Event:MouseEvent):void
{
//store the Frame Label's name.
var frmLabel:String = '';
//Determine what Frame Label to use based on which
//button was clicked.
switch (Event.target)
{
case buttons_mc.fotografia_btn :
frmLabel = "fotografia_frm";
break;
case buttons_mc.tratamentoimg_btn :
frmLabel = "tratamentoimg_frm";
break;
case buttons_mc.artedigital_btn :
frmLabel = "artedigital_frm";
break;
case buttons_mc.flayers_btn :
frmLabel = "flayers_frm";
break;
case buttons_mc.cartazes_btn :
frmLabel = "cartazes_frm";
break;
case buttons_mc.logo_btn :
frmLabel = "logo_frm";
break;
case buttons_mc.cartoes_btn :
frmLabel = "cartoes_frm";
break;
case buttons_mc.videos_btn :
frmLabel = "videos_frm";
break;
}
//Find the frame number based on Frame Label.
var frmGoto:Number = this.getFrame(frmLabel);
//Don't do anything if we are already on the requested page.
if (currentFrame != frmGoto)
{
//Go to the requested page.
gotoAndPlay(frmGoto);
}
}
/////////////////////////////////////////////////////////////////////
function getFrame(frameName:String):Number
{
var frame:Number = 1;
//Loop through all Frame Labels to find requested frame.
for (var i = 0; i < currentLabels.length; i++)
{
if (currentLabels[i].name == frameName)
{
frame = currentLabels[i].frame;
break;
}
}
return frame;
}
this is the AS.
I made this gallery in a different .fla project and it worked fine. The only difference is that I didn't put all this stuff inside the "gallery_mc" movieclip.
but now I'm getting this out put
Quote:
"TypeError: Error #1010: A term is undefined and has no properties.
at Template_fla::gallery_mc_46/frame1()
at flash.display::MovieClip/gotoAndPlay()
at Template_fla::MainTimeline/navigationClicked()"
could anyone help me plz?