All,
I’m trying to load some images and I’m getting the following error:
TypeError: Error #1010: A term is undefined and has no properties.
at main_cs3_updated_v2_fla::gallery_big_resize_102/frame16()
The code is referring to this code:
bigTitle.loadImages.loaderImagesFunction(nameLoadBigTitle);
I have a movie clip in this frame and it’s instance name is bigTitle.
I load the nameLoadBigTitle into the following function:
I first put it into an array:
nameLoaderImagesTitle* = MovieClip(root).program.websiteXML.settings.imagesPage.imagesGallery[MovieClip(root).gallery_category_num].images*.@imageTitle
Then I send it to the loaderImagesFunction with the following:
clip.galleryImages.loadImages.loaderImagesFunction(nameLoaderImages*,i,nameLoaderImagesBig*,linSite*,nameLoaderImagesTitle*);
When I trace the nameLoaderImagesTitle* is displays my titles correctly.
The loaderImagesFunction is then the following:
function loaderImagesFunction(nameImages:String, NumImages:Number, nameImagesBig:String, linPic:String, nameImageTtitle:String) {
var picURL:URLRequest;
var picLoader:Loader;
var request:URLRequest;
picURL=new URLRequest(nameImages);
picLoader= new Loader();
picLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,onLoadProgress);
picLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,onLoadComplete);
picLoader.load(picURL);
function onLoadProgress(evt:ProgressEvent):void {
var titileLoaderLoad:Number = Math.round(100 * (evt.bytesLoaded / evt.bytesTotal));
MovieClip(parent).loadingImages.progress.text = titileLoaderLoad + "%";
MovieClip(parent).loadingImages.gotoAndStop(titileLoaderLoad);
}
function onLoadComplete(evt:Event):void {
var Bmp:Bitmap = Bitmap(picLoader.content);
Bmp.x = -Math.round(Bmp.width*0.5);
Bmp.y = -Math.round(Bmp.height*0.5);
addChild(Bmp);
MovieClip(parent).gotoAndPlay(2);
hit.x = -Math.round(Bmp.width*0.5);
hit.y = -Math.round(Bmp.height*0.5);
hit.height = Bmp.height;
hit.width = Bmp.width;
hit.addEventListener(MouseEvent.ROLL_OVER, rollOverImages);
hit.addEventListener(MouseEvent.ROLL_OUT, rollOutImages);
hit.addEventListener(MouseEvent.CLICK, clicImages);
function rollOverImages(event:MouseEvent):void {
if (MovieClip(root).program.numGallImages !== NumImages) {
MovieClip(parent).gotoAndPlay('s1');
}
}
function rollOutImages(event:MouseEvent):void {
if (MovieClip(root).program.numGallImages !== NumImages) {
MovieClip(parent).gotoAndPlay('s2');
}
}
function clicImages(event:MouseEvent):void {
//if (MovieClip(root).program.numGallImages !== NumImages && MovieClip(root).gallery_flag_animation==1) {
if (MovieClip(root).program.numGallImages !== NumImages ) {
MovieClip(root).gallery_num_pic_in_category_num=NumImages;
MovieClip(root).all_gallery.all_pics.gall.nameLoadBigImages=MovieClip(root).program.websiteXML.settings.imagesPage.imagesGallery[MovieClip(root).gallery_category_num].images[MovieClip(root).gallery_num_pic_in_category_num].@imagesBig;
MovieClip(root).all_gallery.all_pics.gall.nameLoadBigTitle=MovieClip(root).program.websiteXML.settings.imagesPage.imagesGallery[MovieClip(root).gallery_category_num].images[MovieClip(root).gallery_num_pic_in_category_num].@imageTitle;
MovieClip(root).all_gallery.all_pics.gall.play();
MovieClip(root).all_gallery.all_pics.gotoAndPlay("s1");
var contMovie = MovieClip(parent.parent.parent).getChildByName("item"+MovieClip(root).program.numGallImages) as MovieClip;
if (contMovie) {
contMovie.galleryImages.gotoAndPlay('s2');
}
MovieClip(root).program.numGallImages=NumImages;
}
}
}
}
I’m not sure why it’s giving me that error. Anyone have any ideas or what the error means and how to fix it?? Thanks for nay help in advance.