A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: a question of variables?

  1. #1
    Junior Member
    Join Date
    Oct 2003
    Posts
    20

    a question of variables?

    I'm not sure here what to search for, so apologies if this has been asked before...

    I have an image in my movie that looks like a rubiks cube and each square on the cube has a value between 1 and 4. I've used invisible buttons on each square.

    When the user clicks on a numbered square, I want that number to appear in a checklist column somewhere else on the screen.

    I'm sure it's simple but I can't think where to start? I could have Friday afternoon head squeeze, or I may be going insane. Please help...thanks

  2. #2
    ___________________
    Join Date
    May 2004
    Posts
    3,174
    make a dynamic text field

    put in the Var section (not the instance section)

    numberVar

    put in frame 1

    var numberVar = "";

    on the buttons, put

    on(press) {
    var numberVar = "4"
    }

    or of course whatever number you want to have the text field display.

  3. #3
    Senior Member hum's Avatar
    Join Date
    Sep 2003
    Location
    CloudCuckooland
    Posts
    1,714
    Here is a similar way....see attached fla.

  4. #4
    Junior Member
    Join Date
    Oct 2003
    Posts
    20
    Thanks to you both for your replies and your ace download!...

    Hum, looking at your fla, I've realised my problem goes further than I originally thought.

    My column consists of 10 rows of questions, and the answer to each question is a number.

    I need users to click on a number on the rubiks cube, which is then the first answer in the column. Then they read the second question and click on the cube to answer it with a number. This applies to all 10 questions...? It's so much harder than I originally thought.

  5. #5
    Senior Member hum's Avatar
    Join Date
    Sep 2003
    Location
    CloudCuckooland
    Posts
    1,714
    Hi again......
    I'm off to work now,but i'll send an example fla. to this thread tomorrow to demonstrate how to help with your project....until then good luck!

  6. #6
    Senior Member hum's Avatar
    Join Date
    Sep 2003
    Location
    CloudCuckooland
    Posts
    1,714
    Here ya go....
    Here is an example
    The code with this fla. could still be optimized considerably........
    (i made a hurried version!)
    Hope this helps out .......
    Let me know if you need any more help...

  7. #7
    Junior Member
    Join Date
    Oct 2003
    Posts
    20
    That looks ace Hum, thanks... I'm going to (try to) figure out what you've done and see what I can do... There may be more questions! Really appreciate your help. Cheers

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