A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Passing class instance to button code created by that class...

Hybrid View

  1. #1
    Truimagz.com everfornever's Avatar
    Join Date
    Sep 2006
    Location
    St. Louis
    Posts
    1,306
    Not sure I understand 100% but what I think your trying to do is this.

    PHP Code:
        public function makeButton (mc:MovieClipstring:String) {
            
            var 
    myButton:MovieClip _root.attachMovie(stringstring_root.getNextHighestDepth())
                                                                                                  
            
    myButton.mc mc
            
            myButton
    .onRelease = function (){
                
                
    trace (this.mc " created me")
                
    trace ("I am " this)
                
            }
            
        } 
    Last edited by everfornever; 08-31-2007 at 10:52 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center