dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: string into array 2

  1. #1
    Junior Member
    Join Date
    May 2001
    Posts
    27
    ok i explain
    i have an Array like
    Arraysection = new Array("section0", "section1", "section2", "section3", "section4", "section5", "section6");

    and i have a varible section this variable change by director cause my flash was in director and director only send string an not number to flash

    section="section0"

    i have to compare this variable to receive the number 0

    i need this to know in wich section my director was

    scuse my english

  2. #2
    Senior Member
    Join Date
    Mar 2001
    Posts
    384
    not sure if I know exactly what you're asking, but if you want to extract the number from the string+number you can use
    section=number(substring(7));

  3. #3
    Junior Member
    Join Date
    May 2001
    Posts
    27

    thx but i reach it

    thx

    Arraysection = new Array("section0", "section1", "section2", "section3", "section4", "section5", "section6");
    section = "section3";
    open = 0;
    ppstatut = 1;
    function foward () {
    for (i=0; i<Arraysection.length; i++) {
    gsection = i+1;
    if (section == Arraysection[i]) {
    trace (gsection);
    break;
    } else {
    continue;
    }
    }
    markeur="lingo: go to "+"\""+ArraySection[gsection]+"\""
    trace (markeur)
    getURL (markeur);
    }

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