dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: get variables value

  1. #1
    Registered User
    Join Date
    Sep 2002
    Posts
    25

    get variables value

    I have this script in the scene

    if ( count ==5 and vittoria eq 0) {
    tellTarget ("/slot1") {
    gotoAndStop(4);
    }
    tellTarget ("/slot2") {
    gotoAndStop(6);
    }
    tellTarget ("/slot3") {
    gotoAndStop(10);
    }
    }

    else
    {
    gotoAndPlay(2);
    }

    //caso hai vinto
    if ( count ==5 and vittoria eq 1) {
    tellTarget ("/slot1") {
    gotoAndStop(1);
    }
    tellTarget ("/slot2") {
    gotoAndStop(1);
    }
    tellTarget ("/slot3") {
    gotoAndStop(1);
    }
    }

    else
    {
    gotoAndPlay(2);
    }

    inside a mc I have count +=1;

    how can I get count value in the scene????

    And why doesn't work

    slot1.gotoAndStop(1);
    instead
    tellTarget ("/slot1") {
    gotoAndStop(1);
    }

    thank manner

  2. #2
    a.k.a gltovar deadlock32's Avatar
    Join Date
    May 2001
    Location
    Naperville,IL
    Posts
    489
    well for the count inside the movie clip you should have the "_root" in front of it.

    _root.count = 0;
    _root.count ++; //(same as += 1)


    as for anything else that doesn't work, you are programming weird to me. instead of using eq you can use = and i dont even know what the "instead" function does but im guessing its the same as the else function.

  3. #3
    Registered User
    Join Date
    Sep 2002
    Posts
    25
    Thanks deadlock32
    _root.count works fine

    instead is not a function
    I was just asking why
    whith
    tellTarget works(flash 4 programming - I think)
    and not whith
    slot1.gotoAndStop(1)


    thanks manner

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