View Full Version : XML -> Flash objects
boyesen
04-04-2002, 03:39 PM
Guys,
I'm relatively new to this, and I'm fumbling around with some XML pages containing text, images, buttons, and a bit more (all should be showable in flash).
I was wondering if I could parse my XML pages with an XSL-kind-of-thing inside flash, so that I would be able to generate flash objects from my XML pages directly. Is this possible?
How about the position of the objects?
Thanks in advance for any help.
Jesse
04-05-2002, 12:50 AM
Generally you would parse your XML into an array or group of objects and it would include, for example, the url of the image you wanted to load up and the _x and _y for final positioning.
With the appropriate parsing routines there shouldn't be a problem with going straight from XML to objects displayed on the stage...
boyesen
04-05-2002, 08:16 AM
Thanks. Do you (or anyone else) have a link to an example showing how to draw flash objects with actionscript? - I'm not thinking of ECMA objects, but flash objects drawn on directly stage.
Another question: Is it possible to have the objects positioned automatically from an index? - I know about the setIndex property, though it works only in Flash 6.
Thanks in advance!
Jesse
04-05-2002, 01:59 PM
Drawing dynamic objects is only really coming into popular reach with the release of the new drawing API in Flash MX. I've not seen any tutorials on it yet but FlashGuru ( www.flashguru.co.uk ) posted some example files in his news section.
I'm afraid I don't know what you mean by 'positioned from an index'.
boyesen
04-05-2002, 04:34 PM
Ok, I'll check up on the flashguru site.
As for positioning, what I meant was: Is it possible to position objects relatively to each other?
mad_A
04-05-2002, 06:33 PM
It is possible to position objects / movies relative to each other easily enough...for example.. this would be on the movie itself rather than externally in an XML file, but you could pass a parameter from the xml of how far away from the other movie to go.
this._x=othermovie._x + 50;
this._y=othermovie._y + 50;
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.