I'm duplicating movie clips and during that process I'm setting a key number and a movieNumber that are on the timeline of the movie clip, then calling the setClipFunctions function below. When I pass the movieClip parameter to the function, the trace shows it picks up the key and movieNumber variable just fine, but when I click the Edit button,the trace shows the movieClip name but the key and movieNumber variables have set back to 0.
Code Actionscript:function setClipFunctions(a:MovieClip):Void { var thisClip:MovieClip = a; trace("this clip @ setClipFunctions = "+thisClip); trace("this key @ setClipFunctions = "+thisClip.key); trace("this movienumber @ setClipFunctions = "+thisClip.nMovieNumber); ....more code... //edit button thisClip.btEdit.onRelease = function() { trace("this clip @ btEdit = "+thisClip); trace("this key @ btEdit = "+thisClip.key); trace("this movienumber @ btEdit = "+thisClip.nMovieNumber); loadFormat(thisClip, thisClip.key, thisClip.nMovieNumber); thisClip._visible = false; }; }
The code in between just sets drag and drop parameters and a textbox, nothing that interferes with these two variables at all.
I don't understand how they have been reset or lost. Can anyone point out my error? I'm using Flash 8 and AS2




Bookmarks