A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: controling MC with user entered data

  1. #1

    resolved

    I am trying to create a flash movie that will build graphs on the fly. The way that it should work is that a user enters a number between 1 and 100 under each individual bar of a graph. when they hit the submit button, the MC (the bar of the graph) should go to the coresponding frame within itself. I have tried everything I have known to try. It seems easy enough to import variables, however getting the value of a variable from within a text box in my movie seems virtually impossible. How can I call the number that someone types in and use it to direct the clip to the correct frame?


  2. #2
    I'm a hero like Robert De Niro
    Join Date
    Mar 2000
    Location
    London
    Posts
    1,171
    Hello,

    What you need to is create an animation of the bar but that animation wont run.It will just give you different heights of the bar.You have to find the relation between the number the user enters and the frame number in way that if the user enters "50" then the button will tell the bar movie clip to go to frame 50 for example.The button should have something like:
    on (release) {
    with (_root.mainbar) {
    gotoAndStop (number_user_placed);
    }
    }

    Where "number_user_used" is the name of the text field.

    Just an idea.Hope it helps.

    McMurphy

  3. #3

    thanks

    I used a slightly different approach that ended up working so I didnt get to try yours but thanks for the help

  4. #4
    I'm a hero like Robert De Niro
    Join Date
    Mar 2000
    Location
    London
    Posts
    1,171


    Anytime

    McMurphy

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