You're having scope issues. When the onRelease function is called its scope is the movie clip (closer_mc), not the class. Try this:
At the top of your class' file: import mx.utils.Delegate; Then define the onRelease function this way: target_mc.closer_mc.onRelease = Delegate.create(this, removeMC); The Delegate will cause the removeMC function to be called with the class as scope (or whatever object you put as the first argument to create). -Andy On 9/7/07, Lee Marshall <[EMAIL PROTECTED]> wrote: > I have created a Class that has 2 functions within it > > Function 1 loads a movie clip > > Function 2 removes the movieclip > > > I have a button setup in function 1 that reads like this: > > target_mc.closer_mc.onRelease = function() > removeMC(); > }; > > > Of which contains a removeMovieClip(); > > > Except it doesn't does anybody have any advice on calling functions from > within a function? > > Many thanks > _______________________________________________ > [email protected] > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com > _______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com

