A Flash Developer Resource Site

Page 2 of 2 FirstFirst 12
Results 21 to 30 of 30

Thread: [RESOLVED] xml + flash as2 help, I can buy you a drink ;)

  1. #21
    Senior Member
    Join Date
    Nov 2001
    Posts
    1,145
    Of course I read the posts and understand your code.

    I posted the code to give you guys ideas about code in general, not this specific application. Everything I do in "my" code I learned at school, here, adobe, gotoandlearn, kirupa, etc. so I don't even consider it "my" code.

    For example, in your code, you load the xml but don't save the data. It's simple and makes sense to store the data. Make the "item" have all the properties it should have so you don't have to recode the item every time you get a new task.

    When you give the "item" properties, you can grab any info about that item or the xml because they're the same.

    Code:
    function doPressThumButton(){
    	trace("doPressThumButton(): itemID: " + this._parent.nItemID);
    }

  2. #22
    Designer, Programmer, Musician angelhdz's Avatar
    Join Date
    Mar 2010
    Posts
    971
    And actually that's what our friend Alloy asked for. Loading the XML when it is needed, one by one, not ALL AT ONCE. He only needed to create a TILES MAP , loading the data from the XML. And that's precisely what I did. That saves RAM memory. You press MAP 1, then all the data from the Map 1 Tiles is loaded and stored in variables. The tiles are created accordingly. Then , when you press Map 2, all the data from the Map 1, gets removed (including movieclips) and new data from Map 2 is loaded. No need for loading ALL the XML data at once and storing it inside the SWF memory.

    PD: When you create something, no matter where have you learned how to make it, you are the creator. It's your creation. Every person, every company, before getting PRO and economically prosperous in their business, they had to learn how to make things. All of us, learn everyday. And when you create something with all that knowledge you have adquired, you are the owner of that creation.

    This script, i didn't downloaded from anywhere. I had to burn my brain to develop it. I had to learn in 1 day how to load data from an XML in as2 (I already knew how to make it in as3). So this is my creation. "My" code.

    Take care my friend moot
    Already mastering AS3. It was so fun. Now into Javascript and PHP and all its libraries

  3. #23
    Senior Member
    Join Date
    Nov 2001
    Posts
    1,145
    Sigh....

    Don't try to correct me or argue or whatever it is you're doing. I'll answer any question in here I feel like answering whether or not you've given an answer. Yes, I designed and wrote every bit of my code. You missed the point...again.

    Would you like me to explain to you how your code works line by line?

    Would you like me to critique your code? The unreadable xml? The three identical button functions? The function inside a function? You load the xml into a function so the xml gets destroyed. You pass the data to a function that creates a bunch of clips with no references.

    You don't even know where your clips are (store references) to remove them, much less do anything else with them.
    Code:
    for(var t in this) { 
        if(typeof(this[t])=="movieclip" && this[t]._name =="t"+t) { 
               // if you're clips are not dynamically attached, then de-comment this line: 
               //holder[i].swapDepths(10000); 
               this[t].removeMovieClip(); 
        }
    You can help people with their code. But stop acting like, and literally saying, that you're an expert. And definitely take a different attitude with me.

  4. #24
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404
    Angelhdz code was exactly what I needed moot, if you didnt notice by the time you submit your help the thread was already marked resolved. so you guys dont have to argue im sure both your codes do the job, Thanks for the code moot I will save it in a text file for future uses just incase I need it.

  5. #25
    Designer, Programmer, Musician angelhdz's Avatar
    Join Date
    Mar 2010
    Posts
    971
    Bah, i won't lose my time answering to him. He just want to argue, NOT ME. The post was marked as resolved , and he replied anyway because He is the one who wants to show that he is an expert, bah n: he just want to compete , i already know someone that does the same thing everytime.

    I never have declared myself as an expert. I'm here to learn, and to help, even If my scripts are not AS ADVANCED AS other scripts. This guys is sooo overweening, I expected more humility from him or she or whatever it is. Since this moment i will ignore all your comments moot because you are not in the "mood". (wow that rhymed)

    Have a nice day, because I'm having a niceeeeee day , trust me

    PD: Look at this comment you posted "I posted the code to give you guys ideas about code in general, not this specific application."
    who's the one that came up to this thread acting like the "ALL-KNOWING-WISE-GUY/CHEEK?"
    Already mastering AS3. It was so fun. Now into Javascript and PHP and all its libraries

  6. #26
    Senior Member
    Join Date
    Aug 2012
    Posts
    115
    What wrong you Angle, attack eveybody when challenge about coding.
    Is good idea you post proper code that work well, not just work

  7. #27
    Designer, Programmer, Musician angelhdz's Avatar
    Join Date
    Mar 2010
    Posts
    971
    I'm not here to challenge or compete. I'm here to help. You don't like my coding? Don't read it.
    Already mastering AS3. It was so fun. Now into Javascript and PHP and all its libraries

  8. #28
    Designer, Programmer, Musician angelhdz's Avatar
    Join Date
    Mar 2010
    Posts
    971
    Oh, and by the way, as this thread got resolved, i will unsubscribe it, so don't bother replying. Have a nice day.
    Already mastering AS3. It was so fun. Now into Javascript and PHP and all its libraries

  9. #29
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404
    lol flash drama

  10. #30
    Senior Member
    Join Date
    Nov 2001
    Posts
    1,145
    Again, this is a flash forum, not a private conversation. It's great that you help Alloy solve his issue.

    I posted because the solution you gave was poorly formed and incorrect in places. I didn't post to show you up, I posted to give a good solution. It's not about you, it's about the thousands of people who read the posts.

    So, my suggestion is that you don't say things like "now i understand it and i think i've mastered it." You should say the truth which is, "I didn't even start using xml until a few days ago myself" so that when people come to learn, they know what they are looking at.

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