No problem take your time ^^, I'm glad you will do this
Printable View
No problem take your time ^^, I'm glad you will do this
ok... your problem is you're not starting the slideshow (startShow()) unless you have as many successful loads as the total number of XML nodes, but you're only increasing the counter on success. you need to count a failed image load as a 'success', otherwise you'll never reach the total number.
so, the easy change is to update missingImage to look like this:
that'll get it working.PHP Code:function missingImage(event:IOErrorEvent):void{ // *FK*
my_success_counter++;
if (my_success_counter == my_total)
{
startShow();
}
var ref:LoaderInfo = event.currentTarget as LoaderInfo;
var position:uint = my_loaderinfo_array.indexOf(ref);
my_textX_array[position] -= 150; // *FK* - i assume you want it 150 less, so '-='. if that's wrong and you want it to be 150, use '=' not '-='
}
that said, there seems to be a lot of extraneous stuff going on - not sure why all the position and dimensions are being saved to arrays rather than just assigned. also, i'd use a single container for each 'set' (image, label, author), and just tween that. last, i'd probably try to load sequentially (one after another) rather than all at once. you could really benefit from some simple subclassing. if you want some help on that, i can try to find a few minutes to put together how i'd do it - otherwise, if you're content with it working (with the above change), then i won't bother.
hth
Great it worked !
If you are willing to take the time for me to put it together as you would I would greatly appreciate that since I could learn some extra with that.
thanks!
Edit:
I have changed it to this now and works perfectly:
PHP Code:function missingImage(event:IOErrorEvent):void
{
my_success_counter++;
if (my_success_counter == my_total)
{
startShow();
}
var ref:LoaderInfo = event.currentTarget as LoaderInfo;
var position:uint = my_loaderinfo_array.indexOf(ref);
my_textX_array[position] = (my_textX_array[position] - my_imgWidth_array[position]);
my_textWidth_array[position] = (my_textWidth_array[position] + my_imgWidth_array[position]);
}
glad you got it working. sorry i haven't had time to put together the restructured version i mentioned - i've been swamped. i might be able to find some time later this week, but at least you're operational at the moment : )