Setting A Variable With A Checkbox?
Dec 18, 2009I can't figure out how to set a boolean variable to 'true' if someone clicks a checkbox. Help, please. I'm working on AS2, btw.
View 1 RepliesI can't figure out how to set a boolean variable to 'true' if someone clicks a checkbox. Help, please. I'm working on AS2, btw.
View 1 Replieslet's say 30. they are nothing less than colors of different shades/tints. firstly i need to randomize the loading of one of those movieclips when i push a button and secondly i want to control that randomization with a couple of check boxes. let's say i have a first row of checkboxes which control the particular color that is going to beoaded(red,green,yellow,blue) and a second row that controls the shade(extremely dark,very dark,dark,light dark,neutral,light bright,bright,very bright,extremely bright). for instance if i choose yellow and green from the first row of check boxes and neutral and light from the second row i want the movie to load randomly yellow and green movieclips with those particular shades(neutral and light).
View 2 RepliesThis PHP contact form works well and is very simple. I have one checkbox in the fla file. However, it keeps displaying 'No' in the email message field, whether the checkbox is selected or not. It should display 'Yes' if the checkbox is selected, and 'No' if the checkbox is unselected.Here is the PHP:
PHP Code:/DESTINATION--------------------------
$destination="***@***.com";
//-------------------------[code]....
I've created a flash form using components from flash 8 and can capture the values(variable name) from following components: listbox, radio buttons, textbox and textarea, dropdown list but.... I am unable to capture the value of my checkboxes.
View 2 RepliesI have got a component within my flash form. I have a button that sends information to PHP (this is working). What I need is checking whether the check box is selected or not, so that if it is my button will go to one place, and if not then it will go to another (which I know will be done with an 'if' statement).
View 4 RepliesI am trying to assign a few variables to checkboxes that I am adding dynamically to the stage. There are like 40 checkboxes added dynamically and I need to keep track of a few variables for each checkbox.It will only let me assign a "name" to the checkbox. If I try something else like "Group" (see code), then I get a runtime error:[code]
View 3 Replieshow I can get a variable assigned to a checkbox component in Flash and into a database through ASP/VBScript?
View 2 RepliesI am encountering a bizarre Flex 3.4 issue. I have a class that acts a dataprovider to my entire application named "DataProvider.as":
package {
public class DataProvider {
[Bindable]
public static var email_enable:Boolean = true;
}}
In an mxml form, "Settings.mxml" I have a checkbox control which is bound to the email_enable variable of my dataprovider class:
<mx:CheckBox x="452" y="170" label="{Language.loadLanguageResource('lblEmail')}"
id="chkEmail"
selected="{DataProvider.email_enable}"
change="onChange()"/>
All is well as far as getting the value, if I set the variable in my dataprovider to either true or false, the checkbox reflects this change; however, if I click on the checkbox and change it's value, the dataprovider variable never reflects the change.
I am using datagrid and added 3 columns to it in flex project. Data is provided to each column by using itemrenderer. Itemrenderer is checkbox for each column. Name of columns are col1,col2,col3. I want to make the checkbox in col1 selected when i selects the checkbox in col2. But i am not able to do this.
View 1 RepliesI need a datagrid, which contains checkbox (4 no's) without multiple selection. And I also need a text area which should contain the selected checkbox's label/data. I tried using arraycollection but I am not getting.
View 2 RepliesHow do I set/access the "Text File" variable as shown in the two pictures. _root and _global don't work.I also tried to access it from _root.CrosswordPuzzle.cp_words_textfile.I don't get components.
View 1 Replies[Code]....
What I am trying to do is create a root variable that can simultaneously equal a range of numbers. But I cant use the for command because the variable it will assign will only be confined to those brackets and can only be pulled from code inside the brackets
my string LINK at the end of the script is undefined it should change when i select the categories with my combo box
here is the xml :category.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<slideshow>
[code].......
I'm using createTextField to create a textfield. I have also created a input textfield with a variable called textline1 (I don't create the inputfield with as).I want to display the letters in the created textfiled that I'm typing in the input field. So this in my AS coed:
_root.createTextField("text1",1,100,100,300,100);
text1.variable = textline1;
format1 = new TextFormat();
[code]........
How could I set a Flash (Actionscript 3) variable using javascript? Or is it possible to call a flash function with parameters from javascript? I have tried ocument.getElementById('flash').SetVariable("data", "asdf");but it only works in AS2 and AS1.
View 3 RepliesI have loaded a movie clip from the library using the addChild Method. Now, from withing the main timeline of this loaded movie clip I'm trying to set the value of a curScore variable on the stage.
Code:
MovieClip(this.parent).curScore += 10;
Doesn't work...
trying to get a variable set so that I can use it in another class.I am trying to set the class variable animate. My "intended" goal is that I am trying to load in an external SWF file that is a pulley In this external SWF file I have a function that stops the animation called "stopAnimation()". I want to be able to access this stopAnimation function in a couple of class files. So I pass this object to those classes and then I should be able to access the stopAnimation() function from where ever but I cannot seem to get the contentloader info into a class variable in order to call it from other objects.
Here is the code
PHP Code:
package com.ahicks.assets{
import com.ahicks.Main;
import com.ahicks.Trace;
import com.ahicks.ndTween.easing.*;
[code]....
PHP Code: azar pin:Number;pin=1234; enter_btn.onRelease = function(){if (pin=input_pin) {gotoAndPlay(3)}} It's a cash machine demo, if you were wondering about the "pin" variables. Basicaly there is an input textbox with the instance name "input1" and the "var" setting is "input_pin" the button has the instance name "enter_btn". If the pin number = pin number typed in, go to frame 3. But it dont work...
View 8 RepliesI am using laco tweening prototypes http://laco.wz.cz/tween/ and have a little problem which im sure is easy to solve, but i just dont know how...
I have e.g 3 movieclips which i want to animate with a rollover from 3 different buttons - btn1 animates mc1, btn2 animates mc2 etc.
Each mc has the same animation (3 tweens - x,y and rotation) so i have set up a function for the three tweens using a variable for the mc name:
[Code]...
im trying to set up a variable passing system where once the user clicks a button it sets a variable and then once the movie hits a certain frame an if statement checks the variable and sends the user off in the direction depending on what the variable is.
here is the code on the button
on(release) {
set("global", "variable1");
}
[Code]....
the code seems to be working on the first part as the movie goes to the "here" part but i cant get it to go to the "thisplace" section.
Here's the problem
PHP Code:
var pin:Number;pin=1234; enter_btn.onRelease = function(){if (pin=input_pin) {gotoAndPlay(3)}}
[code]....
I need to create a Flash Quiz with the following:
1.) A page with a question, including a "submit" button, and an Input Text field where the user can type in his answer.
2.) A page with "Correct" and a page with "Incorrect".I have already gotten the pages and graphics created. But for the life of me my Action script is not working. The tutorials I have looked at would help me if I were making the quiz one total page where when you answered the question there would be a comment that came up, but that's not the case.
I have a flash movie, which has two frames and constantly loops. On the first frame I have set my variable, and on the next frame I make it add 1 to that variable. Thing is, the variable is currently being set to "0" on frame one, added one, then set back "0" again as it goes back to the first frame. Is there a way, without adding extra frames to set a variable on Load but then to not set it again?
My actionscript is like this:
Frame 1:
count = 0
Frame 2:
count +=1
I'm trying to set up a loop for a movieclip btn with the instance name "btnEnter". btnEnter is loading XML content from a file called menuDef.xml
Here is the code I have inplace so far,
//CODE//
var link: URLRequest = new URLRequest("menuDef.xml");var loader:URLLoader = new URLLoader(link);var i:intvar myXML:XML = new XML();//call the loaders load function to load the specified URL
[Code]....
Right now I have only the item_spacing and item_count variables in place, but I'm not sure of my next step?
I have a navigation bar movieclip that has the following EventListeners in symbol definition:
news_btn.addEventListener(MouseEvent.CLICK, clickHandler);function clickHandler(event:MouseEvent):void {event.target.root.gotoAndStop(1,"newsawards");
event.target.root.categoryName = "Transportation" <<<DOES NOT WORK}
[code]....
How do you set a max and min value for a variable? I have defined a variable, myVar, to have a default value of 10 at run time. The user can then use buttons to increase and decrease the amount. How do I set the limits?
View 1 RepliesAre you aware how to set a variable to true or false in AS3;
I tried
Code:
var flip:void = true;
But this is not recognized by AS3.
I have one timeline with two labels; "Sound" & "Mute". Is it possible to get the labels framenumber without setting variables as the movie plays? I need to "get" the framenumber directly when the movie is loaded.
In words if that makes it easier:
When movie is loaded
Get framenumber for label "Sound"
Get framenumber for label "Mute"
Done
I have an MovieClip star with a setup var X which is set to 0 for the thing I'm duplicating, namely star
===Star======
onClipEvent(load){
x=0;
}
If I duplicate the clip a bunch of times so I have Star0....N. Is there a way to set the x value here to the i value of the loop for each object duplicated. Such that star0 will have its x=0, star2 has its x=1 and so on.
setProperty wont do it or _root["star"].x=i;
How do you set a variable so that other layers can retrieve that variable.
PHP Code:
nick.onPress = function (){
set.my_txt = "nick";
gotoAndPlay(2);
trace(get.my_txt); // This does return "nick"};
// Then in another layer after the animation :trace(get.my_txt);
// this returns undefinedmaintextarea.text = get.my_txt + "'s Portfolio";