ActionScript 2.0 :: Working With Checkbox Component - Getting Errors?
Sep 13, 2011
I know my way around basic Flash, I can work with script as long as I have script assist for basic things like getting URLs and linking buttons etc. I'm trying to create a "don't show this page again" on the opening page of a mini-site using a checkbox component and so far, I've dragged a checkbox onto the stage from the components window and only been able to change its label to "don't show again" from "checkbox" in the parameters window. I've given it the instance name of 'showAgainCheckBox' and I have this code on the component layer first frame looking like this.
Code:
Select allshowAgainCheckBox.addEventListener( Mouse.Click, onshowAgainClick );
function onShowAgainClick( e:MouseEvent ):void {
// do something about the click here
}
Of course the code is filled with errors from what I get of the compiler message. I've been trying to get the logic. So I might need like a 'checkbox component for dummies' kinda explanation.
View 8 Replies
Similar Posts:
Feb 12, 2009
This 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]....
View 4 Replies
Mar 16, 2010
I have a project with 100 pages or so. Each of this pages will have a label name. I am trying to create a toogle button that will ad the frane name to an array by using "currentLabel". If the user unchecks the box, then remove "curentLabel" from the array. At the end, there will be a "review" section where the items on the array will show in a comboBox so that the user can navigate to each of these pages.
I already have the combo bit working:
flaggedList.dataProvider = new DataProvider(flaggedQuestion);
flaggedList.addEventListener(Event.CHANGE, changeHandler);
function changeHandler(event:Event):void
[Code]....
I tested it by using a button that added the "currentLabel" to the "flaggedQuestion" array. But is the user clicks on the button more than once on the same page, it keeps adding the same label (as it should). Thats why I figure using a checkBox component that the user can check and uncheck would be an ideal solution. The problem I have with checkboxes, is that it is not keeping the "check" on the box is the user navigates back and forward thru the sections...
View 6 Replies
Jul 23, 2007
Relative newcomer to Flash, and I have (what should be) a simple question: how does one go about making the CS3 checkbox component larger? I'm not talking about the bounding box (checkbox + label); I'm talking about the checkbox itself. I've looked all over the place, and I'm stunned that this doesn't appear to be as easy as I thought.
View 1 Replies
Nov 20, 2008
i have done a project, in which, i have loaded set of check boxes in to a empty movie clip and i load that movie clip in to Scroll Pane component. all are working fine, but while scrolling, in the bottom of the scroll pane i got so much of extra empty space. How can i corrrect this.
View 5 Replies
Mar 22, 2011
I have a component with checkboxes, the checkboxes are bound to booleans in the main code:
<mx:CheckBox id="LyrClearAll" selected="{Application.application.bLyrClearAll}"/>
This works fine for the checkboxes that dont change unless a user interacts with them again. My problem appears because I want to uncheck one of the boxes everytime the component is closed. (I know something other than a checkbox would work better, but Im trying to keep things consistent in this component.)
I have tried setting the bound Boolean variable to false, and Ive tried setting the checkbox.selected value to false. Neither are working, everytime I open the component the checkbox is still checked.
private function makeLyrsPopUp(evt:MouseEvent):void
{
var panelLyr:popUpLayers = PopUpManager.createPopUp(this, popUpLayers, false) as popUpLayers;
[Code].....
View 2 Replies
Mar 15, 2009
i am have a donation page for my non-profit..i want the user to be able to click on certain box with a specific denominations, ie. $10, $50, etc...i also want have a input text box where the user could put whatever denomination they would prefer...then they would submit and the php file would send the info to my email address and then flash or whatever would direct them to the paypal site and all the info would be set and ready for them to make the donation...
View 3 Replies
May 20, 2007
I'm trying to call a movieclip dependent on which checkboxes are selected. The user selects checkboxes and the presses a button to call the movie. How do I set the function for the button to check the values (true or false) of the checkboxes to decide which movie it is to play. Each different combination of checkbox selections calls a different movie. I need guidance on how to do this. Do I need to do something specific with the checkboxes? As of now I have something like this..
function dressUp ():Void {
if (head1=true && top1=true && bottom1=true) {
outfit_MC.gotoAndPlay (1);
[Code].....
View 1 Replies
Mar 10, 2009
I'm trying to make selectable thumbnail images for a touch screen app where the user can touch the thumbnail image and turn a CheckBox on or off to select/deselect it.
The thumbnail images measure 100x100 pixels, and I want the CheckBox to be in the upper right hand corner of each image. When I go to the Adobe AS3 help site, it says that it should be possible to increase the size of the CheckBox hit area in one of two ways:
1) Select the component on the Stage and use the Free Transform Tool or any of the Modify > Transform commands.
2) Use the setSize() method or applicable properties of the CheckBox class.
According to this same site, if you increase the size of the instance, you also increase the size of the hit area.
I've tried both of these, and none expand the hit area over the entire thumbnail. In fact, neither seems to increase the size of the hit area at all. In order to select a particular thumbnail, the user still has to hit the CheckBox.
View 1 Replies
Dec 29, 2009
I 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 Replies
Mar 11, 2004
how I can get a variable assigned to a checkbox component in Flash and into a database through ASP/VBScript?
View 2 Replies
Nov 1, 2006
i'm having a bit of trouble having my button doing the following function...i'm trying to have it so that when the check box component is deselcted when clicking on the enter button it will show the my MC. else my MC will be hiden
View 2 Replies
Jun 17, 2009
how do i toggle on/off a checkbox component with ENTER instead of the default SPACEBAR? so ENTER key is the key to toggle..
View 2 Replies
Apr 3, 2007
I can't seem to get the proper script to get a checkbox working for a form
View 2 Replies
Jan 21, 2010
I want to use the checkbox component in my flash app, but it's really tiny. According to this article 1, the size and scale parameters only affect the invisible bounding box. Does anyone know of a quick solution on how to scale up (enlarge) the visual area of the checkbox component in flash CS3?
View 2 Replies
Jul 18, 2007
My checkboxes aren't showing any more than 16 characters and I don't know how to make them wider because I'm attaching them in a loop like this:
[Code]...
View 1 Replies
Sep 12, 2011
I'm working on a mini-site and there is this opening page with some text bla bla and I need to give the viewer the 'don't show this again' option. I've discovered the components in Flash (yoo-hoo) and so far I've dragged a checkbox to the stage and only been able to change its label in the parameters in components inspector.
The opening page is in scene 1 and I just need the movie to play scene 2 frame 1 if the checkbox is clicked. How do I go about this? I'm very confused with event listeners etc. Could anyone give me a "for dummies" walk through?
View 2 Replies
Feb 22, 2009
i have menu on main time line with "menu_mc) it is animation tween so:
- frame one there is stop()
- when over, it plays untill frame 30, so the user can click the sub buttons
- when out, it plays and stop at frame 1
these errors are: 1- the following error appears when i load another swf ReferenceError: Error #1065: Variable event is not defined. at ELI_fla::MainTimeline/loadSection() at section1_fla::MainTimeline/frame147()
2- The following error appears when i click any where after the next swf loaded TypeError: Error #1009: Cannot access a property or method of a null object reference.
[Code]...
View 4 Replies
Jan 9, 2010
I have the values load from a file, however the problem i am having is that it isnt selecting the values loaded from the file when i check on the settings. am i using the correct as2 code for it? i even tried using setValue, that is listed in the flash livedocs.
[Code]...
View 2 Replies
Jun 2, 2010
I have a Flex repeater that has a complex item template. When a checkbox is clicked, I need to toggle the visibility of a sibling button contained in the same repeater template. Since I can't add binding expressions to event handlers, I can't pass in the repeater item's index.
How can I access sibling components inside a repeater item?
View 1 Replies
Jul 1, 2009
i created dynamically checkbox on data grid how do i find out Which checkbox select/unselect and which checkbox contact is select/unselect ? Because we cant set dynamic id for each checkbox
<mx:DataGrid x="7" y="3" width="347" height="337" dataProvider="{#####}" variableRowHeight="true">
<mx:columns>
[Code]....
View 1 Replies
Jul 27, 2010
I have an MXML component that includes a .as file with
<fx:Script source="myfile.as" />
Running asdoc throws a whole bunch of errors like
"Error: The private attribute may be used only on class property definitions."
"Error: The public attribute can only be used inside a package."
Solution 1 is to move the AS code into the MXML file. Kind of defeats the objective of using external .as files for MXML components in the first place, so really a last resort option. Code inside a mxml file is messy (I really don't want logic mixed in with mxml), and would also require using the < !--- ---> asdoc syntax.
Solution 2 is to have the MXML component inherit from a normal class file. That would mean no private members in the base class, only internal (meaning a separate package for the component to be safe) or protected. This would make things tedious to say the least.
Are there any other work-arounds or possibly a beta/nightly version of asdoc that fixes the problem? I am using the Flex 4.1.0.16076 SDK, the "latest production quality release".
Update:Just tried using asdoc from the svn trunk, (4.5.0 rev. 16942) and the problem persists.
View 1 Replies
Dec 7, 2005
I've found out that when publishing with Flash 8 my previous MX's working fla files, I get multiple errors.I've had a look at the Export publishing settings and I think they're all correct: - Exporting version: 8- AS Version: 1.0So, I guess it must be a silly thing I'm doing wrong but after a long while I haven't been able to know what's wrong. Perhaps AS compatibility is not that accurate?The most common error I get is:"A ')' or ',' was expected" or"An unexpected '}' was found"(I'm using Spanish Flash 8, so I don't know if this is the exact message you're given in English Flash 8) The 'supposed to be wrong' code seems to be in lines like[AS].posicion = posicion+eval("abc" add i)+gap;abc=eval("_parent._parent.abc" add _parent.n)[/AS]and I even get a "Declaration must be inside a on/onClipEvent controller" here:[AS]._xscale=abc*1.4;[/AS] ...while ALL of this code worked perfectly in Flash MX, I get up to 104 errors in Flash 8
View 7 Replies
Nov 19, 2009
I have this streaming video player with an asyncErrorHandler function which isn't working correctly.In Flash player 10 I get no errors, but in Flash player 9 I'll get a popup window with the error message that shows up in my output window when I test on my local machine.
Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095: flash.net.NetConnection was unable to invoke callback onBWDone. error=ReferenceError: Error #1069: Property onBWDone not found on src.display.VideoClass and there is no default value.
I feel that I have my AsyncErrorEvent setup correctly however, but am unsure as to why I still get a massive error in my output window, here is the popup window and code below:My statusEventHandler function
// ☼ --- Handle Status and Errors
function statusEventHandler(event:NetStatusEvent):void {
trace("connected is: "+ncConnection.connected);
trace("event.info.level: "+event.info.level);
[code]...
View 1 Replies
May 4, 2009
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 Replies
Mar 19, 2012
I 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 Replies
Jan 1, 2010
Copy/Pasting working movieclips to link causing errors (source included)?
View 0 Replies
Jan 4, 2011
I have a checkbox in a component:
<s:CheckBox id="myCB_1" />
In my main.mxml I need to test for the state of the checkbox. I originally had all my code in main.mxml, but it was getting really long, and I thought that it was better practice to break my code into components. Also, I have other projects where the same concept will apply.I have the following function :
private function checkAlarms(currentTime:Date):void
{
if (!breakfastAlarmSounded)[code]....
doesn't work. Someone mentioned that I need to create a variable in my component that refers to the id (myCB_1) of checkbox, but I don't really understand or know how to do that, and they didn't elaborate.How do I test for the status of the CheckBox "myCB_1" in the component from within my main.mxml?
View 4 Replies
May 30, 2009
I'm trying to make a flash animation but I'm getting these two errors: 1119: Access of possibly undefined property enabled through a reference with static type Class. (line 4) 1061: Call to a possibly undefined method addEventListener through a reference with static type Class. (line 5) This is the code I'm using:
Code: Select allimport flash.display.*;
import flash.events.*;
stop();
buti.enabled;
buti.addEventListener(MouseEvent.CLICK,pla);
function pla(e:MouseEvent):void {
gotoAndPlay(2);
}
My animation is a initial photo that turns around and becomes a black backgroud (were I'll add some text), now what I want is that the photo won't animate until I do a click in it. I used a Layer with a transparent image and converted it to a button and the export name is buti. The other to layers were converted to movie clips named preto and foto.
View 10 Replies
Dec 28, 2010
Having a problem getting a list component to display. Wondering can you edit the below to show me how to get it to work
Code:
package
{
import flash.display.MovieClip;[code].....
Error is : TypeError: Error #1009: Cannot access a property or method of a null object reference.
at fl.containers::BaseScrollPane/drawBackground()
at fl.controls::List/draw()
at fl.core::UIComponent/callLaterDispatcher()
View 5 Replies