So here is me, a smalltime C (not C++) programmer stuck with this new ActionScript thing and feel mega stupid to ask this…
A simple function won’t respond, I have a trace before the call and after it and both check out, there is no error.
The function is in the main timeline and so is the call, in fact on the same frame. Function is added to the actions of buttons, and call is an action of one specific button.
What oh what could be wrong folks? I have checked all I could think of. I have careated a simple function with just a trace in it and still no love for me, the stupid button just would not call the function, but happily shows traces.
For example my call is
on (release){
search_array=[153,154,155,156];
trace(search_array[3]);
// gotoandstop(153);
meow();
trace(“done”);
}
and meow simply is
meow()
{
trace(“meow”);
}
in the same time line, and nothing happens. In the previous version of the same movie it all worked fine, now that the designer (??) has designed it more it refuses to comply.
The ‘playhead’ had to pass through it before it was recognised, eh? No more days when you could just write it and it would wake up (at least if you absolutely addressed it)
Not impressed with this weird limitation.
anyone care to recommend an FAQ/tutorial for hacks like me? which might list nuisances like that?
i dont think its a ‘limitation’ but just a clear way of starting functions, if you want it to start in the beginning place it in the first frames either on the timeline or inside another MC, isnt clear and simple ???
where is the error?
you can’t use a function before it’s declared,
so just put the cat’s howl before your on(whatever)…remember, computers can only do what they’re told…
Now I get it, I was just wishing Flash Compiler (?) found it worth its while to throw a ‘function called before declared’ for people (refugees) from other languages
And overall, I find it just too economical with error and warning messages, Easier to fix things when the tool helps you at least find them…