DISQUS

circlecube - interactive actionscript: XML and Flash Actionscript made Easy | Parse XML to Object | Tutorial

  • Free Tarot · 1 year ago
    Wow. Thank you! In the past I've been in too much of a hurry to even try to work with ActionScript's stupidly complicated XML handling. On one recent project, I just imported the whole XML file as text, and parsed it using string functions for the bits I needed. (Not very elegant at all, I know.. but in terms of coding time, it was much quicker).

    This is extremely sweet though. (In fact, what you've done here is sort of how I thought XML handling in ActionScript *would* work before I found out otherwise).

    Very nice. Very nice.

    -Popo
  • Gold Coast Login · 1 year ago
    Very nice.

    great for transferring info to and from Flash using xml and easily
    being able to grab info.

    Phil
  • Mark · 1 year ago
    Can any one help me with this

    Create a Flash Movie: 550 x 400 pixels.
    2. Write 2 external ActionScript files, one of which MUST be the Document
    Class.
    3. Code a Rectangle with a Blue border and fill it with a Red and Greed Gradient
    at a 45 degree angle. (Use the second ActionScript file for this)
    4. Add 10 instances of this Rectangle to the stage, randomly placing them along
    the TOP of the movie, one per second, for 10 seconds.
    5. As soon as a square is added, it should start falling to the bottom of the
    movie, where it bounces before coming to a stop.
    · There should be NO Timeline animation of any kind, in-fact, there should be
    nothing on any Frame of the .fla file at all.
    · The Library of the .fla file should also be completely EMPTY.
    · You are allowed to use no more than 60 lines of code, spread over the 2
    allowed ActionScript Files.
    · You must send the .fla file, together with the 2 ActionScript files in for
    evaluation.
  • circlecube · 1 year ago
    @Mark - Looks like a fun assignment! Good luck with that.

    This post may help you and I'd definitely recommend Keith Peters for the background on gravity
  • Michael · 1 year ago
    Evan,
    do you have an AS3 version of this?

    Thanks.
  • tekkie · 7 months ago
    Yup, it's all ActionScript 2. Thinks like XMLNode are not working with only 1 parameter in AS3 etc.
  • Bart · 6 months ago
    Xml to Object, is that not what e4x does? wich is available in my Flex/Air projects

    I am looking for a deserialize to a custom type
  • circlecube · 6 months ago
    @Bart - Yes, but note this is for as2, this xml to object is pre e4x, there are multiple ways to do it, but some as2 developers still could find uses for it. Good luck with the deserialiser.