Loading a single Image Via XML

Hey guys, I'm trying to load an image to step through an xml file.

Here is my xml file

<? XML version = "1.0" encoding = "utf-8"? >
< photos >
Image1.jpg < pic > < / pic >
< / photos >

I am trying to understand the ActionScript 3, but I don't know how to code.

If someone can tell me please the tutorial or code, it would be much appreciated.

I said to these last lines in the xmlLoaded function, then all of the code would read as follows:

var req:URLRequest = new URLRequest ("xmlfilename.xml");
var ldr:URLLoader = new URLLoader();
ldr.addEventListener (Event.COMPLETE, xmlLoaded);
LDR. Load (req);
function xmlLoaded(e:Event) {}
var XML = XML (e.target.data);
var imgreq:URLRequest = new URLRequest(xml.pictures.pic[0]);
var imgldr:Loader = new Loader();
imgldr. Load (imgreq);
addChild (imgldr);

}
It's code for e-mail or incidentally, but could well still work! I don't want to have all the fun, you should have some too, by fixing something I spelled wrong.

Tags: Adobe Animate

Similar Questions

  • How to load external png image via xml?

    Can someone help me with the addition of a png image to a mc with an instance name.

    I want only to display a single image (no Gallery)

    I would like to get the url of the image via an xml.

    Here's a copy of my current action script which has already pulled in xml data that includes the node with the url of the photo.

    import flash.events.Event;

    import flash.events.MouseEvent;

    import flash.net.URLLoader;

    import flash.net.URLRequest;

    var myXML:XML;

    var myLoader:URLLoader = new URLLoader();

    myLoader.load (new URLRequest ("links.xml"));

    myLoader.addEventListener (Event.COMPLETE, processXML);

    function processXML(e:Event):void

    {

    myXML = new XML (e.target.data);

    trace (myXML);

    menumv.carbtn.addEventListener (MouseEvent.CLICK, openCURL);

    menumv.edubtn.addEventListener (MouseEvent.CLICK, openEURL);

    menumv.psybtn.addEventListener (MouseEvent.CLICK, openPURL);

    menumv.stubtn.addEventListener (MouseEvent.CLICK, openSTURL);

    menumv.busbtn.addEventListener (MouseEvent.CLICK, openBURL);

    menumv.shabtn.addEventListener (MouseEvent.CLICK, openSURL);

    studentmv.stuname.Text = myXML.student.name;

    }

    function openCURL(e:MouseEvent):void

    {

    navigateToURL (new URLRequest (myXML.car.url));

    }

    function openEURL(e:MouseEvent):void

    {

    navigateToURL (new URLRequest (myXML.edu.url));

    }

    function openPURL(e:MouseEvent):void

    {

    navigateToURL (new URLRequest (myXML.psy.url));

    }

    function openSTURL(e:MouseEvent):void

    {

    navigateToURL (new URLRequest (myXML.stu.url));

    }

    function openBURL(e:MouseEvent):void

    {

    navigateToURL (new URLRequest (myXML.bus.url));

    }

    function openSURL(e:MouseEvent):void

    {

    navigateToURL (new URLRequest (myXML.sha.url));

    }

    And here's a copy of the node that contains the url

    <menu>
        <student>
        <name>testnamehere</name>
        <photo>http://10.0.0.2/test/photos/testnamephoto.jpg</photo>
        </student>
    </menu>
    

    I saw this tutorial but it was for a gallery, and I couldn't not to hack and slash to do what I want.

    http://Tuts.flashmint.com/creating-a-simple-XML-Gallery-in-ActionScript3/

    Thanks again in advance for any help.

    Check if this gives null if yes it would output menu.student.photo

    trace (Student.photo)

    var _request:URLRequest = new URLRequest (student.photo);

    var _ldr = new Loader();

    MC's movieclip where you add your image

    mc.addChild (_ldr);

    _ldr. Load (_REQUEST);

    _ldr.contentLoaderInfo.addEventListener (Event.COMPLETE, load_complete, false, 0, true);

    function load_complete (event): void

    {

    whatever it is may be melted in the image

    }

  • dynamic load text and image of XML. How?

    Hello

    I have the following code to display text and images on the screen how modify the code to make it more dynamic:

    var xmlData:XML = new XML(MovieClip(this.parent).xmlDocs[3]);
    // Add Title
    rssNews.rss1.title1.text = xmlData.news[0].title;
    rssNews.rss2.title2.text = xmlData.news[1].title;
    rssNews.rss3.title3.text = xmlData.news[2].title;
    rssNews.rss4.title4.text = xmlData.news[3].title;
    rssNews.rss5.title5.text = xmlData.news[4].title;
    rssNews.rss6.title6.text = xmlData.news[5].title;
    rssNews.rss7.title7.text = xmlData.news[6].title;
    rssNews.rss8.title8.text = xmlData.news[7].title;
    rssNews.rss9.title9.text = xmlData.news[8].title;
    rssNews.rss10.title10.text = xmlData.news[9].title;
    
    
    // Add Description
    rssNews.rss1.text1.text = xmlData.news[0].description;
    rssNews.rss2.text2.text = xmlData.news[1].description;
    rssNews.rss3.text3.text = xmlData.news[2].description;
    rssNews.rss4.text4.text = xmlData.news[3].description;
    rssNews.rss5.text5.text = xmlData.news[4].description;
    rssNews.rss6.text6.text = xmlData.news[5].description;
    rssNews.rss7.text7.text = xmlData.news[6].description;
    rssNews.rss8.text8.text = xmlData.news[7].description;
    rssNews.rss9.text9.text = xmlData.news[8].description;
    rssNews.rss10.text10.text = xmlData.news[9].description;
    
    
    // Add Title
    var myLoader:Loader = new Loader();
    var fileRequest:URLRequest = new URLRequest(xmlData.news[0].image);
    myLoader.load(fileRequest);
    rssNews.rss1.image1.addChild(myLoader);
    var myLoader2:Loader = new Loader();
    var fileRequest2:URLRequest = new URLRequest(xmlData.news[1].image);
    myLoader2.load(fileRequest2);
    rssNews.rss2.image2.addChild(myLoader2);
    var myLoader3:Loader = new Loader();
    var fileRequest3:URLRequest = new URLRequest(xmlData.news[2].image);
    myLoader3.load(fileRequest3);
    rssNews.rss3.image3.addChild(myLoader3);
    var myLoader4:Loader = new Loader();
    var fileRequest4:URLRequest = new URLRequest(xmlData.news[3].image);
    myLoader4.load(fileRequest4);
    rssNews.rss4.image4.addChild(myLoader4);
    var myLoader5:Loader = new Loader();
    var fileRequest5:URLRequest = new URLRequest(xmlData.news[4].image);
    myLoader5.load(fileRequest5);
    rssNews.rss5.image5.addChild(myLoader5);
    var myLoader6:Loader = new Loader();
    var fileRequest6:URLRequest = new URLRequest(xmlData.news[5].image);
    myLoader6.load(fileRequest6);
    rssNews.rss6.image6.addChild(myLoader6);
    var myLoader7:Loader = new Loader();
    var fileRequest7:URLRequest = new URLRequest(xmlData.news[6].image);
    myLoader7.load(fileRequest7);
    rssNews.rss7.image7.addChild(myLoader7);
    var myLoader8:Loader = new Loader();
    var fileRequest8:URLRequest = new URLRequest(xmlData.news[7].image);
    myLoader8.load(fileRequest8);
    rssNews.rss8.image8.addChild(myLoader8);
    var myLoader9:Loader = new Loader();
    var fileRequest9:URLRequest = new URLRequest(xmlData.news[8].image);
    myLoader9.load(fileRequest9);
    rssNews.rss9.image9.addChild(myLoader9);
    var myLoader10:Loader = new Loader();
    var fileRequest10:URLRequest = new URLRequest(xmlData.news[9].image);
    myLoader10.load(fileRequest10);
    rssNews.rss10.image10.addChild(myLoader10);
    
    
    // Add URL
    rssNews.rss1.info1.addEventListener(MouseEvent.CLICK, rss01);
    rssNews.rss2.info2.addEventListener(MouseEvent.CLICK, rss02);
    rssNews.rss3.info3.addEventListener(MouseEvent.CLICK, rss03);
    rssNews.rss4.info4.addEventListener(MouseEvent.CLICK, rss04);
    rssNews.rss5.info5.addEventListener(MouseEvent.CLICK, rss05);
    rssNews.rss6.info6.addEventListener(MouseEvent.CLICK, rss06);
    rssNews.rss7.info7.addEventListener(MouseEvent.CLICK, rss07);
    rssNews.rss8.info8.addEventListener(MouseEvent.CLICK, rss08);
    rssNews.rss9.info9.addEventListener(MouseEvent.CLICK, rss09);
    rssNews.rss10.info10.addEventListener(MouseEvent.CLICK, rss10);
    
    
    function rss01(e:MouseEvent):void
    {
              navigateToURL(new URLRequest(xmlData.news[0].url));
    }
    function rss02(e:MouseEvent):void
    {
              navigateToURL(new URLRequest(xmlData.news[1].url));
    }
    function rss03(e:MouseEvent):void
    {
              navigateToURL(new URLRequest(xmlData.news[2].url));
    }
    function rss04(e:MouseEvent):void
    {
              navigateToURL(new URLRequest(xmlData.news[3].url));
    }
    function rss05(e:MouseEvent):void
    {
              navigateToURL(new URLRequest(xmlData.news[4].url));
    }
    function rss06(e:MouseEvent):void
    {
              navigateToURL(new URLRequest(xmlData.news[5].url));
    }
    function rss07(e:MouseEvent):void
    {
              navigateToURL(new URLRequest(xmlData.news[6].url));
    }
    function rss08(e:MouseEvent):void
    {
              navigateToURL(new URLRequest(xmlData.news[7].url));
    }
    function rss09(e:MouseEvent):void
    {
              navigateToURL(new URLRequest(xmlData.news[8].url));
    }
    function rss10(e:MouseEvent):void
    {
              navigateToURL(new URLRequest(xmlData.news[9].url));
    }
    
    

    Kind regards

    use:

    var xmlList:XMLList;

    var xmlData:XML = new XML (MovieClip (this.parent) .xmlDocs [3]);

    xmlList = xmlData.news;

    for (var i: int = 0; i<>

    {

    rssNews ["rss" +(i+1)] ["title" +(i+1)] .text = xmlList [i] .title;

    rssNews ["rss" +(i+1)] ["text" +(i+1)] .text = xmlList [i] .description;

    rssNews ["rss" +(i+1)] ['image' +(i+1)] .loader = new Loader();  If the compiler complains, cast rssNews ["rss" +(i+1)] ['image' +(i+1)] as a movieclip.  IE: MovieClip (rssNews ["rss" +(i+1)] ['image' +(i+1)]) .loader

    rssNews ["rss" +(i+1)] ['image' +(i+1)].loader.load (URLRequest (xmlList [i] .url)) of new;

    }

  • Video loading on 5310 MCU (via XML - RPC)

    Hello.

    I am trying to create a script for Nagios monitoring monitor the use of the video ports on my 5310 MCU (software version 4.4).

    I found an example of a perl using RPC::XML scipt and it works quiet well except for one thing: I have no video support.

    I used the "device.health.query" method, which should include a member named "videoLoad" (an allusion to Cisco TelePresence MCU API 2.10 Guide).

    I get a correct result of this method, but there are some missing members.

    Here is the result:

    rtcBatteryStatus

    Ok

    operationalStatus

    assets

    voltagesStatusWorst

    Ok

    fanStatusWorst

    Ok

    temperatureStatusWorst

    Ok

    temperatureStatus

    Ok

    mediaLoad

    1

    voltagesStatus

    Ok

    fanStatus

    Ok

    cpuLoad

    0

    rtcBatteryStatusWorst

    Ok

    There is no «videoLoad» Member

    Is that what I got wrong, or do I have to activate something on the MCU?

    Is there another way to get the load of the video of the MCU (such as SNMP or sth)?

    Kind regards

    Sven Lindeke

    HELLO Sven.  Thus, it seems that the platform of the 5300 series will not return these values as the old platforms.  VideoLoad and audioLoad return values have been deleted because they were reporting incorrect information from this platform works mixed audio and video DSP unlike older models of MCU.

    The only options I see here:

    (1) run a script to extract the status data > conferences page.
    (2) to invest in the conductor and request a conductor for audio and video ports in use.
    (3) account team push to drive above CDETS for call API to draw the status information > conferences page.
    (4) put in place a script to subscribe to and then listen to the events of feedback - see page 18 of the http://www.cisco.com/en/US/docs/telepresence/infrastructure/mcu/api_guide/MCU_API_2-10.pdf
    May be able to count participants join and leave this way maybe.

    I know that doesn't help you now, but only four methods I can recommend at this time.

    VR
    Patrick

  • How can I load images without XML, please?

    Hi all

    I would highly appreciate if someone can point me in the right direction. I have some AS2 code that loads the images via an xml file. I have asked me to totally eliminate the XML and have the images to be loaded from with in the library. Apart from pictures, there are other xml nodes such as:

    nom_image, image_description and others.

    What would be the best way go about eliminating the XML and get the code to load the images and other related information of the library. I'd highly appreciate your help on this, please.

    Thank you very much.

    create tables that contain the same information as the XML.

    p.s. and you use attachMovie() instead of loadMovie().

  • Multipal loading image or xml at a time or one

    Hello friends,

    I'm confuse all loading of multipal images at a time or one by one.  There are crass DueTo memory problem.

    what is the best and why.

    plaase help me.

    Thank you.

    It's a good idea to create a class for itself. I don't really know much AS3 so I can only give you a sample I created with AS2, so you can turn it into AS3. There is this class called QueueLoader which is exactly the same but in AS3. You can find it in this link: http://www.actionscriptclasses.com/category/moviecliploader/

  • Single image, dozens of VLAN

    I've been retooling a customers view Horizon 5.2 screw for the last few months.  The basics are this: a VDI cluster in a datacenter location and relatively low extended latency LANs to branch offices.  Fortunately for speeds not my concern, but they have many branch offices connected via VLAN extended from the data center.  Those who set them up initially thought that the creation of a different master for each VIRTUAL LAN snapshot was the way to go when it comes to re - composing dozens of pools.  Needless to say, he denies a little ease of maintaining a single image when you have multiple snapshots to be taken with the right network vlan assigned to them.

    I already have the PowerCli assign run based on the location of the VMS specific prefix variables and set the network from that location.  Perfect - for me anyway.  I will not distribute this return to a VMware expert, so I'll try to automate as much as I can.  I'm not convinced that using QuickPrep as opposed to SysPrep is the answer - that would allow me to run a PS script to machines, and sysprep capability to "run once" does not work because, well, it is not installed VM Cli power on virtual methods.

    I realize that once the pools are re-deployed correctly, there should be very little reason in fact, re - dial pools using Sysprep - the client must simply be refreshing that all my VMs properties will keep the same, just update the operating system.  But in the interest of making more work for me, can anyone suggest a way to call a PS script to run using a custom script customization specifications Manager I can link to the pools in the console of administration of the view?

    If there isn't a solid medium to do, I think I might just leave a bunch of scripts PS on the desk of the vCenter server that can be run against any location / vlan must have networks adjusted to.  If I put my GM to do all join them on the management network AD when a recomposition is made and then everything just leave instructions to manually call the appropriate location script on the server vCenter to set PS the VLAN after the linked clones are completely, it will work too - but I'd do not have to worry about this and that he posts to clone / customization so it can be set and forgotten.

    If it was my job full time to maintain this, I was running the PS required - if necessary, but is not and I want to make things too simple for my customer deploy new sites or redial a pool without worrying of what vlan they end up on.

    That's what I have right now:

    #This script is intended for users of VMWare View Horizon and requires the VIToolkit for Windows

    #When that run the script, you will be asked to authenticate

    #$VCServer should be the server you want the VIToolkit to connect to in order to get information about the users of virtual machine

    $VCServer = "vcenterFQDN".

    #Check for the VMware.VimAutomation.Core snap-in and add the load if necessary

    $snapins = get-PSSnapin. where {$_.} {Name - match "VMware *"} | Select name

    If ($snapins.name - notcontains "VMware.VimAutomation.Core") {Add-PSSnapin VMware.VimAutomation.Core}

    #collect the credentals necessary to connect to the servers of VDI

    $cred = get-Credential

    $pw = $cred. GetNetworkCredential()

    #connect on the VI server with the supplied credentials

    SE connect-VIServer-Server $VCServer - Credential $cred - https protocol

    # Links a virtual machine virtual network adapter to the network VLAN - for example:

    # $vlan = get-VirtualSwitch-distributed - Name "dvSwitch-name | Get-VirtualPortGroup-name ' name of vlan or portgroup.

    #

    # The location of VDI-based filter prefix

    # Uncomment the variable $Location to spin by location prefix

    # Uncomment the variable $vlan to apply the VLAN to the correct location variable of VM.

    # Follow the simple formatting to add locations premanente and VLAN as required.

    ################################################################################

    ##########                                                           ###########

    # BE CAREFUL WHEN YOU USE GLOBAL VARIABLES #.

    # VMPowerCli will move all the network locations of the #.

    # variable location regardless of the VM State & session #.

    ##########                                                           ###########

    ################################################################################

    #$location = "LOC1."

    #$vlan = "VLAN1000 - location1.

    #$location = "LOC2."

    #$vlan = "VLAN1001 - of guests place.2.

    #$location = "LOC3."

    #$vlan = "VLAN1026 - location3.

    #$location = "LOC4."

    #$vlan = "VLAN1027 - location4.

    #$location = "LOC5."

    #$vlan = "VLAN1024 - location5 '.

    $location = "TEST1."

    $vlan = "VLAN1000 - location1.

    Get - VM $location | Get-NetworkAdapter | Together-NetworkAdapter - NetworkName $vlan

    Variables can be adjusted from a single script, or I do a lot of copies and hardcode for "simplicity factor."

    Suggestions or other ways to approach this would be welcome.

    See you soon,.

    A

    The new version of view Horizon allows you now value VLAN at the pool level.  This new feature can simplify your task even more and reduce the need for a script. You can check this link for a write up on top of the function,http://myvirtualcloud.net/?p=4730

  • Loading only last image

    This code is the xml loading properly, filling the mainClipArray correctly, but adding only the last image of the scene.

    In my view, that he does not expect completeClipLoad() finish.  I tried to delete: nowhere from the function to see if in the meantime a return would, but not luck.

    Any ideas?

    CODE:

    var myXML:XML;
    var xmlLoader:URLLoader = new URLLoader();
    var mainClipArray:Array = [];
    var count: int = 0;
    var myLoader:Loader = new Loader();

    xmlLoader.load (new URLRequest ("portfolio.xml"));

    xmlLoader.addEventListener (Event.COMPLETE, completeXMLLoad);

    function completeXMLLoad(e:Event):void {}
    myXML = XML (e.target.data);
    var len:int = myXML.portfolio.unit.length ();
    for (var i: int = 0; i < len; i ++) {}
    counter = i;
    mainClipArray [i] = new pane();

    Load the small image
    var smallfilename = myXML.portfolio.unit [i].small.filename;

    myLoader.load (new URLRequest (smallfilename));
    myLoader.contentLoaderInfo.addEventListener (Event.COMPLETE, completeClipLoad);

    mainClipArray [i] .x = i * 15;

    addChild (mainClipArray [i]);
    }
    }

    function completeClipLoad(e:Event):void {}
    trace ("inside");
    mainClipArray [counter] .addChild (myLoader);
    trace ("additional child");
    }

    Delay the progression will not help you if you still have a single charger.  I would say that you can move the var myLoader:Loader = new Loader(); line inside the loop so that you have a new instance of charger for each occurrence of loading, but then, you also have to set the completeClipLoad feature to use the event target (e.target) instead of 'telephone '.  But this still wouldn't resolve questions completely because you have this counter variable that will work as fast as the loop for, with the finish likely to loop before the first element is responsible... and since your completeClipLoad also made use of this variable, you will end up with only the last used pane object.

    If you want to control the load order and keep the code in one place (the other suggestions offered above the code inside the component could also be a viable approach), a better strategy is to use a loop set rather than a loop for example, where a single load step at a time and the completion of a loading triggers the next to begin.  Something like (it's just a hierarchical form)...

    counter = 0;

    imgArray;

    function completeXMLLoad(e:Event):void {}
    ... / / treat all the XML in the imgAray

    loadSmallImage(); Start by just loading the first image

    }

    function loadSmallImage() {}

    creating instance of charger

    assign the load complete listener

    load imgArray [meter]

    }

    function loadComplete(e:Event) {}

    process the image in a new pane

    incrementing counter

    If the counter is < imgarray.length="" -=""> loadSmallImage().

    }

  • App crash when loading very large images in Spark Image component

    Hello world

    A client of ours should display very large jpgs (about 8000 x 5000 px), which are the object of a scroll and zoom using touch gestures.

    To my surprise, even, the performance to do this using a scroller is pretty cool

    BUT unfortunately the application sometimes freezes when loading the image. (about 15% of chance to do)

    Debugger does give no info at all, simply closes debugging.

    Does anyone have an idea what could be causing this or how to avoid this?

    PS tested on several machines and different Versions of Tablet, including 2.1.0.1032

    Thx a lot.

    Tim.

    Sorry it took me a long time to respond, but I had other issues to be addressed in the first place

    Use the Profiler showed a leak memory in the skin of the viewer of the image.

    It is a memory problem.

    I must put BimapImage null source value before destroying the display manually, even if I had no other reference to it.

    A little strange, but this solved my problem.

    He could reappear obviously using a single image much bigger, but I guess that it must accept some limits on a mobile device somehow.

  • To load a png image using img_load_file()

    I'm trying to load a png image file in my application to screen_blit later to a window.  I have a few questions:

    1. How can I find the full path to a file in my package?

    2. can I use img_load_file to decompress a png in RGBA8888 fits the image uncompressed bitmap blitting.   Someone at - it a code snippet, I can consult?

    Thanks in advance.

    Hello

    Try the following steps to load the image file in your application.

    First, add your image file in bar - descriptor.xml file in active tag

    and give the path of the file as 'app/native/imagefilename. " I hope it will work for you.

  • How to change the gesture example application to load a different image after initial load

    The sample application 'Gesture' is a good start for me, since I want to load and display a picture full screen.

    However, my application needs to change the image that is displayed thereafter.

    I managed to load the new JPEG image via:

    ...

    io_stream_t * memory_stream = io_open (IO_MEM, IO_READ, num_jpeg_bytes, jpeg_bytes);

    RC = img_load (ilib, memory_stream, & legends, &img);)

    ...

    ... but the new image is not displayed on the screen.  I guess that's because the decode_setup function that is used to load the image when the IPL does not have to then change the image, but I don't know how it should be changed.

    I read:

    https://bdsc.webapps.BlackBerry.com/native/reference/com.QNX.doc.libimg.lib_ref/com.QNX.doc.libimg.l...

    ... but it does not tell me something I already know.

    I guess the question is this: If you load an image into a structure img_t, how can I take this img_t and update the screen to display the image full screen?

    Thank you!

    Daniel

    Hi Daniel,.

    The legend of decode_setup provided should load successfully all significant images in memory buffer rendering. However that alone does not display the image on the screen. You must call screen_post_window() after your call to img_load to make your changes in the visible rendering buffer.

    See:

    https://bdsc.webapps.BlackBerry.com/native/reference/com.QNX.doc.screen.lib_ref/topic/rscreen_post_w...

    For more information, or the main() function of the sample of actions for an example.

    Kind regards

    Jeff

  • Why do I get 'Please wait while windows configures the Mocrosoft Office 2010 single Image'

    I down loaded Office 2010 and now whenever I go into Outlook, I get the Message "Please wait while windows configures Microsoft Office single Image 2010" and the e-mail option im search box does not work. He said still "no results found".

    See the suggestions in the thread below link to start outlook without the configuration window: -.

    http://social.answers.Microsoft.com/forums/en-us/OfficeInstall/thread/48a99c98-E923-4D29-9f81-8fa1a1ce7c71

  • Loading before the images (preloader question) images

    I have a .swf which is 83%, images and weighs about 4 MB.

    This large size, I decided I'd do a preloader, however, framework of the preloader will load only after images and other resources are loaded.

    Basically, the preloader will appear after 83% of the .swf is loaded, who leaves the white screen for a moment and then only display the preloader.

    In even simpler terms, I want to set the priority of loading something (a resource? a scene? a frame?), or only a single image to load, then let that govern loading the rest.

    Please report if you did not understand what I mean.

    Yet once, for each symbol (in your library) related to export, uncheck the export in frame 1.  then test.

  • How to load and place images dynamically

    I have a problem with loading images dynamically. I want to import a series of images and the display in the order across the screen. The images will have different widths, so it is important to know the width of each imported image as IM will place an image immediately to the right of the previous image. I thought that the code below would control the presentation, but the event handler seems to work (perhaps partly because the images are different sizes) not well.

    What should I do to control the positioning of the images?

    Thnks a lot.

    XML version = "1.0" encoding = "utf-8"? >
    " < = xmlns:mx mx:Application ' http://www.Adobe.com/2006/MXML "layout ="absolute"creationComplete =" init () "> "
    < mx:Script >
    <! [CDATA]
    Mx.events import. *;
    private var imageLoader:Loader
    private var imageX:Number = 0;
    public void init (): void {}
    for (var i: int = 0; i < 4; i ++) {}
    imageLoader = new Loader();
    var url: String = "images/animal" + i + ".png";
    var urlReq:URLRequest = new URLRequest (url);
    imageLoader.load (urlReq);
    trace ("image =" + URL)
    container.addChild (imageLoader);
    imageLoader.contentLoaderInfo.addEventListener (Event.COMPLETE, imageLoaded);
    }
    }
    public void imageLoaded(e:Event):void {}
    imageLoader.x = imageX;
    trace ("imageloader.x =" + e.Target.Width);
    imageX += e.target.width
    imageLoader.y = 100
    }
    []] >
    < / mx:Script >
    < mx:UIComponent id = "container" / >
    < / mx:Application >

    Unless I'm mistaking completely your goal, you do the way of things too hard on yourself.

    Install a HBox and addChild() to add images to that:

    (I made a few changes to make it work for me locally in order to do not copy/paste).

         
              
         
    
         
    

    In addition, you need to use the charger because it has other ways to load images, e.g., you can create a new Image, as I do above and set the source property to the path of the file, or you can embed images, but I guess that is not an option.

  • extract a single image of a video clip as a picture

    How to retrieve a single image of a music video and export it as a picture in iMovie?

    Place the playhead on the image you want for the still image. In the Action menu, choose "image".

Maybe you are looking for

  • graphic comparison years

    Hello I have a table where A column has date (year, month), column B (derived from A) year, month of the C column (derived from A), column D fuel prices. I would like to create a line chart where each line represents the year, prices of axis Y and X

  • Windows Mail is not properly all my email collection

    Windows Mail is not properly collecting all my email - some messages show only an empty folder. I can identify the messages affected through my ISP and send them to myself, but it's really annoying and doesn't always work.  I was hoping it was a temp

  • Update Windows I get error80070490

    When I turn on my computer I get a security warning error Code 80070490, and I can't find how to fix it.  Can I use my computer, but after some time he either runs very slowly and will collect a large number of pages on a single page.   The only way

  • Serial number is not valid. I went to the conversation of support and they directed me here.

    I get this error here: incorrect serial number. This isn't a valid serial number. Please go back and re enter the serial number. I went to the conversation of support and they had me on their cat for 45 minutes. Finally, they said to go on the forums

  • How do we install the modules in Lr

    I lost all my Add ons, when I upgraded Lr. They appear in the extensions, such as 'other', handler but no longer appear in my user menu preset in Lr. They simply disappeared. How to make a comeback?