Ok i seem to be have alot of problems with this script,
first of all there must be an easier way to do something if a function doesnt trigger than having a variable but if this is the only way then it is not working for me. i first tried witha string and now a number and the checkif variable does not get detected properly (the else statement runs either way)
also it looks messy and inefficient to me with the if else statement is there a better way to do that part? if not can u help me to get it working?
function addPicMain(event:Event):void {
var addTov:String = event.target.name
var imgLoader:Loader = new Loader ();
var checkif:Number = 1
var imgRequest:URLRequest = new URLRequest("galImgs/pic" + addTov + ".png");
imgLoader.load(imgRequest);
event.target.addChild(imgLoader);
imgLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErr);
function ioErr(event:Event){
MovieClip(loaders_mc.getChildByName(addTov)).gotoAndStop(171);
checkif++
}
if(checkif == 2){
} else {
event.target.removeChild(event.target.si_mc);
MovieClip(loaders_mc.getChildByName(addTov)).removeMovieClip;
}
event.target.removeEventListener(Event.ENTER_FRAME, addPicMain)
}
any help is greatly appreciated, thank you in advance
plz help if there is something i didnt put or i am asking to much please just tell or ask me thanks