A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Image importer to MovieClips

  1. #1
    Registered User
    Join Date
    Nov 2010
    Posts
    1

    Image importer to MovieClips

    Does such a feature exist? Maybe someone out there created an extension that does this? I have 25 images in my library and I want to use the attachMovie function in AS2 but this doesn't work if it's an image. So instead of making all of these movie clips on my own I wanted to see if there was a way to export all of them into my library as movieclips. I am using CS4 btw.

  2. #2
    Member
    Join Date
    Jul 2008
    Location
    Čakovec, Croatia
    Posts
    34
    I didn't come to that kind of problem yet (meaning never had to attach images that way), but try with BitmapData class and reference as well.

    Something like this:

    PHP Code:
    import flash.display.BitmapData;

    var 
    linkageId "libraryBitmapPaletteColors";//***
    var myBitmapData BitmapData.loadBitmap(linkageId);

    var 
    palette this.createEmptyMovieClip("palette"this.getNextHighestDepth());
    palette.attachBitmap(myBitmapData,this.getNextHighestDepth()); 
    *** libraryBitmapPaletteColors is the image's identifier

    Hope this helps

    Alex
    Last edited by avukovi4; 12-18-2010 at 03:03 PM.

  3. #3
    Member
    Join Date
    Jul 2008
    Location
    Čakovec, Croatia
    Posts
    34
    Of course, to avoid attaching images one by one you can store them into an array and attach all of them at once...
    Last edited by avukovi4; 12-19-2010 at 11:30 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