Load multiple external images

If you load say 3 external images in AS3 and want to run a function "useImages()" only once all three images have loaded what is the best way of listening for them to complete loading.
EG;
loader1.addEventListener(Eveent.COMPLETE, incLoader)
loader2.addEventListener(Eveent.COMPLETE, incLoader)
loader2.addEventListener(Eveent.COMPLETE, incLoader)
function incLoader(event:Event)
     numLoaded ++
     if (numLoaded == 3)
               useImages()
There must be a better way than the above.
Any feedback would be much appreciated
Thanks

Here's a set of functions I used to load pages into a flip page magazine app.  They keep track of how many pages are supposed to load and how many actually load.  I also used an XML file that the web people can update so that it loads different images.  You can add the loader objects in the loaders Array into any DisplayObjectContainer:
var pageCount:int = 3;
var pagesLoaded:int = 0;
var loaders:Array = new Array;
public function loadPage(aPage:String):void
  var pictLdr:Loader = new Loader();
  var pictURLReq:URLRequest = new URLRequest(aPage);
  pictLdr.load(pictURLReq);
  pictLdr.contentLoaderInfo.addEventListener(Event.COMPLETE, imgLoaded);
  pictLdr.addEventListener(IOErrorEvent.IO_ERROR, pictErrorHandler);
  loaders.push(pictLdr);
  updateLoadText();
private function imgLoaded(event:Event):void
  pagesLoaded++;
  addPagesToFlipBook();
private function pictErrorHandler(event:IOErrorEvent):void
  var ldrInfo:LoaderInfo = LoaderInfo(event.target);
  loaders.splice(loaders.indexOf(ldrInfo.loader), 1);
  pageCount--;
  addPagesToFlipBook();
private function updateLoadText():void
  errorText.text = "Loading image " + (pagesLoaded + 1) + " of " + pageCount + "..."
private function addPagesToFlipBook():void
  updateLoadText();
  if (pagesLoaded == pageCount)
    ... do more stuff
*edit* How do I create a code window for code?

Similar Messages

  • (HELP) - Loading multiple external images error #1010

    I'm a newbie at Flash and spent the whole day trying to fix this one problem and can't seem to fix it no matter what I do.
    I'm using Action Script 3.0, CS5 on Windows 7.
    I'm trying to load two external images (thumbnail images) in the loader "see image below for reference", where the full image size will be. However, I am getting this error when testing my movie. What am I doing wrong?
    Test Movie error message:
    "port1_btn
    TypeError: Error #1010: A term is undefined and has no properties.
        at index_fla::MainTimeline/fl_MouseClickHandler_6()"
    "port2_btn
    TypeError: Error #1010: A term is undefined and has no properties.
        at index_fla::MainTimeline/fl_MouseClickHandler_7()"
    FYI:
    Loader instance name: mainLoader
    Thumbnail #1 instance name: port1_btn
    Thumbnail #2 instance name: port2_btn
    This is my code

    Go into your Flash Publish Settings and select the option to Permit Debugging.  Then the error messages could include an indication of which lines are causing the problem.
    And just for the sake of asking since the code is somewhat minimal... is the mainLoader inside a container named portfolioBkgd?

  • Use Web API url for loading an external image in a report

    Hi there,
    I am trying to host an image in a report, which is coming out of a Web API. I am able access the image through a URL in a browser:
    https://companytest.com/api/TestFormImage?id=10358&EntityId=6719&imgMetadataName=TestDiagram
    Can anyone please help me how to include this in a report ? I have tried to include this as an external image with the URL embedded as a string like: 
    =string.Format("https://companytest.com/api/TestFormImage?id=10358&EntityId=6719&imgMetadataName=TestDiagram")
    NOTE: the output of the Web API is an image of MIME type PNG.
    Thanks in advance!
    Regards, Laks

    To add an external image
    In report design view, on the Insert tab, click Image.
    On the design surface, click and then drag a box to the desired size of the image.
    On the General tab of the Image Properties dialog box, type a name in the
    Name text box or accept the default.
    (Optional) In the Tooltip text box, type text to display when the user hovers over the image in a report rendered for HTML.
    In Select the image source, select External.
    For an image on a report server in native mode, type a relative path to the image in the
    Use this image box—for example, ../images/image1.jpg.
    For an image on a report server in SharePoint integrated mode, or any other Web site, type a full URL to the image in the
    Use this image box—for example, http://<SharePointservername>/<site>/Documents/images/image1.jpg.
    For more information, see Specifying Paths to External Items (Report Builder and SSRS).
    (Optional) Click Size, Visibility, Action, or
    Border to set additional properties for the image report item.
        Click OK.
    Andy Tauber
    Data Architect
    The Vancouver Clinic
    Website | LinkedIn
    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click
    "Mark as Answer" and "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.

  • (SOLVED!... mostly) Can I load an external image within my custom class?

    Hello there!
    I'm starting to work a lot with Classes, but I'm still reletively new to them.  I wrote a "creature" class (which extends Sprite), and I have everything working nicely... except for when it comes to displaying the image of the creature.
    In previous programs, I've been able to load external Bitmaps using the Loader class.  However, this can only be done from the main timeline in Flash, right?  Such as this:
    var imgLoader:Loader = new Loader();
    imgLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, done);
    imgLoader.load(new URLRequest("001.png"));
    function done(evt:Event):void {
        addChild(Bitmap(imgLoader.content));
    Ideally, what I'd like to do is just have a function within my class.  The function would contain the addChild statement, so I could simply do:
    var MyCreature:creature = new creature();
    MyCreature.loadImage();
    However, I would be equally as happy if I could just load the Bitmap and return it from the class.  Then I could addChild myself in the main timeline:
    var MyCreature:creature = new creature();
    addChild(MyCreature.getBitmap());
    I've tried putting the Loader code in a function within the creature class, however it isn't working.  It didn't return any errors, but it also didn't display anything, despite it containing the addChild statement.  Using the trace command, it looks like its getting inside the function, however addChild doesn't do anything.  Am I missing something?  Is there a better way?
    Here's the function in my creature class:
    public function loadImage(){
         var imgLoader:Loader = new Loader();
         imgLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, done);
         imgLoader.load(new URLRequest("001.png"));
         function done(evt:Event):void {
               trace("It gets to this point just fine");
               addChild(Bitmap(imgLoader.content));
    Thank you!

    Sorry!  Sure enough, I browse the web for hours, unable to find a solution, post a forum post, and then I find a solution.
    http://stackoverflow.com/questions/5036650/as3-addchild-in-a-class
    I simply forgot to add the addChild(MyCreature) in the main timeline.  Duh.  <3

  • Loading an external image (from file system) to fla library as MovieClip symbol.

    Hi everyone,
    I am new to actionscript and Flash.
    I have been working on code updation project wherein initially we had an image and text as movieclips in fla library. The image and the text are read by the actionscript program which then creates an animation.
    For Example:
    // Picture
    // _imageMC: Name of the Movie Clip in the libary which
    // contains the picture.
    var _imageMC:String = "polaroid";
    This is later on used by another actionscript class as follows to finally create the animation.
    var _mcPolaroid:MovieClip = this._mcBg.attachMovie(this._polaroid, "polaroid_mc", this._mcBg.getNextHighestDepth());
    Now the problem here is when one needs to update the image or text, one needs to go and open the fla file andmanually change the image attached to the movieClip (polaroid).
    I want to ease the updation process by giving the url of the image in an XML file. Read the image url from the xml and load this image in the library of the fla as movieclip. This, i think, will result in less code change and improve the updation of the final animation image.
    The problem i am facing is not been able to figure out how can i change the image (after fetching its URL) to a movieclip and then load it in the library?
    Thank you kindly in advance,
    Varun

    This is the AS3 forum and you are posting with regards to AS2 code.  Try posting in the AS2 forum...
    http://forums.adobe.com/community/flash/flash_actionscript
    As for the solution you seem to want.  You cannot dynamically add something to the library during runtime.  To add an image during runtime you would need to use the MovieClip.loadMovie() or MovieClipLoader.loadClip() methods.  You could have the movieclip pre-arranged in the library, but to add the image dynamically via xml information you need to load it into a movieclip, not the library.

  • Loading an external image (from file system) to fla library as MovieClip symbol using ActionScript.

    Hi everyone,
    I am new to actionscript and Flash.
    I have been working on code updation project wherein initially we had an image and text as movieclips in fla library. The image and the text are read by the actionscript program which then creates an animation.
    For Example:
    // Picture
    // _imageMC: Name of the Movie Clip in the libary which
    // contains the picture.
    var _imageMC:String = "polaroid";
    This is later on used by another actionscript class as follows to finally create the animation.
    var _mcPolaroid:MovieClip = this._mcBg.attachMovie(this._polaroid, "polaroid_mc", this._mcBg.getNextHighestDepth());
    Now the problem here is when one needs to update the image or text, one needs to go and open the fla file andmanually change the image attached to the movieClip (polaroid).
    I want to ease the updation process by giving the url of the image in an XML file. Read the image url from the xml and load this image in the library of the fla as movieclip. This, i think, will result in less code change and improve the updation of the final animation image.
    The problem i am facing is not been able to figure out how can i change the image (after fetching its URL) to a movieclip and then load it in the library?
    Thank you kindly in advance,
    Varun

    The following was my attempt: (i created a new MovieClip)
    this.createEmptyMovieClip("polaroidTest", this.getNextHighestDepth());
    loadMovie("imagefile.jpg", polaroidTest)
    var _imageMC:String = "polaroidTest";
    This mentioned variable _imageMC is read by a MovieClip class(self created as follows)
    /////////////////////////////// CODE STARTS //////////////////////////////////////
    class as.MovieClip.MovieClipPolaroid {
    private var _mcTarget:MovieClip;
    private var _polaroid:String;
    private var _mcBg:MovieClip;
    private var _rmcBg:MovieClip;
    private var _w:Number;
    private var _h:Number;
    private var _xPosition:Number;
    private var _yPosition:Number;
    private var _border:Number;
    * Constructor
        function MovieClipPolaroid(mcTarget:MovieClip, polaroid:String) {
    this._mcTarget = mcTarget;
    this._polaroid = polaroid;
    init();
    * initialise the polaroid movieclip and reflecting it
        private function init():Void {
    this._border = 10;
    this.initSize();
    this.setPosition(48,35);
    this.createBackground();
    var _mcPolaroid:MovieClip = this._mcBg.attachMovie(this._polaroid, "polaroid_mc", this._mcBg.getNextHighestDepth());
    _mcPolaroid._x = _border;
    _mcPolaroid._y = _border;
    var _rmcPolaroid:MovieClip=this._rmcBg.attachMovie(this._polaroid,"rpolaroid_mc", this._rmcBg.getNextHighestDepth());
    _rmcPolaroid._yscale *=-1;
    _rmcPolaroid._y = _rmcPolaroid._y + _h + _border ;
    _rmcPolaroid._x =_border;
    * create the background for the polaroid
    private function createBackground():Void {
    this._mcBg = _mcTarget.createEmptyMovieClip("target_mc",_mcTarget.getNextHighestDepth());
    this._rmcBg = _mcTarget.createEmptyMovieClip("rTarget_mc", _mcTarget.getNextHighestDepth());
    fill(_mcBg,_w+2*_border,_h+2*_border,100);
    fill(_rmcBg,_w+2*_border,_h+2*_border,10);
    placeBg(_mcBg,_w+2*_border,_yPosition);
    placeBg(_rmcBg,_w+2*_border,_h+2*_border+_yPosition);
    * position the background
    private function placeBg(mc:MovieClip,w:Number,h:Number) : Void {  
        mc._x = Stage.width - w - _xPosition;
    mc._y = h;
    * paint the backgound
    private function fill(mc:MovieClip,w:Number,h:Number, a:Number): Void {
    mc.beginFill(0xFFFFFF);
    mc.moveTo(0, 0);
    mc.lineTo(w, 0);
    mc.lineTo(w, h);
    mc.lineTo(0, h);
    mc.lineTo(0, 0);
    mc.endFill();
    mc._alpha=a;
    * init the size of the polaroid
    private function initSize():Void {
    var mc:MovieClip =_mcTarget.createEmptyMovieClip("mc",_mcTarget.getNextHighestDepth());
    mc.attachMovie(this._polaroid,"polaroid_mc", _mcTarget.getNextHighestDepth());
    this._h = mc._height;
    this._w = mc._width;
    removeMovieClip(mc);
    mc = null;
    * sets the position of the polaroid
    public function setPosition(xPos:Number,yPos:Number):Void {
    this._xPosition = xPos;
    this._yPosition = yPos;
    * moving in
    public function moveIn():Tween {
    var mc:MovieClip = this._mcTarget;
    mc._visible=true;
    var tween:Tween = new Tween(mc, "_x", Strong.easeOut, 0, 0, 1, true);
    var tween:Tween = new Tween(mc, "_y", Strong.easeOut, 200, 0, 1, true);
    var tween:Tween = new Tween(mc, "_xscale", Strong.easeOut, 30, 100, 1, true);
    var tween:Tween = new Tween(mc, "_yscale", Strong.easeOut, 30, 100, 1, true);
    var tween:Tween = new Tween(mc, "_alpha", Strong.easeOut, 0, 100, 1, true);
    return tween;
    * moving in
    public function moveOut():Tween {
    var mc:MovieClip = this._mcTarget;
    var tween:Tween = new Tween(mc, "_alpha", Strong.easeIn, 99, 0, 1, true);
    var tween:Tween = new Tween(mc, "_x", Strong.easeIn,0, 1000, 1, true);
    var tween:Tween = new Tween(mc, "_y", Strong.easeIn, 0, -50, 1, true);
    var tween:Tween = new Tween(mc, "_xscale", Strong.easeIn, 100, 50, 1, true);
    var tween:Tween = new Tween(mc, "_yscale", Strong.easeIn, 100, 50, 1, true);
    return tween;
    /////////////////////////////// CODE ENDS ///////////////////////////////////////
    As in the current case, the name of the movieclip which has the image (originally polaroid) is being read through the variable _imageMC which we hadd given the value "polaroidTest".
    The animation shows no image even when i have inserted the correct url (i m sure this step isn't wrong).
    Any clues?

  • Loading multiple external jpgs...

    I'm trying to go through a for loop, create a movieclip for each database entry, add the image by url stored. The problem is the code I have only does the last image. I know it's because something is not incrementing and they all have the same name. Do I need to increment the name of my loader? Holder or what?
    var resultsLength:Number = result.serverInfo.initialData.length;
    for(var i:uint = 0; i < resultsLength; i++){
      var thisClip:MovieClip = new ProductBox();
      cleanse_mc.addChild(thisClip);
      thisClip.x = currentX;
      thisClip.y = currentY;
      currentX += moveX;
      // populate image
      var thumbLoader:Loader;
      var holder:MovieClip = new MovieClip();
      thumbLoader = new Loader();
      var thisImage:String = String(result.serverInfo.initialData[i][14]);
      var thumbRequest:URLRequest = new URLRequest(thisImage);
      thumbLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, introCompleteHandler);
      thumbLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, introProgressHandler);
      thumbLoader.load(thumbRequest);
      function introCompleteHandler(loadEvent:Event){
       var image:Bitmap = (Bitmap)(loadEvent.target.content);
       thisClip.addChild(holder);
       holder.addChild(image);

    no, something that would preserve all you movieclips/positions while you're waiting for image loading to complete:
    var resultsLength:Number = result.serverInfo.initialData.length;
    var i:unit=0;
    var thisClip:MovieClip();
    loadF();
    function loadF(){
      thisClip = new ProductBox();
      cleanse_mc.addChild(thisClip);
      thisClip.x = currentX;
      thisClip.y = currentY;
      currentX += moveX;
      // populate image
      var thumbLoader:Loader;
      var holder:MovieClip = new MovieClip();
      thumbLoader = new Loader();
      var thisImage:String = String(result.serverInfo.initialData[i][14]);
      var thumbRequest:URLRequest = new URLRequest(thisImage);
      thumbLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, introCompleteHandler);
      thumbLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, introProgressHandler);
      thumbLoader.load(thumbRequest);
      function introCompleteHandler(loadEvent:Event){
       var image:Bitmap = (Bitmap)(loadEvent.target.content);
       thisClip.addChild(holder);
       holder.addChild(image);
    i++;
    if(i<resultsLength ){
    loadF()

  • AS3 Load external image and add multiple instances to mcs

    Hi,
    Is there any way to load an external image and add it to more than one movie clip?
    Thanks,
    Chris McLaughlin

    Hi kglad,
    I was loading a larger jpeg to which I was applying 20 different masks so using the bitmapdata class to create duplicates was the best solution.
    It took me some time to wrap my head around it, but all is well.
    Thanks for pointing me in the right direction.
    Best regards,
    Chris

  • Load external image & text into SWF

    Can someone point me to a tutorial on how to create a
    template that will load an external image file,.css styled text
    & a .css style sheet into a .swf by using .xml?
    Thank you for your time.
    CK

    You can use the MovieClipLoader class to load multiple images sequentially (one at a time), but you wouldn't use a 'for' type of loop...instead you would use a recursive loop, where a loading function is called after each load completion until all loading in done.  This is done by utilizing a load-complete listener to trigger loading of the next image.  So you start the loading process by loading one file, when that file is determined to be loaded, the listener proceses that file in whatever way you need to prepared (resizing, etc) and triggers the loading of the next file.
    If you look up the MovieClipLoader.addListener method in the Flash help documents there is an example there that uses the onLoadInit event.  You would be wanting to use the onLoadComplete event.

  • Loading external Images in MovieClips

    Dear All,
    I am trying to load the external images in Dynamically
    created Movie Clips.
    Can you please help me out from this.
    I am trying something like this:
    Container_mc.image_mc ( I want to load the Images inside the
    imag_mc clip)
    Regards,
    Sridhar B
    Container_mc.image_mc
    imag_mc

    Hi,
    Following is my problem:
    I am trying to trace the "idValue" property on runtime but it
    is showing error. Can you please tellme how add Images and
    properties runtime.
    var loader:Loader = new Loader()
    addChild(loader)
    loader.load(new URLRequest("images/01.png"))
    // Assigning a value to idValue property
    mc_mainSWF.idValue = 40
    mc_mainSWF.addChild(loader)
    mc_mainSWF.addEventListener(MouseEvent.CLICK, checkID)
    function checkID(event:MouseEvent)
    // And i am geeting error here
    trace(event.target.idValue)
    Regards,
    Sridhar B

  • Loading External Images

    Hey, I've been having a niggly problem for a while now. I'm
    using MovieClipLoader and a Listener to load in external images.
    All the images load in fine, but often (not always) the onLoadInit
    and onLoadComplete events don't seem to work on the last image I
    load, so if I've got a dynamic text box that I want to disappear
    when loading is complete, it doesn't, only on the last image of a
    group, even tho the image itself loads correctly.
    Anyone come across this before? You can see an example on the
    index page of
    this site.

    nice site, good job :) I would guess that if you are using
    both events on the same call, one is getting triggered before the
    other, since they both operate at a similar time. similar but not
    the same, onLoadComplete happens when the load is complete,
    onLoadInit happens when the first frame of the loaded timeline
    plays. Therefore if your listening for both on the same load call,
    one may happen before the other, and may override or change the
    event sequence, occationally.
    Just a guess though, I think you should consider using one or
    the other, and firing all other functions from there.

  • How to load and unload Multiple External SWF

    hello there,
    i need help to figuring out how to load and also unload(removing) multiple external SWF.
    so here is what i;m trying to do,
    i want to load multiple external SWF and play it on my main SWF now i hove no problem with just loading multiple SWF and placing it in the display list .The problem came up when i tried removing those loaded SWF from the display list ,The problem exist because i have no way to refer to what i have loaded and placed on the display list,
    i used a single loader instance to load all that external swf,
    i do know that we have to remove all the event listener related to the external SWF that we want to remove and for this purpose i have crated a function called destroy which the main objective for this function is to remove all event listener inside the swf and also isolating all variable so it would be eligible for garbage collecting, here is what the code look like:
    // Create this in every object you use
    public function destroy():void
         // Remove event listeners
         // Remove anything in the display list
         // Clear the references to other objects, so it gets totally isolated
    sorry it just a kind of pseudocode cause this function will customize with it's own property i did this just for the purpose of simplicity and easy understanding..,
    so now back to main problem how should i solve this problem??
    i tried used an arraf to save all the loaded swf
         the array is just used to save the what the loader is loading but the adding to display method is using
    movieClipActAsContainer.addChild(e.target.content); //the event is from the Event.COMPLETE
    but i have a hard time using that arrya back and matching it to the one i got from the display list.
    please do help me,
    any suggestion would be greatly appreciated,
    and if can pleas show me a source code or pseudocode of what you're suggesting to me cause my english is not so fluent yet,
    thanks before.

    Hey EI,
    I had done this kind of project recently and for loading and unloading different swfs. I had used loaders specific to that filename and for removing I had used a single movieclip instance name and on clicking that specific loader request name that needs to be removed will be requested from the specific function. As mentioned below
    Loading SWF:
    ===============================
    swfLoaderIndia.load(swfRequestIndia);//This will load the request
    If you are inside a movieclip while requesting use below code
    MovieClip(this.root).addChild(swfLoaderIndia);//This will load swf on stage
    or else
    Stage.addChild(swfLoaderIndia);
    Unloading SWF
    =====================================
    If you are inside a movieclip while requesting use below code
    MovieClip(this.root).removeChild(swfLoaderIndia);//This will unload swf on stage
    or else
    Stage.removeChild(swfLoaderIndia);
    Above code will be in specific function which will be requested when the loading and unloading is required.
    I hope this helps you in your project.
    With Regards,
    Sagar S. Ranpise

  • Unable to load external image into iOS app with AS3

    Just trying out Flash Builder for iOS app development and have run into a problem right off the bat with loading an external image into an iOS app.  The actionscript is very simple (this was basically my Hello World attempt), and I'm hoping someone here can explain where I'm going wrong.  This code works in Flash Pro, and works when launched on the desktop from Flash Builder, but doesn't work on my iOS devices.
    Here's the code:
                                  var container:MovieClip = new MovieClip();
                                  addChild(container);
                                  var imageLoader:Loader = new Loader();
           imageLoader.load(new URLRequest("http://www.google.ca/intl/en_ALL/images/logos/images_logo_lg.gif"));
                                  imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, startListener);
      function startListener (e:Event):void{
                                                 container.addChild(imageLoader);
    Any thoughts on why this won't work would be greatly appreciated!

    I had the same issue, and modified my domain policy file as specified  in http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security.html#_Configuring_URL_M eta-Policies but the loader is not loading the file. Any ideas on how to fix this issue?

  • Problem with Loader, trying to load multiple png files, error 1069 on the contentLoaderInfo

    Hi helpers !@
    im trying to load multiple external png files from a folder.  the path for the images comes from an xml attribute and i got no problem with the path. The error message pops on when i try to add the loader into an array for later use and then when im done remove each child i created.  There is something in my pratice that is not ok , i meen i know im wrong with at some point !  Duh theres an Error message for each loader i create .. .
    ReferenceError: Error #1069: Property Loader not found on flash.display.LoaderInfo and there is no default value.
    here some code  , pls  guide me !
    function affichageM(){
      var nodeM:XML;
    for each ( nodeM in listeM ){
       var reqM:String = localLogoM + nodeM.attribute("icon_max2");
       var imageLoaderJ = new Loader();
       imageLoaderJ.contentLoaderInfo.addEventListener(Event.INIT,addM);
       imageLoaderJ.load(new URLRequest(reqM));
         // just counting for fun
       iNodeM ++;
    function addM(e:Event){
    try { var l_img:Loader = Loader(e.currentTarget.Loader);
           l_img.name = "imageLoaderJ" + mc_ArrayImg.length().toString() ;
           l_img.visible = false;
           mc_ArrayImg.push(l_img);
           mc_Jour.addChild(l_img);
             //calling the fucntion that will animate all img in the array and had some text to them.....
          drawMyImg(mc_ArrayMImg.length()-1);
    catch (error:Error) {
           //just counting errors for fun
          iErreurM++;
            var errorMessage:TextField = new TextField();
            errorMessage.autoSize = TextFieldAutoSize.LEFT;
            errorMessage.textColor = 0xFF0000;
            errorMessage.text = error.message + " " +  mc_Jour.numChildren + " " + mc_ArrayImg.length;
            errorMessage.x = 10*iErreurM;
            addChild(errorMessage);
            return;

    Hi, I'm not sure you are on the correct forum. This is the Flash Player forum. When you first open your thread, look to your right "More like This" and perhaps one of those forums would be helpful. Perhaps the Flash forum?
    Thanks,
    eidnolb

  • FAQ: How do I load an external SWF file into a parent SWF file?

    A ton of Flash users visit Adobe’s we site every month wondering  about how to load an external SWF file from within another SWF.
    Adobe's own TechNote on the subject attempts to answer the basic question, along with some common follow-up questions, including:
    How do I load more than one SWF?
    How do I load a SWF into a specific location in the display list?
    How do I resize the loaded SWF?
    How do I set its X and Y location?
    Here are some additional resources that elaborate on loading content and on working with the display list:
    Sample files for the above TechNote. A set of 3 FLA and 3 corresponding SWF files, including a parent SWF and 2 SWFs that the parent loads.
    Help > AS3 Developer’s Guide > Loading an external SWF file
    Help > AS3 Developer’s Guide > Loading display content dynamically
    Loading multiple external SWFs within a main SWF – CreativeCow.net forums
    Video tutorial: ActionScript 101 – Episode 6: Adding named objects to the Stage. By Doug Winnie. An example of how to add the loaded external asset to the Stage and modify its location or other properties.
    Video tutorial: Preloading in ActionScript 3.0.  By Lee Brimelow. A slightly more complicated example, showing how to  make the parent SWF display information about the progress of loading  the external SWF.
    Tutorial: Loading and unloading SWFs - FlashAndMath.com
    This article provides several examples of how to communicate between a parent SWF file and the loaded SWF:
    SWF to SWF Communcation via ActionScript 3.0 (by kglad)

    quote:
    Originally posted by:
    NedWebs
    You now seem to want to get rid of the swf once it has loaded
    and played itself thru. To do that you would need to have something
    in the swf itself that triggers its removal in its last frame. The
    following might work...
    MovieClip(this.parent).removeChild(this);
    Unfortunately I couldn't get this to work. I placed it on the
    last frame of the SWF to be called - is that right?
    I am not sure I am doing it correctly...

Maybe you are looking for

  • Edited pdf does not display properly

    I scanned in doc to a .pdf. It displayed properly on iPad (iBooks). I added some text using preview. It did not display when reading it to iBooks. Thinking it was a layering issue, I "Flattened" the file with Adobe Acrobat Pro, and freaked it to iBoo

  • Audio interfaces for Logic

    i want to take my recording a step further. i currently have a presonus firebox. i want to start doing some multi channel recording from my mpc2000xl. does anyone have any suggestions about which brands i should look at that work well with logic?

  • Using a landline number as displayed caller id

    Is it possible to use a landline number as displayed caller id, instead of a mobile number?

  • Error when bouncing audio to movie

    Has anyone else experienced this? As a workaround, I've had to bounce the audio to a stereo aiff file; then create a new project in Logic and import the QuickTime Pro video into this new project; then bounce the audio to the movie file. It's not such

  • ASM crash

    version 11.2.0.3 on Linux While  duplicate was in progress, an attempt to rebalance DG in ASM instance lead to crash of ASM and DB on the auxiliary host. Database alert log reported ora-04031.  What could be the reason.