ActionScript 2.0 :: Make A Stat And Decrease / Increase It In Flash Mx 2004?
Jul 9, 2004How do I make a stat and decrease/increase it in flash mx 2004?
View 2 RepliesHow do I make a stat and decrease/increase it in flash mx 2004?
View 2 RepliesHow do I make a stat and decrease/increase it in flash mx 2004?
View 2 RepliesI have a movieclip slider_mc that can be dragged across the screen. There are also lots of small movieclips on the stage that I would like to increase and decrease their size depending on how close the draggable movieclip is to them
View 1 RepliesI want to use two buttons, one for increase and the other for decrease, to change the numeric value of a variable. I will use this variable to call a line width in some lineStyle code that I have. Basically, the user will be able to use the buttons to change the width of the line they are drawing in real time. I have attached the fla with the beginnings of this section.
How do I get the buttons to affect my variable?
I have a Dynamic Text area called txt, I write the value 5000 by txt.text="5000"; In my scene there will be 2 buttons. When one of the buttons is pushed the value will decrease 250 by 250. For example; at first push it will decrease to 4750, at the second push it will decrease to 4500 and so on...And when it is pushed to the other button this value will increase 250 by 250.For example; the value will be:4500 by pushing twice to the decreasing button, then it'll be:4750 by pushing once to the increasing button.I tried with the below codes but it didn't work. The value decreases only once, it doesn't keep on decreasing when I pushed twice to the decreasing button.The value seems as 5000250.
[Code]...
I have 2 buttons and a dynamic text field. I want one button to increase the bet by �10 and the other to decrease it by �10. The amount should change in the textfield.This I have done. But how do i set a minimum bet of �100 and a maximum of �500 so that it wont carry on decreasing once it reached �100 and so on and so forth....?
View 14 RepliesI have a Dynamic Text area called txt, I write the value 5000 by txt.text="5000";
In my scene there will be 2 buttons. When one of the buttons is pushed the value will decrease 250 by 250. For example; at first push it will decrease to 4750, at the second push it will decrease to 4500 and so on...And when it is pushed to the other button this value will increase 250 by 250. For example; the value will be:4500 by pushing twice to the decreasing button, then it'll be:4750 by pushing once to the increasing button. I tried with the below codes but it didn't work. The value decreases only once, it doesn't keep on decreasing when I pushed twice to the decreasing button.The value seems as 5000250.
txt1 = txt.text;
Decrease.onRelease = function() {
txt.text = txt1 - "250";
};
Increase.onRelease = function() {
txt.text = txt1 + "250";
};
And there is one thing too I wanna make if it is possible; I want to place the decreased value of txt dynamic text to valuetxt dynamic text. For example; when the value is done as 4500 by pushing twice to the decraesing button, the valuetxt area will be 500. When the increasing button is pushed once, txt value will be 4750 and valuetxt area will be 250.
I need to dynamically increase and decrease the alpha value in a "for loop" like shown belowfor example if the 'for loop' is for 5 times and the alpha i need to change is "x" then
loop 1 --> x = 0.3;
loop 2 --> x = 0.5;
loop 3 --> x = 1.0;
[code]......
1. The are two buttons
2. If you click the first one a number is increaded by 1
3. If you click the second one the same number gets decreased by 1
4. For each there is an IF statement which starts a certain action
I can't figure out how to make this work. The following script returns only one number and thus starts only on action:
function ClipSelector(i:Number):Number {
i++;
return i;
[Code].....
So, I have a movie clip which consists of a filled vector circle with a stroke. Is it possible to increase/decrease the stroke to a specific thickness in pixels with actionscript whilst the swf is playing?
View 5 RepliesI need to implement a functionality where a user adds some text into a text field. Next if a user clicks on a button, then the font size increase/decrease so as to accomodate entire text in the available area. That means if a user has added just hello world in 12 px font and text field size is say 400*200 and user clicks on the button, the font size increases such that the text is occupied in the complete text field. Similarly if lot of content is added at a font size of 16 or so then clicking on the button reduces the font size to make it fit into the available text field area.
View 1 RepliesI am new to Flash & ActionScript 3.0 platform.My issue is: I am loading an image onto the stage dynamically using Loader & URLRequest classes. Whenever I click on existing circle[which gets created when I click on the loaded image, which is of Sprite type], the size of the circle should be increased to some extent(let us assume, basically circle(Sprite)is created with radius=3 when we click on the image, but, when we click on the created circle, it's radius must be increased to 5). It is the requirement.
So, for this to implement, Do we have any property or method to change the Sprite object's size directly?
[Code]...
I'm using AS3 in timeline. I'm working on a multiplication game. The idea is to count the number of correct and incorrect answers and give the user a final count. I have several dynamic text boxes: box1 and box2 will multiply each other.box3 = input box; user inputs answerbox4 = message displaysbox5 = correct1; displays correct countbox6 = correct2; displays incorrect count buttonsbt_1 = checks answersbt_2 = resets problems PROBLEM:I CAN'T GET BOX6 COUNT THE INCORRECT ANSWERS. HOW CAN I FIX THIS PROBLEM?
[Code]...
I am wondering if anyone has experience this problem before:
[Code]...
I was experiencing some other "strange" behavior so I'm wondering if my code is getting too long. Maybe I'm running into some kind of limit. Has this happened to anyone else? Anyone know of some fixes? The loop is in a _global function, could that be causing a problem? other than that, the code is on line 4420 of the actionscript coding interface.
I'm trying to get an object to increase in size the lower it goes down the stage, and decrease in size the high it moves up the stage.
It only needs to increase or decrease by a small amount. Basically, it's for a game character. To ad realism to his movements, it would be nice to have this feature.
This is where i'm up to so far:
Code:
import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import fl.transitions.easing.*;
[code]....
I think I need something like:
if (object moves up)
decrease
else if (object moves down)
increase
How to make (safe) administration with php and flash mx 2004? don't work MySQL on server!!! But is it safe to make administration with flash? Maybe someone know good sample fla?
View 1 Replieshow can i make my work space area bigger in flash MX 2004?
View 2 Repliesthere just havig a stupid problem where the health on my game increases on my game instead of decreases when the player is hit. here is the source codeHUD.as (Scoreboard)
Code:
private var stageRef:Stage;
public var s_score:Number = 0;
[code].....
I'm using the following code to spin a couple stars on the stage when the mouse rolls over them. Can't figure out how to make the stars slowly decrease in speed after the user rolls off though.
[Code]...
Is there a way to increase traffic for flash web site. Is there an action script to make your flash website "visible" for others. I heard that if I build a flash web site it will be difficult to get customers due to the fact that flash pages usually don't show up in the data bases. Is it right?
so anyhow is there a way to increase traffic or make my flash site "visible' in search engines. do you think building a splash page in html and then redirect them to flash is a good idea?
I am making a flash game for a school project, and I decided to make a stick fighting game.once the enemy attacks the player their health just drains. The only way I can fix it is if I have a decimal instead of a whole number, but I have the variable of the health in a text box to display the players current health and it doesn't look to good with a decimal number.So, I am wondering if there is a way to make the health decrease by a decimal, but show a whole number in the textbox.[code]
View 2 RepliesIf the counter reaches 350 and I move my mouse down now it hops on over to 250. I just want it to start counting down. I.e. 349, 348, 347 and so on. What do I need to change?
//Function
function countUp(e:TimerEvent):void{
if (mouseY < 180)
{
[code]...
EDIT: What do I need to write in AS3 to make a dynamic text field increase in increments of 1 if the user hovers at the upper half of the screen, and decrease in increments of 1 if the user hovers at the lower half of the screen?Purpose, it isn't a game.
What I have right now isn't actually doing any of those things, I've just been mucking about trying to get all the masks working and they finally are.
I've included the code to offer as much information as possible about my specific project. There is also a few more lines that changes the colour of the dial when the user rolls over the specific coloured bars. I can post that as well if it helps.
To clarify the scene, the arrow part of the dial tracks the user's mouse. Always pointing towards it. The bars, when rolled over changes the colour of said dial. The "73M" is static, as well is "POINTS" but the 380 value is dynamic. It is that string I need to affect.
If anything is unclear please feel free to ask, I've been at this all night so there is a chance I'm so into it that I can't see straight.
[code]
I want to make a preloader for flash mx 2004 that when it finish becomes to decrement another time. I would like to do it to modify the flash preloader component.
View 2 RepliesI am working on a project that involves basic buttons in flash. They have 2 functions. One is to go to a url and the other is to execute a movie clip within the flash movie.
I dont want my developers to open flash to code the page links (i.e. contact.html). Is there a way to just add a variable of some kind in the GetURL() and have it pull from an .xml file? It can be very basic. There will be no need to dynamically add more buttons, just simply change link names on the fly.
How can I increase the _height property of a window without increase the height of the title and the bar at the top of the window ?
I want only to increase the part of the window where I put textFields and buttons.
Does anyone know how I can achieve the following effect: As I rollOver one object, everything on the stage except that object fades out slightly (i.e. change in alpha).
View 1 Repliesi have a drop down menu am working on and each button tab (although they are not button instances !) when clicked opens up the "drop down" section which you can mouse over to choose another specific button etc - if you mouse out of that drop down area then it pulls back up to the original tab state .. what do i change to the code below to decrease the area that you mouse out of to make the drop down area pull back .....at the moment it at least two inches on the screen below and to the right of boundaries of the drop down box before it pulls up - i want to it pull up as the mouse leaves the boundary box .... hope this makes sense .... there is some part of the actionscipt below that controls this but can work out which bit and how to change it !!! (am guessing the x mouse and y mouse bits - but how to change it ???)
[Code]...
How to decrease the size of a button?
I have a button in which it contains an image.But my problem here is i am unable to decrease the width of the button along with image.
How can we decrease the size of that kind of button.
If possible provide me some sample code.
Below is my sample code:
<mx:Button id="line" toggle="true" paddingLeft="1" paddingRight="1" icon="@Embed(source='Images/line.png')" toolTip="Line" useHandCursor="true" buttonMode="true" click="doDrawEnable()" ></mx:Button>
I know there are performance loses if you don't specify variable types explicitly. Do ActionScript/Java developer in general prefer the use of the in classes or no?
public function hello():void
{
this.speaker.says("hello");
}
vs
speaker.says("hello")
Recently i made flash animation in 500x300px, now i need to re-create the same animation in 100x65px, plz tel me how can i decrease the dimension of same animation widout re-creating it in new dimension. is there any codes or tools or plugins?
View 3 Replies