(HELP) - multiple loading external images #1010 error

I am a newbie in Flash and spent all day trying to solve this problem and can't solve this no matter what I do.

I use Action Script 3.0, CS5 on Windows 7.

I am trying to load two external images (thumbnails) in the magazine "See the picture below for reference", where will be the size of the full image. However, I get this error when testing my movie. What I am doing wrong?

portfoliobutton.JPG

Film test error message:

'port1_btn '.
TypeError: Error #1010: a term is undefined and has no properties.
to index_fla::MainTimeline/fl_MouseClickHandler_6().

'port2_btn '.
TypeError: Error #1010: a term is undefined and has no properties.
to index_fla::MainTimeline/fl_MouseClickHandler_7().

FOR INFO:

Loader instance name: mainLoader

Miniature #1 the instance name: port1_btn

#2 miniature instance name: port2_btn

This is my code

portfoliobutton_codeerror.JPG


Go to your publication of Flash settings and select the option to enable debugging.  Then, the error messages could include an indication of which lines are at the origin of the problem.

And just for fun to ask because the code is a bit weak... is the mainLoader inside a container named portfolioBkgd?

Tags: Adobe Animate

Similar Questions

  • Problem moving loaded external image

    I am new to AS3 and I'm having a problem moving an external image loaded into a class. I don't know how to move the loaded external image.  I thought about creating a Sprite and then passing an extra child Sprite, which I would then load the image.  But I get this error:

    1119: access of property may be undefined spHolder through a reference with static type flash.display:Sprite.

    I commented below where the error is triggered:

    ==========================================

    package {}


    import flash.display.MovieClip;
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.display.Loader;
    import flash.net.URLRequest;

    SerializableAttribute public class extends MovieClip {} snapshot

    public var strLink:String;
    public var strImage:String;
    private var spPolaroid:Sprite = new Sprite();
    private var ldPhoto:Loader;

    function SnapShot(strImg:String,strURL:String):void {}

    strLink = strURL;
    strImage = strImg;

    trace ("new snapshot");

    spPolaroid.graphics.beginFill (0xCCCCCC);
    spPolaroid.graphics.drawRect (0,0,120,140);
    addChild (spPolaroid);

    var spHolder:Sprite = new Sprite();
    spHolder.x = 10;
    spHolder.y = 10;
    spPolaroid.addChild (spHolder);

    loadImage (strImage);

    };

    private void loadImage(strUrl:String):void {}

    ldPhoto = new Loader();
    ldPhoto.load (new URLRequest (strUrl));
    ldPhoto.contentLoaderInfo.addEventListener (Event.COMPLETE, imageLoaded);

    };

    private void imageLoaded(evt:Event):void {}

    spPolaroid.spHolder.addChild (ldPhoto); This is where the error is to hit

    };

    };

    };

    ==========================================

    I can honestly say that I don't know why the problem exists... and that's probably because I'm not well versed in the field of the class.  But since you have a handle on the spHolder object, you do not need to target through the parent...

    private void imageLoaded(evt:Event):void {}
      
    spHolder.addChild (ldPhoto);
               
    };

  • How to load external images and animate it after it is loaded?

    I know how to load external images using xml, but the problem is that if I have a lot of images to load then animate after it is loaded. I know theres a work around to this problem but still I have not understand.

    Thanks for help.

    You will need to use the MovieClipLoader class.  It supports have a headset which allows you to determine when the image has loaded so that you can act on it.

    If you are looking for the MovieClipLoader.addEventListener methoid (), there is an example that will be useful to see how to configure things (it's not your scenario, but a good reference).

  • Load external images in symbol or rectangle

    Hello

    Is a way to load external images into a symbol or a rectangle?

    Just google this topic and all the results I found looks like no work aboard animate 2014.1.1

    something like $(this.lookupSelector("target")).attr("src","folder/myimg.jpg");

    Loading jquery im - 2.1.1.min.js

    Thank you.

    Ok. If you have a container div, then it's easy. png or jpg or svg extension

    SYM. $('containerDivName') .css ({'background-image': 'url ("images/imageName.png")', 'background-repeat': 'no-repeat'});

  • Loading external Images causes memory leak

    I worked on an Actionscript 2.0 project that essentially loads external images.
    Whenever I have load and unload a new image, memory increases to 1 or 2 MB
    If all the images are in the cache, then it grew 4 or 8 KBs
    In the unloading of the images, I took the charger and the container of the image.
    Any thoughts why it behaves like this?
    Please find the below sample code snippet.


    ////////////
    btn_load.onRelease = function()
    {
    loadImage();
    }
    btn_unLoad.onRelease = function()
    {
    unLoadImage();
    }
    var mcListener:Object = new Object();
    var container1:MovieClip;
    var mcLoader:MovieClipLoader;
    var loader_reference =;
    var n = 0;
    function loadImage() {}
    var image_arr = ["http://xyz.com/image1.png ',' http://xyz.com/image2.png ',' http://xyz.com/image3.png ',' http: /xyz.com/image4.png http://xyz.com/image5.png ',''"];
    image_url var = image_arr [n];
    {if(n==image_arr.) (Length-1)}
    n = 0;
    } else {}
    n ++ ;
    }

    container1 = loader_reference.createEmptyMovieClip ("Container1", loader_reference.getNextHighestDepth ());
    mcLoader = new MovieClipLoader();
    mcLoader.removeListener (mcListener);
    mcLoader.addListener (mcListener);
    mcListener.onLoadComplete = {function(target_mc:MovieClip,_httpStatus:Number):Void}
    }
    mcListener.onLoadInit = {function(target_mc:MovieClip):Void}
    target_mc._x = 300;
    target_mc._y = 200;
    target_mc._width = 300;
    target_mc._height = 250;
    }
    mcLoader.loadClip (image_url container1);
    }
    function unLoadImage() {}
    mcLoader.unloadClip (container1);
    mcLoader = null;
    container1 = null;
    removeMovieClip (loader_reference.container1);
    }
    ////////////

    Thanks in advance.

    This code should run only once.  fix this.

  • Loading external images

    Can someone tell me if there is a way to load external images into a SWF file. The size of the file becomes large enough, and I'm trying reduced.
    Thank you

    http://www.Kirupa.com/developer/FlashCS3/loading_image_as3_pg2.htm

  • AS3 load external image and add multiple instances in Member States

    Hello

    Is it possible to load an external image and add it to more of a clip?

    Thank you

    Chris McLaughlin

    You can load several times, or you can use the bitmapdata class to make copies of the loaded bitmap image.

  • Load external images and video on board

    Hello.

    I'm looking into the edge instead of flash.

    My question is how to load you external images and videos from an external server?

    To clarify, I need to insert a link where the images can be recharged on the stage, while they don t meet the final weight.

    Thanks in advance.

    Best,

    Stig.

    I have provided the above solution works if you have the images in your publication and if you want to form load images from another server rather than the relative location of your html file.

    Now if you want to load images dynamically in a rectagle container you will have to code.

    Here is an example for this

    Create a "rectangle" name "Rectagle.

    Add the code snippet in the composition of the ready or other actions user based on your requirement

    "" var myImagetag = 'http://wwwimages.adobe.com/include/style/default/SiteHeader/logo-2x.png ">"

    SYM.$("rectangle"). Append (myImagetag);

  • Help to load several images through LoadVars

    Hello everyone.

    I need a hand load several images using the LoadVars with a text file. I can get it to upload 1 image but no more than that. I'm aware of other methods such as the use of components, but I'm looking for a method where I can access and modify all data of the 1 text file (there will be a text variable in the file aswell to, but I am more concerned about the images at the moment).

    In any case on the issue. I created a simple .fla file of many that describes my problem.

    The film contains 3 layers:

    -top layer contains ACE

    -middle layer contains a clip empty film with the name of the instance of mcImage1

    -lower layer contains a snippet of film empy with the name of the instance of mcImage2

    The AS level contains the following code:

    ImageData = new LoadVars()
    ImageData.Load ("Data.txt")
    imagedata.onLoad = {function (ok)}
    {if (OK)}
    mcImage1.loadMovie (this.) Image1)
    mcImage2.loadMovie (this.) Image2)
    } else trace ("loading issue")
    }


    In the same folder of my .swf file, I have a text file called data.txt that contains the following

    & Image1 = image1.gif
    & Image2 = image2.gif

    In the same folder of my .swf file, I also image2.gif and two image image1.gif.

    When I run the flash the image2.gif is correctly imported. Image1.gif does not appear.

    You can download my source files and all images here

    http://www.myrealpage.com/projects/var_test/var_test.zip

    Any help that can be made on this problem is highly appreciated.

    Thank you

    Matt

    Hi again Rothrock.

    I just wanted to say thank you for taking the time to help me. I have the file works as expected today.

    For those who are interested here is what I ended up doing

    In my data.txt file:

    & Image1 = image1.gif & Image2 = image2.gif

    All first framework covering the timeline with the video clips.

    var img1:String;
    var img2:String;
    var img3:String;
    var img4:String;
    var img5:String;
    ImageData = new LoadVars();
    imagedata.onLoad = {function (ok)}
    {if (OK)}
    img1 is this. Image1;
    img2 is this. Image2;
    img3 is this. Image3;
    img4 is this. Image4;
    img5 is this. Picture5;
    } else trace ("loading issue");
    }

    ImageData.Load ("Data.txt");

    And on each individual framework where I wanted my movieclips mcImage

    mcImage1.loadMovie (_root.img1); or mcImage2.loadMovie (_root.img2); and so on.

    Thanks again for your time. It was very appreciated.

    Matt

  • onClipEvent and loading external images

    I'm a flash newbie and I'm changing images, the following calls. (With the help of CS4 and 2.0)

    onClipEvent (load)

    {

    imageProperties = _root.getCurrentImageName (0);

    loadMovie (_root.url + imageProperties.name, this.cont.pic);

    URL = imageProperties.linkToOpen;

    targetWindow = imageProperties.target;

    }

    Where is the getCurrentImageName call the image from? or...
    Where did the imageProperties.linkToOpen pointing towards?
    Honestly, I get that I could find the image in the directory and change just outside with the same name/pixel size, but I would also add other images of this project with the same conditions.
    I'm probably one of those girls who knows enough to cause more damage than good, so at least to point me in the right direction. Please help ~; p

    In the main scenario, there should be some actionscript that includes a function named getCurrentImageName.  Just as the done function it is assigning values to an object named imageProperties, which we risk a web address (url)

  • XML. Mc load external images not visible mac

    Hello

    I'm going crazy, I just finished a site in flash for a client, I used some basic xml actionscript to dynamically load images, but it does not work on mac (safari/firefox) and sometimes not on a pc with flash 8 installed. I have flash 9 installed on my pc and it works fine.

    This is the url:
    http://www.Gijs.com/Klanten/EZ/

    If you click list (events), you should see images accumulate.

    Could someone throw out me in the face and tell me what that th f * I am doing wrong. He thinks it's the code, but I'm not a really qualified actionscripter.

    If help is really appreciated.
    Thanks in advance

    PROBLEM SOLVED
    I've screwed to the top of the image links check out the adobe tutorial on the paths related and what reading xml file Insert spaces infront of your image url

    http://www.Adobe.com/cfusion/knowledgebase/index.cfm?id=tn_04157
    So after <! [CDATA [directly the url of the image while this works in fr IE Firefox on windows with a space it does not work on Mac.]]

    < image > <! [CDATA [images/mainImage_ '. $project [Id].]] ». jpg]] > < / image >

    Hello

    I'm going crazy, I just finished a site in flash for a client, I used some basic xml actionscript to dynamically load images, but it does not work on mac (safari/firefox) and sometimes not on a pc with flash 8 installed. I have flash 9 installed on my pc and it works fine.

    This is the url:
    http://www.Gijs.com/Klanten/EZ/

    If you click list (events), you should see images accumulate.

    Could someone throw out me in the face and tell me what that th f * I am doing wrong. He thinks it's the code, but I'm not a really qualified actionscripter.

    If help is really appreciated.
    Thanks in advance

    PROBLEM SOLVED
    I've screwed to the top of the image links check out the adobe tutorial on the paths related and what reading xml file Insert spaces infront of your image url

    http://www.Adobe.com/cfusion/knowledgebase/index.cfm?id=tn_04157
    So after

  • extra-wide loading external images

    I've been watching various suggestions forum/tutorial for the loading of large images (12000 x 6000).

    There are a number of interesting solutions, but a slightly awkward.

    would be very happy a good example/tutorial pointer.

    It is a local application - not the internet.

    (a repost of the general forum)

    1. This is an obsolete position that assumes that the maximum dimensions are 2880 x 2880

    2. documentation for the BitmapData says the same thing:

    "In AIR 1.5 and Flash Player 10, the maximum size for a BitmapData object is 8 191 pixels in width or height, and the total number of pixels cannot exceed 16,777,215 pixels. (So, if a BitmapData object is 8 191 pixels wide, it can be 2 048 pixels high.) In Flash Player 9 or earlier and AIR 1.1 and earlier, the limitation is 2 880 pixels in height and 2 880 in width. »

    This means that an attempt to draw/use BitmapData whose dimensions are outside the range is impossible right now. Even if someone finds a hack (which I doubt) - it just means that there is a bug on the player and it will be probably fixed and hack does not work in the future.

  • need help to load the image from a xml file

    (Based on the example of Chapter 10, ActionScript 3.0 for ADOBE FLASH CS4, IPC)
    By using the 'setSong' function, I shoot with success of the < artist > child of my xml data, no problem. But I also have to display the jpg file in the < image > node and I meet a lot of difficulties. I tried adding more variables to the setSong function, but am frustrated. Someone could shine a little light and point this beginner in the right direction?

    function setSongs (): void {}
    for (var i = 0; i < 4; i ++) {}
    var artistText:String = songList_XML.song [i + songCount] .artist;
    Customizer var = this ["song" + (i + 1)] .artist;
    clipArtist.text = artistText;
    }
    }

    myXML:

    <? XML version = "1.0" encoding = "utf-8"? >
    < songlist >
    song <>
    < image id = "1" > images/dummyFace1.jpg < / image >
    < artist > first guy < / artist >
    < album > Aliquam neque dui, sold at, egestas nec, egestas dignissim, tortor. < / album >
    < / song >

    song <>
    < image id = "2" > images/dummyFace2.jpg < / image >
    < artist > second person < / artist >
    ante < album > Nam. Metus had integer and lacus accumsan commodo. < / album >
    < / song >

    song <>
    < image id = "3" > images/dummyFace3.jpg < / image >
    < artist > third Fellow < / artist >
    < album > Cras non sem vitae massa pharetra sold. Integer outbound < / album >
    < / song >

    song <>
    < image id = "4" > images/dummyFace4.jpg < / image >
    Fourth individual < artist > < / artist >
    < album > surpassing ullamcorper quam and ipsum. Aenean sed lacus sit amet leo so restore. < / album >
    < / song >
    < / songlist >

    :

    function setSongs (): void {}
    for (var i = 0; i)< 4;="" i++)="">
    var artistText:String = songList_XML.song [i + songCount] .artist;
    Customizer var = this ["song" + (i + 1)] .artist;
    clipArtist.text = artistText;

    var ldr:Loader = new Loader();

    var urlR:URLRequest = new URLRequest (image songList_XML.song [i + songCount]);

    LDR. Load (urlR);

    LDR.x = Whatever (i);

    LDR.y = whateverelse (i);

    addChild (ldr);

    }
    }

    myXML:




    images/dummyFace1.jpg
    First guy
    Aliquam neque dui, sold at, egestas nec, egestas dignissim, tortor.


    images/dummyFace2.jpg
    Second person
    Nam ante. Metus had integer and lacus accumsan commodo.


    images/dummyFace3.jpg
    Third Member
    CRAs non sem vitae massa pharetra sold. Integer is.


    images/dummyFace4.jpg
    Fourth person
    Surpassing ullamcorper quam and ipsum. Aenean sed lacus sit amet leo so restore.

  • Problem with loading external images

    I have a small gallery that I did (Nothing fancy) and want images to load fully before they fade. The process would be, first image load in, click Next, shows preloader bar above the current picture (still on display), and then once fully loaded, replaces the last image with the new it fading... I hope that makes sense...

    Why doesn't this work? I use a loader movie clip...

    Alrighty... I have moved things and I now call to the function loadClip mcl in a different place, so it fades the current image, image, image new charges fades in... Let's see if my customer purchases (they wanted a more seamless transition) with on the pause between showing the loading preloader...

  • (SOLVED!... for the most part) Can I load an external image in my custom class?

    Hello!

    I started working a lot with the Classes, but I'm still reletively new to them.  I wrote a class "creature" (which extends Sprite), and I have everything works well... except when it comes to the display of the image of the creature.

    In previous programs, I was able to load external images using the Loader class.  However, this is possible on the main timeline in Flash, right?  Like 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, I want to do is just have a function within my class.  The function must contain the addChild statement, so I might just do:

    var MyCreature:creature = new creature();

    MyCreature.loadImage ();

    However, I'd be just as happy if I could just load the Bitmap and return it to the class.  Then I could addChild myself in the main timeline:

    var MyCreature:creature = new creature();

    addChild (MyCreature.getBitmap ());

    I tried to put the Loader code in a function within the class of creature, however it does not work.  She didn't return errors, but it also doesn't display anything, despite the fact that it containing the addChild statement.  Using the command path, it looks like within the service implementation, but addChild does nothing.  Am I missing something?  Is there a better way?

    Here is the function in my class of creature:

    public void 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 happens at this point very well");

    addChild (Bitmap (imgLoader.content));

    }

    }

    Thank you!

    Sorry!  Of course, I surf the Internet for hours, unable to find a solution, according to a post on the forum, and then I have a solution.

    http://StackOverflow.com/questions/5036650/AS3-addChild-in-a-class

    I just forgot to add the addChild (MyCreature) in the main timeline.  Duh.<>

Maybe you are looking for

  • Why my iPad did stop recording a video on its own?

    I recorded a video with my iPad and stop recording on its own.  Why did do that? I just make a video days earlier that was longer without problem. feeling very frustrated right now.

  • Satellite R630 - 11L - low volume speaker internal

    Good day, I complained about the low audio volume in toshiba-portege-m800-107, but now after hearing the r630 max volume I feel as if it was a joke... its too low.I increased the maximum sound volume adjustment control panel > sound, played with the

  • limit of 746 GB partition on 3 TB drive installed in CQ5600F

    I installed a red sata 3 TB WD drive in my CQ5600f and motherboard sees the drive, the WD diagnostics sees the drive but Windows 7 volume, partition and format all see gb 746. I'm learning the bios needs update but I am unable to find one on the HP s

  • Signature of WebWorks code issues

    Is anyone else having problems with the signature tool?  I ran the tool several times tonight and each time he ends up freezing.  I run this from the command line with the signature bbwp option and by Eclipse.  Sometimes I get 9 of the 40 signature a

  • Problem blackBerry Smartphones with restore password holder data

    I have a blackberry bold 9780. I backup all data before I wipe it.  After that, I wiped and restore all the data. Unfortunely, the password manager cannot be restored. It is very important for me. Are there any suggestions? Thanks in advance. Allen