pNine Posted February 24, 2013 Share Posted February 24, 2013 Hi guys i've been working in something and basically what im trying to do is make a new 'tranfer box' aka 'download box', therefore i have to make my own download manager. But i'm having some troubles with this, first i tried loading the map with the xmlLoadFile function but that also triggers the download box, so i moved on to fileOpen. local mapElement = createElement ( "map" ) local mapMeta = xmlLoadFile ( ":"..getResourceName(map).."/meta.xml" ) -- getting the map's meta in order to get its src local mapChild = xmlFindChild ( mapMeta, "map", 0 ) local mapSrc = xmlNodeGetAttribute ( mapChild, "src" ) local mapFile = fileOpen( ":"..getResourceName(map).."/"..mapSrc ) local newMapElement = loadMapData ( mapFile, mapElement ) -- here's where im stuck at.. the first parameter must be a node and all i've got is a file. any feedback will be apreciated :] Link to comment
DiSaMe Posted February 24, 2013 Share Posted February 24, 2013 Of course, you have a file because you load it using fileOpen. Use xmlLoadFile to get the node instead. Link to comment
pNine Posted February 24, 2013 Author Share Posted February 24, 2013 Ye but if i use xmlLoadFile it will trigger the transfer box.. and the whole point is avoiding that. Any thoughts ? Link to comment
DiSaMe Posted February 25, 2013 Share Posted February 25, 2013 All what xmlLoadFile does is loading the data from the file into memory. It doesn't do anything related to the data transfer. Link to comment
pNine Posted February 25, 2013 Author Share Posted February 25, 2013 You are right! What triggers the transfer box is the loadMapData. Is there any other function to do such thing, instead of getting all the nodes and its childs ? Link to comment
Anderl Posted February 25, 2013 Share Posted February 25, 2013 I don't think there is, you'll most likely need to script a function to do it. Link to comment
pNine Posted February 25, 2013 Author Share Posted February 25, 2013 Okay thank you : D Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now