key pad

  • sarvel
  • Student
  • Student
  • User avatar
  • Posts: 79
  • Loc: Dubai

Post 3+ Months Ago

Dear friends
I want design numeric key pad. That pad has 0 to 9 numbers. If any one can press four or five digit numbers (like 3220).after that pressing enter or show button I should show some image . So I want know how can I get the values and how can I show the movie clips. I have very little bit of knowledge in flash. so please tell me.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • sarvel
  • Student
  • Student
  • User avatar
  • Posts: 79
  • Loc: Dubai

Post 3+ Months Ago

please anyone help me.
  • mahjik
  • Novice
  • Novice
  • mahjik
  • Posts: 33
  • Loc: Las Cruces, NM USA

Post 3+ Months Ago

do you want them to type the numbers into a text field, like i am right now entering this reply? or just push the magic keys with no onscreen effect until they have entered the right combo?
  • sarvel
  • Student
  • Student
  • User avatar
  • Posts: 79
  • Loc: Dubai

Post 3+ Months Ago

yes there is one text box .that shows the pressing numbers and finally the person click view button. Then only it will show the related movie clip.
  • mahjik
  • Novice
  • Novice
  • mahjik
  • Posts: 33
  • Loc: Las Cruces, NM USA

Post 3+ Months Ago

ok, make sure you have named the text field instance. i.e. 'myText_txt'

use the following code to check for when the content of the field is changed.

Code: [ Select ]
myText_txt.onChanged = function(content){
  // do pretty much anything you want to
}
  1. myText_txt.onChanged = function(content){
  2.   // do pretty much anything you want to
  3. }



basically, you can do whatever you want in the onChanged function. i chose a switch statement based on the parameter passed to the onchanged function (content) indicating what the user had typed into my textbox
mov1 in this case is a theoretical frame label in your movie.
outputText_txt is a text field used for giving the user messages

Code: [ Select ]
myText_txt.onChanged = function(content){
   switch(content){
    case "movie 1": gotoAndPlay (mov1);
              : break;
    case "3552"  : outputText_txt.text = "you have entered the magic code";
              : break;
    default    : outputText_txt.text = "ERROR, input not recognized";
  }
}
  1. myText_txt.onChanged = function(content){
  2.    switch(content){
  3.     case "movie 1": gotoAndPlay (mov1);
  4.               : break;
  5.     case "3552"  : outputText_txt.text = "you have entered the magic code";
  6.               : break;
  7.     default    : outputText_txt.text = "ERROR, input not recognized";
  8.   }
  9. }


hope that helps

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 9 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.