A Flash Developer Resource Site

Results 1 to 17 of 17

Thread: delete duplicate

  1. #1
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404

    delete duplicate

    hey how can I get a movieclip deleted if theres a duplicate like if

    player.playerName = ''; has the same name as player.playerName = '';

    delete the newest player made.



    this problem in general has nothing to do with multiplayer this glitch only shows client side.

  2. #2
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    Didn't quite understand it, but if you're using attachMovie, just use the same depth as the original movieclip to replace it.
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  3. #3
    Designer, Programmer, Musician angelhdz's Avatar
    Join Date
    Mar 2010
    Posts
    971
    More specific Basses xD

    Explain your scenario to know how to guide you in the correct direction.

    Actionscript Code:
    if(player.playerName ==player.playerName )player.removeChild();
    I think...i don't know if that's a nonsense...hehe i'm not thinking with clarity today sorry bro

  4. #4
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    removeChild() o.o??

    You sure you aren't mixing AS3 with AS2 xD?
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  5. #5
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404
    dude I think you me and nig13 are on the same boat, weve been feeling lazy as f@# lately xD

  6. #6
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404
    I cant explain the issue, id have to show a video its way to difficult to explain :/

  7. #7
    Designer, Programmer, Musician angelhdz's Avatar
    Join Date
    Mar 2010
    Posts
    971
    Show a video then hehe. And no Nig, it is AS2, check it byyourself. removeChild

  8. #8
    Senior Member
    Join Date
    Jan 2011
    Posts
    171
    AS2:

    attachMovie();
    removeMovieClip();


    AS3:

    addChild();
    removeChild();



    arkitx

  9. #9

  10. #10
    Designer, Programmer, Musician angelhdz's Avatar
    Join Date
    Mar 2010
    Posts
    971
    Sincerely? I HATE AS3.

  11. #11
    Designer, Programmer, Musician angelhdz's Avatar
    Join Date
    Mar 2010
    Posts
    971
    As3 was created for commercial purposes. Get more money from us. They force us to forget as2, learn as3, because if we don't learn it we would be far behind , "Outdated", then they will remove as2 from flash and we wish to have the newest flash version, it will only have As3. Why not optimize the As2? Why not simplify it instead of complicating it, so as2 users can stay with their flash version for a long time instead of keep buying each time a newer version? And those who have been paid a lot of tutorials, or have paid to go to an institute or college or university to learn as2, that is lost money, because now the have to forgive all they learnet, and pay again to learn something nonsense and absurd and stupidly complicated as AS3 is.

    I swear, when they remove AS2 from flash, i will stop getting newer versions. Or i can suggest , Adobe, you are on time to forget about as3, and optimize as2...

  12. #12
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404
    They discontinued flash anyways, there wont be any new versions thanks to "html5"
    but I am not quiting flash because I like it.

  13. #13
    Designer, Programmer, Musician angelhdz's Avatar
    Join Date
    Mar 2010
    Posts
    971
    Ujum, as I said before, html5 came to destroy flash, but that doesn't mean we will stop using flash...this is a competition between programming languages...that language that achieves to be complete and better than the others, will be successful and will be the "KING" and will have all the attention. Html was unattended, he wanted attention so he decided in taking steroids and growing up in scripting musculature becoming HTML5.

    It supposed that a good coding/programming/scripting language's scripting proccess would be as simple, clean and quick as possible. But AS3 doesn't meet these attributes.

    AS2
    Actionscript Code:
    myButton.onPress=function(){
    //DO THIS :D
    }

    AS3
    Actionscript Code:
    Bla bla bla function, bla bla bla mouse listener, bla bla bla string variable bla bla bla stage, bla bla bla mouse event bla bla bla onClick bla bla bla mouse children bla bla bla mEnabled

    Seriously? If AS2 is sometimes harder to code, AS3 is a pain in the ass.

  14. #14
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404
    loool true that

  15. #15
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    Well, I do agree about hating AS3, but truth is, it's more Object-Oriented Programming (OOP) based, and that's actually what real programming is (Java is fully OOP based), but AS2 makes everything really easy and I think everyone should start with that language
    I'm not saying AS3 is good, and I'll freak out if they remove AS2 from newer version (if any). If Adobe Edge (Adobe's software for HTML5) becomes popular, Adobe will probably cease to produce more Flash software -.-*

    and btw, angelhdz, event codes like this:

    Actionscript Code:
    onMouseMove = function(){
        trace("Mouse Moved :D");
    }

    is a simplified version of this:

    Actionscript Code:
    mouseListener = new Object();
    mouseListener.onMouseMove = function(){
        trace("Move!");
    }
    Mouse.addListener(mouseListener);

    the same goes for Buttons and events like onPress, but Adobe made it easy for us by simply naming them like that, and I really love that they did that. Because who wants to type this:

    Actionscript Code:
    myButton.addEventListener(MouseEvent.MOUSE_DOWN, btnPress);

    function btnPress(e:MouseEvent):void{
        trace("Finally, after so much code!!!! >:(");
    }

    Just to quickly make a simple button press? I admit it's good practice, but it can quickly get annoying to write it all the time... also I hate strict data typing, where you just HAVE to specify the Data Type you're using, like:

    Actionscript Code:
    var myArray:Array = new Array();

    instead of:

    Actionscript Code:
    myArray = new Array();

    .________.
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  16. #16
    Senior Member
    Join Date
    Aug 2006
    Posts
    322
    My opinion is don't hate languages.

    If you stick with AS2, you can always with your supported version of Flash. Adobe will not take it way from you and give you the latest upgrade.

    BTW: You can use MTASC AS2 compile if you don't want to use Flash IDE anymore. OH! Yes, you can always afraid for the Flash Player which will execute your code. But that will always going to support all the versions of ActionScript.



    ö

    marlopax

  17. #17
    Designer, Programmer, Musician angelhdz's Avatar
    Join Date
    Mar 2010
    Posts
    971
    Thanks guys

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