Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7646599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T10:15:01+00:00 2026-05-31T10:15:01+00:00

I’m new to actionscript 3, So Thank you in advance for any help you

  • 0

I’m new to actionscript 3, So Thank you in advance for any help you can give. Bascially what I’m trying to do is load 2 or more external images, all the same size and resolution, then combine or composite them one on top of the other, then save that result as a new image using a jpeg or png encoder.

I don’t want to take a snapshot of the stage, I’d like to save the images with thier original resolution. So far the only thing I’ve been able to do is load two images, and composite them on the stage. thats about it.

Can someone please give some insight into how to accomplish this. I’m using flash pro CS5.5, and writing code in a class file, not on the timeline. Here is a copy of the code.

package 

{

import flash.display.MovieClip;
import flash.display.Loader;
import flash.net.URLRequest;
import flash.events.*;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.utils.ByteArray;


public class imageComposite extends MovieClip
{

    var images:Array = ["koala.png","koala2.png"];//two images

    public function imageComposite()
    {
        // constructor code
        var thumbLoader:Loader;

        for (var i:uint = 0; i < images.length; i++)
        {

            thumbLoader = new Loader;
            thumbLoader.load(new URLRequest(("assets/" + images[i])));
            addChild(thumbLoader);
        }
        thumbLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,bmpData);
    }


    public function bmpData(evt:Event):void
    {

        trace("Event was completed successfully!");
    }


}

}

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T10:15:03+00:00Added an answer on May 31, 2026 at 10:15 am

    First you put both the Loader objects into a separate “holder” object.

    // constructor code
    var holder:Sprite = new Sprite();
    addChild(holder);
    
    var thumbLoader:Loader;
    
    for (var i:uint = 0; i < images.length; i++)
    {
    
        thumbLoader = new Loader;
        thumbLoader.load(new URLRequest(("assets/" + images[i])));
        holder.addChild(thumbLoader);
    }
    ...
    

    Later in your "complete" event handler:

    var bitmapData:BitmapData = new BitmapData(holder.width, holder.height, false);
    bitmapData.draw(holder);
    
    var byteArray:ByteArray = PNGEncoder.encode(bitmapData);
    

    Then you can write this byteArray object to the server or to disk (desktop AIR application).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
I am trying to render a haml file in a javascript response like so:
In my XML file chapters tag has more chapter tag.i need to display chapters
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
Does anyone know how can I replace this 2 symbol below from the string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.