?
Solved

how can we use Validations in Flash ?

Posted on 2009-04-15
3
Medium Priority
?
222 Views
Last Modified: 2012-08-13
http://www.dotcompreview.com/kite.ie/custome_design.asp

I wants to put validations in include shorts, socks, sleeve length etc..
i wants to put validations in radio buttons and its custom made not from default flash library.

please find the attach jpg ( screen shot of above link )
Kite-ie---MENS---DESIGN-PAGE.jpg
0
Comment
Question by:dotsandcoms
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 39

Expert Comment

by:blue-genie
ID: 24191444
not sure what you're refering to by validations, are you wanting to check that a radio button is selected for example?
0
 

Author Comment

by:dotsandcoms
ID: 24191610
yes... by default all radio buttons are not checked. if any one forget to select i want to notify them that you have to select yes / no . and this radio button is not from Flash Components, its custom created.

just tell me if you want anything else....
0
 
LVL 39

Accepted Solution

by:
blue-genie earned 1500 total points
ID: 24202982
ok i'm not sure how you've created your radio button.
but assume you have a button that you want to submit information but it needs to do validations first.

so what you can do is create a function to handle all your validations.

you didn't mention what version of AS you're using the following example is based on AS2 but it explains the logic. It also assumes your radio button has 2 frames for selected or not selected. did you build your radio buttons as components or just normal movie clips? if the latter you'll need to check each one individually as you aren't using radiogroups. so assume you have rd1 and rd2 as radiobuttons and first frame is not selected.

function validateSelections():Boolean {
if (rd1._currentFrame ==1 && rd2._currentFrame == 1 )
{
return false;
} else {
return true;
}
}

then on your button.

submit btn.onRelease = function () {
if (validateSelections) {
//they selected something carry on;
} else {
//none of the buttons were selected so notify accordingly.
}
}

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question