[RESOLVED] Tutorial Code Not Working
I really hate when you read a tutorial from some "expert" and what it tells you to do is wrong.
I was doing a tutorial for a XML slide show, and the last line of code doesn't work quite right:
function timerListener (e:TimerEvent):void{
my_playback_counter++;
if (my_playback_counter == my_total){
my_playback_counter =0;
}
nextImage();
}
For some reason that only sends the my_playback_counter to 1. And it just sits there twitching. So when I tried to change the tutorial code to:
function timerListener (e:TimerEvent):void{
if (my_playback_counter <= my_total){
my_playback_counter++;
}
else {
my_playback_counter = 0;
}
nextImage();
}
It plays through to the last image, and then I get this Output message:
TypeError: Error #2007: Parameter child must be non-null.
at flash.display::DisplayObjectContainer/addChild()
at slideShowXML_fla::MainTimeline/nextImage()
at slideShowXML_fla::MainTimeline/timerListener()
at flash.utils::Timer/flash.utils:Timer::_timerDispatch()
at flash.utils::Timer/flash.utils:Timer::tick()
Sometimes I just hate programming...
Thanks in advance