OZONE Asylum
Forums
Multimedia/Animation
Flash, XML, class constructors
This page's ID:
11461
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
This would be Actionscript 2 (Flash MX 2004) yes? You should probably mention that next time, as the class constructor threw me at first (didn't have em pre MX 2004). Anyways, slime is correct, you should specify [b]this[/b] so that flash knows to look for function gameOnLoad() inside the GameData object instance. As it currently is, the XML onLoad event is looking for a global gameOnLoad() function, which doesn't exist. As for setting game_xml to [b]this[/b] well, you may as well be setting game_xml = game_xml as [b]this[/b] inside of an XML object method refers to the XML object instance, which is game_xml. So there's really no need for it. Edit: Inside the gameOnLoad method, it's preferable to just use [b]this[/b] to refer to the XML data: this.firstChild.childNodes[0].attributes.first_name etc ect... [url=http://dracusis.deviantart.com/] [img]http://www.whatever.net.au/~cameron/files/images/ozone/ArtDecoSiggy.gif[/img] [/url] [This message has been edited by Dracusis (edited 10-12-2003).]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »