Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

how can we use Validations in Flash ?

Posted on 2009-04-15
3
Medium Priority
?
224 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
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 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.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.
Suggested Courses

618 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