This content has been marked as final. Show 9 replies
show the code you're using to set your variable.
Note the following code resides inside of a method.
there's no problem with the code you showed. if there's other code where your variable appears and it's not on the right-hand-side of an assignment operator (=), that may be the problem.
Thanks for looking at this issue with me.
As for additional code, there is none that makes any reference to the variable. I check and see if it exists in an if condition as posted above if it does not exists then it will lets say call a method playA(). Else it will call a method showButDontPlayA().
Nothing else makes a reference to it. So I was thinking that because its being created inside of a method it gets cleaned up right away once im out of the method.
Thinking of creating an array var at the top and then the method call can just add to the array since im keeping track of frames that are viewed. I dont think a var created at the top level can be cleaned out since it was not dynamically created.
Do you know of any links to information on variable persistence that you know of that are direct and not dozens of pages of blah blah blah information?
variables are not gc'd by flash unless they are local to a function/method and prefixed with var in a declaration (which you've just stated doesn't exist) or they are local to a timeline/movieclip that is removed.
Thanks for the clarity on the gc feature. I'm a bit baffled as my situation is none of the ones you have listed. The method that is called is on the main stage timeline and spans over all frames.
I'll have to play around a little more with it and if all else fails try a different way of dealing with this. Thanks again kglad.
I just found the issue.
Something about Flash I dont like. If you use ActionScript to place items on the stage, then when you try and find references to code such as my variable and it exists in a library item, Flash will NOT list the item in the Movie Explorer.
Only items that where manually placed on the Stage will show up in the listing for the Movie Explorer.
I did have a reference to the variable that was = and not ==.
Thanks a bunch kglad :)