Solved

Flash Radio Buttons - Select button based on previously defined parameter

Posted on 2007-12-05
4
365 Views
Last Modified: 2012-06-27
I have 3 radio buttons within an embedded swf with the following parameters:

button1
data: blue
groupName: Colors

button2
data: red
groupName: Colors

button3
data: yellow
groupName: Colors

I have a global variable entitled _global.colors that has a value of "red". When this embedded .swf is called, I would like button2 to be shown as checked.

thanks

0
Comment
Question by:wattanabi2
  • 2
  • 2
4 Comments
 
LVL 39

Expert Comment

by:blue-genie
ID: 20436602
in the code that loads the respective swf files simply set the selected value of the radio button.
0
 

Author Comment

by:wattanabi2
ID: 20468555
Hi,

Thanks for the feedback.
I'm not quite sure how to do that. Here is the code in the actions layer:

======

flashistListener = new Object();
flashistListener.click = function (evt){
        theVerdict.text = evt.target.selection.data
}
ColorOption.addEventListener("click", flashistListener);


stop();

====
I tried:

ColorOption.data = "red";

But button 2 did not display as checked.

Any further assistance is greatly appreciated.
0
 
LVL 39

Accepted Solution

by:
blue-genie earned 250 total points
ID: 20470116
I'm a tad confused, in your first post you said your group name was Colors - why's your event listener ColorOption?

Whichever groupname you choose to use, you need to say groupName.selectedData = "red" - or whatever value.
0
 

Author Comment

by:wattanabi2
ID: 20473313
That was a typo on my part. Your solution did the trick.

Thanks!

=====
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
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 how to record live broadcast.
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.

747 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now