Listener for last frame

ok, i want to set a listener in my class that fires a function when (currentFrames==totalFrames) but i’m trying not to make my class heavy, and don’t want to set an enterFrame listener or timer listener, COMPLETE does not seem to do the trick, any creative ideas out there?(-:

the only other option would be using addFrameScript

thanx that is interesting stuff!
but i looks like it would be heavier that just using EnterFrame, is it?

Why does it look heavier? It calls a function for that frame. That’s all it does.

ok your right, sorry.
i just took a quick glance at it at the end of the day, and from a quick glance it looks like it would add more bytes to the file size, but maybe not, it does look like it is less memory intensive though and thats what im trying to go for.
thanx sen you rawk!
:beer:

update, just added it and it’s working great, man that was like exactly what i was looking for!!!
really your great thanks for the guidance!
:party:

one more question, sorry
does this
addFrameScript[COLOR=#000000]([/COLOR][COLOR=#000080]2[/COLOR], [COLOR=#000000]null[/COLOR][COLOR=#000000])[/COLOR];
remove the frame or just the addFrameEvent on that frame?
now it’s time to make my destroy clean up function:sure:

[quote=GrndMasterFlash;2337941]one more question, sorry
does this
addFrameScript[COLOR=#000000]([/COLOR][COLOR=#000080]2[/COLOR], [COLOR=#000000]null[/COLOR][COLOR=#000000])[/COLOR];
remove the frame or just the addFrameEvent on that frame?
now it’s time to make my destroy clean up function:sure:[/quote]
EDIT**
never mind after doing some traceing i found out that it is does remove the listener and not the frame, cool, thanx agian

addFrameScript!! :love:

This is really interesting. Sometimes I really need to put some code on a frame and this way I could organize everything in just one accessible clean place.

Thx Senocular :wink: