ActionScript 2.0 :: Adding '$' Prefixes And Subfixes Of .00 While Not Affecting Dynamic Variable
May 22, 2009
I can add them to the set variables in a literal string such as [code]but that affects the variable when I want to call it into a dynamic and gives me a NaN.is there way to add and subtract these strings to it will not affect the actual input when I need to call it to add it another number variable?
View 5 Replies
Similar Posts:
Oct 20, 2009
I have a dynamic text box displaying a variable, and I want to add a label of "ft" (without the quotes, obviously). How do I go about doing it?
View 1 Replies
Mar 21, 2010
I 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].....
View 3 Replies
Aug 22, 2005
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]...
View 1 Replies
May 29, 2009
I'm trying to make something that will show up in a dynac text field something like this:"[variable1] text text text [varibale2] text text text"I've linked the dynamic text field to a variable "resu" and set it to:var resu = variable1 + "text text text text" + variable2 + "text text text"The only problem is that when I make the variables random, they don't change
View 1 Replies
Feb 19, 2010
I have a movie clip and in that movie clip there is a dynamic text box. I want that text box to display a dynamic variable name something like:
Quote:
_root.var_[this._name]
so the variable will be _root._var plus what ever the instance name of the movie clip it's in is, how can i do this?
View 1 Replies
May 31, 2002
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.
View 3 Replies
Jun 23, 2010
Ive 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 . .
View 8 Replies
Apr 15, 2012
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.
View 2 Replies
Dec 24, 2010
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.
View 1 Replies
Feb 18, 2009
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).
View 1 Replies
Dec 6, 2009
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
View 3 Replies
Feb 10, 2010
Is there a way to add an event listener to a variable?
View 4 Replies
Mar 31, 2010
I 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".
View 1 Replies
Dec 19, 2011
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.
View 4 Replies
Mar 15, 2012
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]....
View 2 Replies
Oct 22, 2009
All I want to do is have a textInput Field on my stage called 'countdown' to display the value of a variable.
I want a variable I have in the document class called 'minute' to basically display its value in the text field on my stage.
This is what I have in my document class, obviously the text part is wrong can anyone point me in the right direction?
var minute:int = new int (60);
this.countdown.text = "";
I also have a textInput box on my stage with an instance name of countdown.
View 1 Replies
Oct 3, 2002
How do I add a variable name to the tick boxes within the flash MX components?
View 9 Replies
Feb 19, 2005
I've been trying to add quotation marks to a variable for the past hour or so, but I haven't been having much luck. Basically, here is what I am hoping to create:
Code:
blarg = W71;
temp = magic code that I can't figure out
trace(temp); // displays "W71"
I stumbled on a previous case of this [URL], but that method didn't work for variables when I tried it. Adding a + symbol before and after blarg gave me an error.simple way to incorporate quotation marks around my variable?
View 6 Replies
May 8, 2011
I can't figure out what the syntax is for this in Actionscript. Basically, I have a variable I want to add into a string that will call a certain frame based on user's language selection.
[Code]...
View 5 Replies
Jan 11, 2009
I working on a flashbanner. It is a dynamic textfield called "regnr" where the user is supposed to add a registration number (of their car) before clicking the send button. This code is on the button:
Code:
on(release){
//getURL("[URL]"+regnr.text);
getURL(_root.clickTag+regnr.text,"_blank");
}}
It works when the domain is hardcoded but doesn't work when I am using the clickTag. Is it possible to add variables like this to a clickTag? How could this be done to actually work?
View 4 Replies
Feb 11, 2003
how to get a button in one flash file to affect what happens to another fla? Cause Im trying to get an swf that has been opened by another swf through the loadMovie function (which I�ll call swf a) to open another swf inside swf a.
View 3 Replies
May 8, 2009
On my stage I have 5 items labeled item1_mc, item2_mc, item3_mc and so forth...they all have two keyframes on their respective timelines, one labeled "active" and the other "inactive". My code contains 2 arrays, inactiveArray and activeArray and a variable known as energy that regularly goes to and from 0 - 100.What I am looking to achieve is basically the function of...if energy >= "insert given items 'active threshold' 20, 40, 60, etc..." then add it to the activeArray, if it is not, remove it and add it to the inactive array.
all objects in activeArray gotoAndStop("active");
all objects in inactiveArray gotoAndStop("inactive");
I have tried many different ways of achieving this effect but I always end up with duplicates and extras or something doesn't move when it's supposed to, where it's supposed to, it just ends up into a giant cluttered mess and I start from scratch.
View 2 Replies
Mar 23, 2012
The portal in my game is suppose to be unlocked after you collect all the coins. The portal is locked but when I go over a coin it neither adds to the variable or removes the movie clip by instance name of coin1 coin2 and coin 3.also if the remove movie clip doesnt need _root I've already tried it without it I know that is not the problem.
var openportal = 0;
function moveStuff() {
//-Very long code that is working. [code]..........
View 1 Replies
Jun 13, 2006
all I want to do is add a variable to a getURL line of code.EG:getURL("/index.asp", "_self");I need to add a variable (_root.myvariable) to the end of the link so that it goes to:index.asp?myvar=thevalueofmyvariable
View 3 Replies
Feb 10, 2008
I have a client who wants to add something to a flash presentation that is almost done. There is a root swf that is pulling in a nav screen swf, which in turn is pulling in the text screen swf of that corresponding nav swf. So at the start, the root swf automatically loads nav1.swf, and nav1.swf automatically loads text1.swf. Once that plays, the next button loads nav2.swf into the root swf, and in turn, nav2.swf automatically loads text2.swf onto it. I hope that makes sense. So all the text is going to be on the screen with pix, etc, and we are going to have a VO speak the text. The VO will be on the text swf files since there is fading of pix, text, etc and we need it to match. With it almost done, the client wants a mute button added to the thing.
The question is, if the mute button is on every text swf file, is there some variable that I can pass that would keep the next text swf file from playing it's VO? The client doesn't want people to have to keep clicking the mute button with every page. I know, I know, if I knew they wanted a mute button, I never would have built it this way. It's going on the web, and I figured for loading purposes, this was the best way. Now I think Im screwed... Or rather, they are. They approved this. But can it be done? Can I pass a variable from either the root swf or the navs swf files that tells the incoming text swf files to stay muted?
View 5 Replies
May 8, 2009
So a small example of my situation...On my stage I have 5 items labeled item1_mc, item2_mc, item3_mc and so forth...they all have two keyframes on their respective timelines, one labeled "active" and the other "inactive". My code contains 2 arrays, inactiveArray and activeArray and a variable known as energy that regularly goes to and from 0 - 100.
What I am looking to achieve is basically the function of...
if energy >= "insert given items 'active threshold' 20, 40, 60, etc..." then add it to the activeArray, if it is not, remove it and add it to the inactive array.
all objects in activeArray gotoAndStop("active");
all objects in inactiveArray gotoAndStop("inactive");
I have tried many different ways of achieving this effect but I always end up with duplicates and extras or something doesn't move when it's supposed to, where it's supposed to, it just ends up into a giant cluttered mess and I start from scratch.
View 8 Replies
Dec 23, 2010
Actionscript Code:
// button pressesupKey = 38;downKey = 40;leftKey = 37;rightKey = 39;focusKey = 65;attack1Key = 83;attack2Key = 68;bombKey = 81;autoAttack1Key = 87;autoAttack2Key
[Code].....
Rather than affecting one variable, one key press makes all the others true as well
View 2 Replies
Feb 24, 2011
I using Flash CS5 for the first time, and I'm hitting a snag. I have an input box on Scene 1 for age (variable called old). On scene 3, I have a dynamic test box (variable called display), where I want to display the age (old) + 10.
My Code looks like this:
PHP Code:
var Real_age = Number(old) + 10;
display = Real_age;
It's returning NaN.
A trace of the output of Real_age gives:
PHP Code:
<TEXTFORMAT LEADING="2"><P ALIGN="LEFT">
<FONT FACE="Times New Roman" SIZE="12" COLOR="#009900" LETTERSPACING="0" KERNING="0">2</FONT></P></TEXTFORMAT>
<p align="left"></p>
<p align="left"></p>
NaN
<p align="left"></p>
<p align="left"></p>
The code works OK in Flash 8, but I figure I must have some some setting that is spitting out the unwanted HTML.
View 5 Replies
Jul 16, 2009
In my as3 project I have to add buttons dynamically. In the for loop .. for every iteration I want to add a button in the movie clip with a mouse click event.I have tried to do this But the button is not displayed in the movie clip.Here is the code inside for loop for dynamic button.
Code:
// Create the button
var uploadButton:SimpleButton = new SimpleButton();
uploadButton.name = "btnUpload"+objectSequence;
[code]....
View 1 Replies