Solved

how can we use Validations in Flash ?

Posted on 2009-04-15
3
217 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
  • 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 500 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
The goal of the tutorial is to teach the user how to how to record live broadcast.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

820 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