HomeAbout

Replace String

Another small and handy class for you to use: Replace String.

With this class you have two methods: replace a characters in a string, or give a list of predefined characters to replace.

Code is all pretty self explainatory, for help leave a comment.
For the class gotoAndClick:

http://www.funky-monkey.nl/blog/2006/10/29/replace-string-class/

2 Comments »

  1. hei,, i dont know if you have the time to answer me this questions, but i’m a little bit deseperated….

    i have this script:

    var arreglo3:String =_root.btn3admintitle;

    var arreglo4:String =_root.btn4minsidetitle;

    var arreglo5:String =_root.btn5systemtitle;

    if(arreglo3 == “falso”){
    _root.btn3.titu.text = arreglo3;
    }
    else{
    _root.mainMenu.peliMovie.attachMovie(”btn3admin”, “btn3adminvideo”, this.getNextHighestDepth(), {_x:5, _y:18});
    }

    if(arreglo4 == “falso”){
    this.btn4.titu.text = arreglo4;
    }
    else{
    this.mainMenu.peliMovie.attachMovie(”btn4minside”, “btn4minsidevideo”, this.getNextHighestDepth(), {_x:5, _y:54});
    }

    if(arreglo5 == “falso”){
    this.btn5.titu.text = arreglo5;
    }
    else{
    this.mainMenu.peliMovie.attachMovie(”btn5system”, “btn5systemvideo”, this.getNextHighestDepth(), {_x:5, _y:92});
    }

    what i want to do is to evaluate several times different variables, wheter if they are = to “falso” or to ather string,

    The problem is that when the script runs it only read the last script… the last “if”… how can i make it to read all the 3 “if’s”…?? or more?….

    thanks

    alejandro

    Comment by alejandro — September 6, 2007 @ 6:48 am

  2. [...] This class is also featured on Actionscript Classes, nice resource for [...]

    Pingback by Confessions of Flash Addict » Replace String Class — January 16, 2008 @ 5:02 am

RSS feed for comments on this post. | TrackBack URI
You can also bookmark this on del.icio.us or check the cosmos

Leave a comment





XHTML ( You can use these tags): <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> .