Help (recovery of the image of an xml file name, then appear inside the movieclip

Hello guys, I just want to ask sometihng about the display of the image inside the movieclip by pulling on the image name in the xml file.

It comes to my xml file.

<? PHP

Header ("Content-type: text/xml");

$host = "localhost";

$user = 'root ';

$pass = "";

$database = "test";

$gelo = "image1.jpg";

/ * xml output * /.

$xml_output = ' <? XML version=\"1.0\? > ';

$xml_output. = "< GALLERY > ';

$xml_output. = '< IMAGE > '. $gelo. "< / IMAGE >";

$xml_output. = "< / GALLERY > ';

echo $xml_output;

? >

This is the code inside my actionscript

stage.scaleMode = StageScaleMode.NO_SCALE;

var loader: URLLoader = new URLLoader();

loader.dataFormat = URLLoaderDataFormat.TEXT

loader.addEventListener (Event.COMPLETE, loadCompleteHandler);

loader.load (new URLRequest ("http://localhost/loadimagefromxmlAS3/data.php"));

function loadCompleteHandler(event:Event):void {}

var xml = new XML (event.target.data);

txt.text = xml.toXMLString ();

trace (xml. IMAGE [0]);

var list: XMLList = xml.data.title

var loader: Loader = new Loader()

This ["holder_mc" + 0]. AddChild (Loader)

Loader.Load (new URLRequest (list [0]. IMAGE))

}

When I run it in flash, I got the error


Image1.jpg

TypeError: Error #1010: a term is undefined and has no properties.

at xml_fla::MainTimeline/loadCompleteHandler()

at flash.events::EventDispatcher/dispatchEventFunction()

at flash.events::EventDispatcher/dispatchEvent()

at flash.net::URLLoader/onComplete()

I hope you will consider my ignorance since im a beginner with actionscript. Thank you

(1) you should have "Permit debugging" enabled in the settings of publication so you could tell exactly the line of witch will not

(2) this line makes no sense for me: var list: XMLList = xml.data.title

Change it to var list: XMLList = xml. IMAGE;

(3) loader.load (new URLRequest (list [0] m:System.NET.SocketAddress.ToString (()));

(4) also this line is suspicious: this ["holder_mc" + 0] .addChild (loader)

Why not just say: holder_mc0.addChild (loader)?

Tags: Adobe Animate

Similar Questions

  • "Could not complete the command image size because that file name is not valid"

    Hello

    Please help me, when I try to resize the file psd his watch this message... .whats the matter?

    "Could not complete the command image size because that file name is not valid"

    Thank you!

    I had the same problem with you and tried to look around, but I solved it myself. One or two layers created by the insertion of your library which have been uploaded to the server cloud.

    When you open the file, you can see the warning as "recreate a link... blah blah your file" If reject you the message, you can still work on it, but you cannot resize, or drag all layers to other new file (tried).

    Everything you need that discovering the layers that are related to the server delegating and delete it. FACT.

  • When I click on an RSS feed, I get this message. XML file does not appear to be any information of style associated with it... It works very well with Internet explore

    When I click on an RSS feed, I get this message. XML file does not appear to have any information of style associated with it. The same RSS feed works fine with internet explorer, any information would be helpful.
    Here are the first 3 lines from what I get

    < rss version = "2.0" >
    < String >
    < title >

    You open a new empty tab?

    Don't you see the text 'Click on the RSS buttonin the toolbar of navigation on this page?

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > appearance/themes).

  • 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.

  • loading an image from a xml file

    I'm trying to load an image title "(1) .jpg ' file xml in a flash applet. I'm not an expert, but I think the code should work to store the name of the image, as I wrote it correctly in my xml document. Here is the code I use.

    In this code, the definition of the line "image = _root.floorplan;" is where he SHOULD get the information in the details.xml file. If I change the code to read "image =" (1) .jpg; "it loads very well."

    I am not to store the value of the node xml properly, or does not claim it correctly?

    I thought about it - I need to place the "image = _root.floorplan; ' in the case statement of the loadXML function.

    I have it!

  • Help! follow the movieclip inside ~

    How to follow the no. balls inside my movieclip (ball7)? And set as dynamic text (winner_txt)?

    P.S.: inside my movieclip doesn't have layer, layer of ball.

    No layer: each image of a person is labeled '0', '1 b' and continues...

    layer of ball: first frame empty, 2nd frame 1 ball, 3 frame 2 ball... and continues...

    Tried to use:

    var not = _root.ball7_mc._currentframe

    _root.winner_txt = Number (No.);

    use:

    _root.onEnterFrame = function)
    {
    _root. Winner = Number(_root.ball7._currentframe-1);
    Etime var = endTime - getTimer ();
    //
    If (etime<=>
    {


    delete this.onEnterFrame;
    

    _root.gotoAndPlay ("score");

    }
    on the other
    {
    time_txt. Text = Math.ceil(etime / 250) + "seconds."
    }
    }

  • I need help which extends the MovieClip class

    I want to add a property to the MovieClip class. I have just a bunch of clips that are placed on the stage by reading an XML file and creating lots of clips from the information in them. Now, I need to know what MovieClips were created under previous clips, and I think that the best way to do it would be extending the MovieClip class and add a property of the order.

    I have some problems however: I do not know how to set or get this property of order within the main Clip, I do not know how to put this clip in my movie, and I don't know how to create them dynamically (just do something like var myNewObjectOfExtendedClass: myExtendedClassName = new myExtendedClassName?)

    This is the code that I have on my category Advanced, called Expando.as:

    Expando class extends MovieClip {}

    _order:Number private var;

    public function get command (): number {}

    return _order;

    }

    order(nOrder:Number):Void {} public function public set

    _order = nOrder;

    }

    }

    I recommend that you see for the tutorial of the tree in order to see how this should be done.  I think you are missing some basics.

  • XML file does not appear if it is a local file and XSLT file is on a server.

    If I have a local XML file with a XSLT file local XML file is displayed as expected. If the two files are on my server again that the XML file is displayed correctly. However if the XML file is local and the XSLT file is on the server (and the XML file points to the file on the server) I get the following error:

    Error loading stylesheet: an unknown error occurred (805303f4)

    Using Firefox on a Mac 41.0.1.

    This problem does not occur on Safari

    No idea where I'm wrong? Research on the web there are suggestions about changing the mime, but'm not 100% sure what to do about it. In

    Thank you

    Brian

    Guigs. Thanks for the information.

    After doing some digging, I found this page:

     http://enable-cors.org/server_apache.html
    

    Following these tips, I added an .htaccess file in the directory on the server that contains my .xslt file, which contains the line:

       Header set Access-Control-Allow-Origin "*"
    

    And that seems to have solved my problem for Firefox!

    Does not seem to solve the problem on Internet Explorer, but suspect it's a problem for another day (and maybe another forum).

  • How to mount an image of an xml file in the cell of CC2015 graphics

    Hello

    I'm having a very difficult time, editing of an image that is imported with XML graph the table cell. Before graphics power cell was fine but now I can't he mounted. The image is imported into the cell, but each image is placed in the same height created the cell (in fact).

    So, I have to mention that the problem is related to the import of xml for classified ads. Therefore, the page layout is not prepared but generated with import. Image in the cell is necessary in this car design solution.

    I don't know I'm missing something... Please, open your eyes.

    Thank you!!!

    Marko

    Hi Marko,

    Maybe you can avoid the graphics cells, if you place the images in table cells.

    HM, we could try pre-fill a cell text with the content must match a white-space character and after that place the image in the first cell insertion point (as in the former with CC 2014 and before workflow).

    Uwe

  • HELPS to remove the movieclip when loading another.

    Dear users of the forum,

    I have buttons randomly on the scene that I have implemented so each of them, when you click on it, will load different movieclip.

    These movieclips load directly on top of the other in the same exact place.

    The problem I have is the previous movieclip not clearly end the scene when the user clicks on the next button.

    Someone please help me understand this? I need to set up a condition that will remove the current movieclip when another button is selected to load the next movieclip.

    Here's the part of my code that needs editing. I did research on switch, else and other conditional statements, but cannot find a way to get there.

    Thank you for helping,
    Sincerely,
    Steve C.

    I have the FLA or swf for display, please let me know.


    Event listeners
    hempelbtn.addEventListener (MouseEvent.CLICK, btnActions);
    fourtyonebtn.addEventListener (MouseEvent.CLICK, btnActions);
    draycottbtn.addEventListener (MouseEvent.CLICK, btnActions);
    egertonbtn.addEventListener (MouseEvent.CLICK, btnActions);

    Tween declared out of service
    var HemMCTween:Tween;
    var FourMCTween:Tween;
    var DrayMCTween:Tween;
    var EgerMCTween:Tween;

    Function
    function btnActions(evt:MouseEvent):void {}
    If {(evt.target is hempelbtn)
    HemMCTween = new Tween(HemMC,"x",Strong.easeInOut,1050,623,2,true);
    }
    If {(evt.target is fourtyonebtn)
    FourMCTween = new Tween(FourOneMC,"x",Strong.easeInOut,1050,623,2,true);
    }
    If {(evt.target is draycottbtn)
    DrayMCTween = new Tween(DrayMC,"x",Strong.easeInOut,1050,623,2,true);
    }
    If {(evt.target is egertonbtn)
    EgerMCTween = new Tween(EgerMC,"x",Strong.easeInOut,1050,623,2,true);
    }
    }

    I used the following code to show a menu, creating a similar code for each button.

    addEventListener ("forecasterClicked", gotoforecaster);
    function gotoforecaster(e:Event):void {}
    mc_forecaster. Visible = true;
    mc_igd_test. Visible = false;
    mc_user_test. Visible = false;
    mc_task_test. Visible = false;
    mc_apps_test. Visible = false;
    mc_help_test. Visible = false;
    }

  • Under click button Image to extern links. file - but then advances before a slide...

    I have a button image that links the success of an extern. file - that is an index/glossary of the modules of the project. However, when you click it, the project goes forward one slide. I would like the project to stay on the same blade when you click on the button ' Glossary/index', rather than advance forward. Someone knows how to do this?

    Thanks in advance,

    Rich

    Could you have a look at the presentation, I gave you a link.

    To start with variables, I've created a few articles:

    Use the power of variables without advanced actions

    Unleash the power of variables with advanced actions

    As you assign a tip action to events on the exit Enter / we the accordion of the Action of the slide properties panel, you can assign an advanced action as an action of success to the accordion of the Action of the key properties panel or box click:

  • Create an image slider using the XML file photo gallery

    Hello!

    I have created a photo gallery and generated an xml file.  I want to implement a cursor image on the home page that performs a simple fade from one image to the other.

    I'm not an expert on jQuery. The BC help section says to add code that retrieves in the XML file and THEN add another code query j who would style images and transitions.

    I don't know how to do this.  Here is my code and it does not work.

    If you have a simple solution, it would be great.

    There is a script called JSSOR

    "< script type =" text/javascript"src ="... / js/jquery-1.9.1.min.js "> < / script >"

    <!-use jssor.slider.mini.js (40 KB) instead for immediate release->

    <!-jssor.slider.mini.js = (jssor.js + jssor.slider.js)->

    < script type = "text/javascript" src = "javascripts/jssor.js" > < / script >

    "< script type =" text/javascript"src="javascripts/jssor.slider.js "> < / script >

    This is the beginning of the code BC gives to pull from the xml file into a div called "Gallery".

    < div id = 'Gallery' > < / div >

    < script type = "text/javascript" >

    {$(function()}

    $.ajax({)

    type: 'GET ',.

          url: " http://www.performanceaire.com/Fahrenheit-images/BannerGallery/Photogallery.XML ", / / replace with an absolute URL of the XML of your gallery of .

    data type: "xml."

    success: {function (xml)}

    {$(xml).find('img').each (function ()}

    location var = ' http://www.performanceaire.com/Fahrenheit-Images/BannerGallery/'; / / Replace with the absolute path to the directory that contains your images

    var url = $(this) .attr ('src');

    var alt = $(this) .attr ('alt');

    $('<li></li>').html (' < a href = "' + place +" + url + ' "> < img src ="' + place + "+ url + '" alt = "' + alt + '" / > < / a > ').appendTo('#gallery');

    });

    }

    });

    });

    This is the code taken from JSSOR to transitions occur, and it does not work... any ideas?

    jQuery (document) .ready (function ($) {}

    var options = {}

    $AutoPlay: true, / / [optional] If auto play, to activate the slide show, this option must be set to true, the default value is false

    $DragOrientation: 1 / / orientation [optional] to drag the slide, 0. drag, 1 horizental, 2 3 vertical or, default value is 1 (note that the $DragOrientation must be the same as $PlayOrientation when $DisplayPieces is more than 1, or in the parking position is not 0)

    };

    var jssor_slider1 = new $JssorSlider$ ("Gallery", options);

    });

    < /script >

    www.performanceaire.com/index-FS.html

    It is perhaps a bit much if you do not top:

    Developers

    http://www.BusinessCatalyst.com/BC-blog/BC-next-liquid-rendering-JSON-new-editing-capabili links-increased-performance

  • How to make src of the image of the place holder something xml file

    Hello
    im doing xslt on xml file and I want to store the path to the image on an element of the xml file and display the image on the page how?
    I can write about the CBC textbox like any expression xml xml string how?

    > im doing xslt on xml file and I want to keep the image on an element path
    > XML file and display the image on the page how?
    > can I write on the CBC textbox like any expression xml xml string how?

    I'm a little confused, but if you transform XML via XSLT, then
    You must create the link of the image via the XSLT file:

    Assuming that you store in an XML file name of the image node
    "imageFileName":

    -Darrel

  • Need help with loading the XML file

    Hello

    I spent reviewing the web/forums for an example on how to do this for a few days now.  I managed to get this working in Flash Pro easily enough, but I think I'm missing something when I want to do the same thing in Flex.

    Basically, I want to load an XML file and then set the values of the text of labels 5, equal to the data in the XML file.

    So I have a button created in MXML and have put the following click event:

    Click = "dsSetup (Event)" "

    I also stated the following:

    public var myRequest:URLRequest = new URLRequest ("assets/myFile.xml");   folder located under the CBC in project

    public var myLoader:URLLoader = new URLLoader();

    public var myXML:XML;

    My function that loads is as follows:

    public function dsSetup(event:MouseEvent):void

    {

         trace ("dsSetup");

    myXML = new XML (myLoader.data);

    H3. Text = myXML.source.itemA;

    H4.text = myXML.source.itemB;

    H5.text = myXML.source.itemC;

    H7.text = myXML.source.itemD;

    H8.text = myXML.source.itemE;

    currentState = "MainMenu";

    }

    myLoader.addEventListener (Event.COMPLETE, dsSetup);   I think that this line is no longer as I put it in the MXML

    myLoader.load (myRequest);

    It's the way I did in Flash and it worked fine, but I must be missing something when it comes to Flex.

    Can you explain or point me to a good tutorial that shows how to load XML in Flex code?

    Those I've found seems to have about 50 lines of code just to load a file and add through a complex for a beginner.

    Thank you very much

    I suggest you save the data loaded in a variable that can be linked, then bind the properties of the text - who:

    [Bindable]

    var myXML:XML;

    public void dsSetup(event:MouseEvent):void

    {

    myXML = new XML (myLoader.data);

    currentState = "MainMenu";

    }

    ...

  • With the help of several xml files to complete the 1 form.

    Hi all

    Thank you for reading this.

    My scenario is that I have a form which is the inspection report for a product.

    Once the technician has completed its inspection they fill out the form and send it (which saves the form as xml data in a specific folder on our network.

    Now 1 customer may have up to 10 items to be inspected on a single order. What I have to do is to create a customer report showing them the necessary work on their items.

    Basically, I need to be able to import up to 10 xml files of inspection report in 1 report form.

    I was looking for this with the authorities, but I'm wrong.

    I can get 1 data file imported by using xfa.host.importdata("filename")

    but this method seems to reset the form after the first call to the second instance of the form in the form of report receives all the data. (if this makes no sense at all)

    How can I configure my report form so I can fill different instances of the subform from different xml files?

    that is my xml files names are formatted with call number and line number, e.g. 42E11134 - 5.xml would call no. 42E11134 line 5.

    the folder on the network would have to be 42E11134-10 42E11134-1 (not superior because we cap the maximum points on the same order)

    I need to figurentsur instance subform 1, 42E11134-5 42E11134-1 data displayed on the subform instance 5 etc etc and also recognition of the number of necessary instances (but this could be selected by the user).

    If the authorities do not work I am happy to have 10 separate subforms with different names, but must exist within a single form.

    You can only import a single XML file. You have an xml file that has multiple instances of data, but it must be a single xml file.

    So you should find a way to combine all these into a single xml files then do the import.

    Paul

Maybe you are looking for