ActionScript 2.0 :: Adding Variable Name To Tick Boxes?
Oct 3, 2002How do I add a variable name to the tick boxes within the flash MX components?
View 9 RepliesHow do I add a variable name to the tick boxes within the flash MX components?
View 9 RepliesI'm stumped on this problem and can't seem to figure it out. Any suggestions would be welcomed. Basically I'm building a large calculator that adds over 100 input boxes. I've got it working except for the fact that if a user misses inputing a number into one of the input boxes it does not work anymore. I've tired lots of things to no avail. I just want to add the input boxes and skip those where the user did not enter any information (does not apply to them)
Here is my code.
on (press){
ReceptionTotal = Number(LocationFee) + Number(Caterer) + Number(ToastingGlasses) + Number(SecurityFee) + Number(BarPackage) + Number(WeddingCake) + Number(FoodHors) + Number(Baker) + Number(BartentingFee) + Number(CakeKnife) + Number(Servers) + Number(Flatware) + Number(Dinnerwear) + Number(Flatware) + Number(TableLinens) + Number(ChairsCovers) + Number(Glasswear) + Number(Tent) + Number(Napkins) + Number(Childcare) + Number(DanceFloor) + Number(ServingStaff) + Number(Lanterns) + Number(Heaters) + Number(Restrooms);
}
each input box has a variable name assigned to it as indicated above. I've tired setting the variables to 0, tried if statements don't know how to skip one of the above variables when no number is entered.
How do i add objects (such as a Text Box) to appear above the mouse. I am currently hiding the mouse and using an alternate object on top of the mouse but i still need a Text Box to appear above the mouse object and remain in one spot
View 2 RepliesI have 3 dynamic text boxes on the main movies stage that are getting their values from an externally loaded swf. If statements within the external movie loads the values from an xml file depending on which action is selected by the user. Now I have a fourth text box that needs to gather all the values that are loaded in the other 3 and add them together...placing zero if nothing is loaded. I have done various code tests...I get either NAN or _level0.total ...total is the instance name of one of the boxes, I am trying to access.
View 2 RepliesBasically I want to make the background of the Dynamic Text box have a color. How do I do this using AS3?
View 3 RepliesI'm pulling data from a database and loading it into a dynamic text field with a scroll bar component. I wanted to know if there is a way to hide the scroll bar UNTIL the text gets long enough to scroll.
View 3 RepliesI currently have a movie where I have an icon (image) and a block of text as a clickable button (locked together) the button takes you to a specific urlActionScript
Code:
on(release){
geturl("[URL]");
}
What I need to do is replace the geturl with some script that will add an alert box with 2 options. I would like the box to have a title something like "Where would you like to go from here?" then two text links "Members Excel" (which will take them to members-excel-forum) and "Newsgroup Excel" (which will take them to newsgroup-excel-forum), like I said I have many more to add but once I have the code and a "How to" I should be able to adapt it.I will have to do this for each of the items (I'll have to unlock them first) there are 24 items in my movie (it looks like 12 as there is an icon and text locked together for each category) so I need to do this for 16 of them, I say Alert box as this won't be bothered by a pop up blocker. The Code [URL]
I have to dynamic text boxes; one is for articles and the other is supposed to bu for navigation of the articles. I have a variable set up for the article dynamic text box and I want the navigation part to be filled in via text file. so I need to find a way for the information that's fed in to the navigation part to functions as buttons and when they are clicked a variable should pass though flash telling is what story to display. for instance if you click stereohype then storyvar == stereohype. see what I mean? I could do it all in flash but i'm trying to make it where I don't have to touch the flash file after it's completed and everything can just be manipulated via text files with html php xml you name it, what ever works.
View 1 RepliesI have a loop that cycles through all children of an extremely small XML file, and I need to set the label and the link for each box. I started with a fixed number of dynamic text boxes, and loaded them because I knew the count, but I'd rather loop through them as I read the XML. Here is how it is now:
for (var aNode:XMLNode = rootNode.firstChild; aNode != null; aNode = aNode.nextSibling) {
trace(aNode);
trace(aNode.attributes.text);
[code]......
I have flash create an empty movieclip, screen_1, then attach 4 different colored movieclips to the empty one: box_1, box_2, box_3, box_4.Now I am trying to change the position of one of the boxes with the number of the box as a stored variable. So say:
boxNum = 1
this["screen_1.box_" + boxNum]._x = this["screen_1.box_" + boxNum]._x +1600
I can get this to work on the main movie clip.. but not on the movieclips inside of it.
i want to change checkbox's tick box size?,
i try this
var myTf:TextFormat = new TextFormat();
myCb.setSize(150, 22);
myTf.size = 16;
myTf.color = 0xFF0000;
myCb.setStyle("textFormat", myTf);it change checkbox font size and object size, but tick box remain the same, what should i do?
Does anyone know how to "highlight" (or otherwise style) individual tick marks on the slider control?
I'm going to need to be able to dynamically create a slider where certain tick marks "stand out"; making them taller or darker or a different color would do.
I'm making a program that draws a grid of boxes and the color of the box must be different to those adjacent to the box. My code compares the current box's color to those to the left and top. If any of them matches, it picks another random number (as the color). For the tiles on the first row/column, I make my grid's array indexes with negative numbers -1 so that it will not match.
What I have:
private function fillArray():void {
grid = new Array();
grid[-1] = new Array(-1,-1,-1,-1,-1); //paddles the grid[-1][0 to 4] with -1
for (var i = 0; i < HEIGHT; i++) {
[code]...
it was possible to control the number of tick marks the Flex DateTimeAxis displays along its axis? Currently, the datetimeaxis controls how many tick marks to display on its axis whenever I change the date range on my chart. Ideally, I would just like there to be only and always 7 tick marks no matter how many datapoints are on the chart. I went into the DateTimeAxis class and noticed that there is a public function called transformCache(), which actually handles rendering the tick marks on the axis but I am not sure what class calls this method.
View 1 RepliesI am doing an interactive map which I will like to change to another map scene when the clock in your computer will tick in a particulaty time, like, 1 o 2 o'clock. I also created a clock which is in the map as reference of the real time in your computer. This is the address where I uploaded the draft of these projetc.[URL]
View 0 Replieswhy the data points on the LineChart don't line up with the corresponding tick mark / horizontal axis label? See adobe's example (at the bottom of the page):[URL]See how the data for 7/28/05 is to the right of the 7/28/05 tick mark / label?
View 1 RepliesI have the following code: Can the following code:
globals.data.goal = globals.data.player1/5 be converted to something like: globals.data.goal = globals.data.player(globals.data.clk)/5
[code].....
can't figure out why the dynamic text boxes in my dynamic clip arent picking up the variable when I loop through this recordset!the trace (you'll see here right after I try two ways to assign the variable) traces the correct info back..
[code]...
I have a variable i that I'm setting to 5. i = 5. Simple enough, I have a dynamic box on the screen so I know that's working.
On the same screen, I have a button, that when you click it, it should do the function i = i + 1. I know this isn't working because when I click it, the number on the screen doesn't change.
Also I have a second button that is a collection of if/else if statements. Basically, if i=1, goto 10, else if i<1, goto 40, else if i>1, goto 40. I know that since I'm setting the initial value of i to 5, it's impossible for i to be equal to 1. Yet every time I click this button, I goto 10 even though i doesn't equal to 1.
Im having trouble with this and its going wrong. I need to use actionscript 2 and im on flash cs3.
View 3 RepliesIs it possible to add a tick symbol as in "correct" to a textField via as3?
View 1 RepliesIve made a movie but i want to get someone to add a picture of themself in an swf (either through a browse button OR simple paste into a variable box) and it appear later in this electronic card im trying to make.
*edit* . . i dont what this to be done in the flash file, on the opening screen i want the user to locate a pic on their hard drive and then slave this picture througout the swf movie ive already created all the tuts im looking at seem to have the images already in the library and they are clicking buttons to display them, i DONT want this . .
im using PHP with MySQL to send information to my flash file using GETs.Using FlashVars i have managed to get the users 'id' with this i can send my questions/searches to a PHP script which access the database and returns the information to the html page.What i would like to do now is add the information sent back to the html page to a variable inside flash for example:
var usr_name = get_user_name(id) || 'Unknown'; // "Unknown" should just be for offline use.
but this just returns 'Unknown' this is the function used:
public function get_user_name(usr_id){
loadData('search.php',"quest=name",'usr_id='+usr_id);
}[code]......
If i just type the URL into a web browser i get the name outputed.
Using AS 3.0 I have declared a variable on the main timeline
var thescore:int=0;
From within a movieclip I now want to increase the value of that variable and display it in a text box.
var thescore:int=thescore+10;
Object(root).myscore.text=thescore.toString();
The above code only displays ten and doesn't increase when the movieclip loops.
If I change the code to
thescore=thescore+10;
Object(root).myscore.text=thescore.toString();
I receive an error undefined property.
Basically, I have an input box on a widget that sends information via PHP.
One of the input boxes is phone number. Everyone inputs number as normal, but without the country code.
Is there a way of me taking their normal number from the input box, removing the '0' and adding the country code before sending it (i.e. within a calculation/function/formula).
I'm trying to apply a tween fade in effect to 3 objects, it's hard to explain but here's what i have
function goDown2(e:MouseEvent):void {
var tweenfadeIn:Tween = new Tween(graphic_btn, "alpha", None.easeOut, 0, 1, .1, true);
[Code]....
I wanna apply this tween to illustration_btn, and resume_btn
Is there a way to add an event listener to a variable?
View 4 RepliesI have the following working line:
moveMC.y = twn.bounceBall01.y
It successfully gets the y value of bounceBall within the MC twn, and applies it to the y value of moveMC. How do I replace the 01 in bounceBall with the following global variable: globals.data.clk? I've tried using a way that Ned successfully showed me for a different situation, plus tried some other permutations, but Flash says "no way dude".
The Code bellow is a simplified version of what I am trying to do. My actual code involves copying an item from one array to another (which I am able to do). Then displaying the contents of both arrays on the stage.
//blueCircle is a library object with proper linkage set up.
var ball = new blueCircle();
ball.x=100;[code]....
When I run this code only 1 ball appears on the stage at (200,200).Is there another way to assign one value to another so that it will be duplicated rather then just adding a pointer to the original variable? if not is there a way to copy the instance of ball and add it to them memory location of another ball?I know that I could call:
var anotherBall= new blueCircle();
but this won't work for the application I am writing because the contents of the array I am trying to copy from are all different types of objects.
So basically I've got a MovieClip called Jug and when the egg is clicked and dragged to the Jug I want it to disappear and then re-add itself in the place it first started. Aswell as this I want a variable to be added by 1 in value. I have tried fiddling around with this for a while now and I can't figure it out since when I remove child it gets errors. Here's the code:
[Code]....