A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: loadclip in as2.0 class

Threaded View

  1. #1
    Senior Member
    Join Date
    Sep 2002
    Posts
    185

    loadclip in as2.0 class

    Hi,

    I've got a problem using loadclip in a as2.0 imagecontainer class.
    It works fine when i place the image container on Stage, but when I attach the clip dynamically with attachmovie, nothing happens. this is what the class looks like. Does anybody have any ideas about this?

    when i do a trace in the loadImage function everything seems to be normal, nothing is null or undefined...
    Code:
    class imagecontainer extends movieclip
    {
        function imagecontainer()
       {
          target = createEmptyMovieClip("target")   
       }
    
        function loadImage( file )
        {
              var lc = new MovieClipLoader()
              lc.addListener(this)
    
              lc.loadclip( file, target )
        }
    
    }
    in the .fla file i write something like this:

    var im = attachMovie("imagecontainer", "image", 10)
    im.loadImage( 'file.jpg' )
    Last edited by Lexicon; 02-16-2006 at 10:59 AM. Reason: Please insert formatted code inside [code]tags[/code]
    I think...I dreamed...in pixels last night...

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