A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Help with setting variables

  1. #1
    Member
    Join Date
    Jul 2003
    Posts
    31

    Help with setting variables

    I'm making a simple game and i wanna know how id make it so that when i click on a key (and make it dissapear by moving it's frame up by one, movie clip) and then click on the keyhole on a box it will change frames and appear to have opened

    right now, if you click on the keyhole before getting the key it says "get the key first" but when i get the key it still keeps saying that

    here in the code i have on the keyhole:

    on (release) {
    if (_root.lockedbox1 = 0) {
    with (this) {
    gotoAndStop(3);
    }
    } else {
    with (this) {
    play();
    }
    }
    }

    and this is what i have on the key:

    on (release) {
    lockedbox1 = 0;
    with (key1) {
    play();
    }
    }

    can anyone help?

  2. #2
    Member
    Join Date
    Jul 2003
    Posts
    31
    bump

    sorry guys, but i really need help with this!

  3. #3
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,488
    Try changing this line:

    if (_root.lockedbox1 = 0) {

    To this:

    if (_root.lockedbox1 == 0) {

  4. #4
    Member
    Join Date
    Jul 2003
    Posts
    31
    I LOVE YOU

    im such an idiot! im a c++ programmer and i forgot that if you did "if locked = 0" that im actually SETTING locked TO 0...ugh

    thanks soooo much

  5. #5
    Member
    Join Date
    Nov 2002
    Posts
    79
    Always do the same mistake, your not the only itiot
    -Wako -- Ako2Own

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