A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: variable problem - this should be easy, right?

  1. #1
    Senior Member
    Join Date
    Oct 2000
    Location
    2006: Thika, Kenya
    Posts
    955
    I've set a variable in the first frame:

    q1 = 0;

    Then, in a button I'm trying to give the variable a new value:

    on (release) {
    q1 = 1;
    }

    Then, in another button (that the user won't push until after hitting the first button) I declare an "if-else" statement on mousedown, so that if q1 = 1 it does something, if not it does something else. I can't get the variable to change it seems.

    Any help here?
    If I haven't been quite clear enough then please ask for more info.

    Cheers
    Dave

  2. #2
    Junior Member
    Join Date
    Oct 2000
    Posts
    8

    Some considerations

    Check the following

    1. is your variable a global one, if u are using flash 4 u have to post it to the main timeline in order to make it available outside the clip

    2. do u have any actions applied on mouseup aftér the mousedown?

    3. did u trace your variable, that helps me alot personally.

    hope u get it right

    i am curious about your homepage it looks promising :-)

  3. #3
    Senior Member
    Join Date
    Oct 2000
    Location
    2006: Thika, Kenya
    Posts
    955
    Thanks Larse,

    I've worked it out now. Can't remember what was wrong, I tried too many variations I can't remember the original problem!!

    Which homepage do you mean? This one, or my link below?


  4. #4
    Junior Member
    Join Date
    Oct 2000
    Posts
    8

    your page

    Originally posted by TheOriginalFlashDavo
    Thanks Larse,

    I've worked it out now. Can't remember what was wrong, I tried too many variations I can't remember the original problem!!

    Which homepage do you mean? This one, or my link below?


    i meant
    http://www.envisionous.com

    looking forward to it

    bye

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