Solved

Flash Radio Buttons - Select button based on previously defined parameter

Posted on 2007-12-05
4
369 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
[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
  • 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

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

Suggested Solutions

Title # Comments Views Activity
Google Chrome - Where is "Enable Resource Tracking" 2 12,656
Microsoft WSUS 4 116
EMET 5.2 / Adobe Flash 2 261
Can't play streaming video on event.on24.com 7 494
Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

752 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