PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197
Display on stage: image and text coming from xml
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Display on stage: image and text coming from xml

  1. #1
    Junior Member
    Join Date
    Jan 2012
    Posts
    1

    Question Display on stage: image and text coming from xml

    How do I display an image and text on the stage, that I load from an xml?

    I already know how to display a single image if the path to it is hardcoded in AS3:
    This quick tutorial on http://www.kirupa.com/developer/flas...ge_as3_pg1.htm works just fine. It shows how you can display an image on the stage, that is in the same file as the SWf-file.

    But the tutorial above does not cover xml.
    Who can show me how I can display the image on the stage, by retrieving ist path from an xml document?

    !I have already found tutorials that show how to retrieve data from xml but they forget to mention how to actually display them on stage!

    THX

  2. #2
    Senior Member guardiankitty's Avatar
    Join Date
    Dec 2006
    Location
    Here
    Posts
    215
    Quote Originally Posted by peinlich View Post
    How do I display an image and text on the stage,....
    I have already found tutorials that show how to retrieve data from xml but they forget to mention how to actually display them on stage!
    THX
    So, given that you can load 'data' from xml (and if not click here), you can load 'urls' for the 'pictures' that you want to load (for loading pics from url click here). As far as making text appear on the stage, place a text field on the stage, and populate it with the text you want to display.

    ie:
    Actionscript Code:
    var t:TextField = new TextField();
    t.text = "xmlData Here!";
    this.addChild(t);//given this is the root of your movie

    Thank should point you in the right direction, best of luck!

    -GK>-,-<

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center