ActionScript 3.0 :: Function With Two Inputs Working Improperly

Apr 27, 2009

am creating a little program with three sprites that rotate as you click on them.url...Right now the code is very long, so I am trying to use functions to make things more modularized.[code]"givenSprite.scaleX" gets "resizeFactor" added to it 90 times, as I intended.  But "spriteDegrees" only increments once, instead of 90 times.Now here is the weird part, if I add "maDegrees --;" above "spriteDegrees --;" it works just fine.  Can someone tell me why "spriteDegrees" is only incrementing once?

View 2 Replies


Similar Posts:


Actionscript 3 :: Bitmaps Are Too Large And Improperly Placed?

Mar 30, 2011

Alright I'm programming in actionscript 3, using flex as a compiler. I have an 16x16 large PNG file that is basically a square outline like this:But in more noticeable colors.

I want to draw an 11x11 grid of these squares, so I use these for loops:
for (i1 = 0; i1 < 11; i1 ++)
{

[code].....

View 1 Replies

ActionScript 3 :: Flash Font / Stylesheet Displaying Improperly

Mar 11, 2011

I created a swf in flash which contains a font I want to use in conjunction with a stylesheet in a separate swf. The stylesheet and font work fine in another text field which has been placed statically on the stage. However, when I try to dynamically place a text field on the stage, it doesn't work. The only thing that displays is the text with a span of class .gbold.

Here's my code:
function vidLoaded (e:LoaderEvent){
var vidText:TextField = new TextField();
vidText.autoSize = TextFieldAutoSize.LEFT;
vidText.x = textX;
vidText.y = textY;
[Code] .....

View 1 Replies

ActionScript 2.0 :: Flash Form Inputs - Form Doesn't Function?

Feb 17, 2010

I have a super involved and somewhat silly site I've been working on for a long time piecing together fragments of AS2 code and modifying them to the best of my limited ability.The site is here:http:[url]....I am finally adding the last steps, a series of contact forms with a PHP script in the back end. Anyway, I implemented a form script and have it triggered by clicking the "CONTACT" button you can see on the lower bar. So, click contact and once the form opens (an external SWF loaded into an MC), type away and everything works fine unless you use the letter "f" in either upper or lowercase. It causes the screen to flash and for the form input to lose focus.It works (in that you can enter everything normally -- the form doesn't function, but that's just the PHP which I have yet to edit.)

View 0 Replies

ActionScript 2.0 :: Disable All Key Inputs

Feb 18, 2009

I am working on an app where I have 'windows' popping up and sometimes overlapping each other. This poses a particular problem that I have not yet been able to find a sollution for:Let's say I have a window called myOptions (a MC containing a form contructed by other MC's, TextFields, Objects etc.). Upon pressing the submit button, another window pops up. This is a custom built confirm dialogue box - let's call it myConfirm.I don't want the user to be able to interact with the myOptions MC while the myConfirm MC is open. Blocking mouse-presses is no problem - I just make an empty MC that fills the whole screen with an onPress / return false on it.However, while the myConfirm is open, the user can still press tab to toggle through the form in myOptions, type text into the textfields an activate the listeners (like posting the form upon Enter keypress).

Manually deactivating textfields, tabs and listeners every time I call a confirm window is not really an option.I could have any number of forms/key listeners open at any time, and keeping track of what to activate and deactivate would be allmost impossible.What I would like is a simple command that I could call when opening a window like myConfirm a command that simply disables/blocks all key presses while the window is open.

View 0 Replies

ActionScript 3.0 :: Keyboard Inputs On A Movieclip?

Jul 27, 2010

Im having trouble with the keyboard inputs on a movieclip.is this valid to do? (3 of the same event)

Code:
stage.addEventListener(KeyboardEvent.KEY_DOWN, move);
stage.addEventListener(KeyboardEvent.KEY_DOWN, turn);
stage.addEventListener(KeyboardEvent.KEY_DOWN, fire);

what this does is using only one of these events at a time (the one with the last triggered key) and resets the others. this way I won't be able to move and turn simultaneously.

View 4 Replies

ActionScript 3.0 :: User Inputs From Dialog Box?

Aug 4, 2010

I need to get user inputs from the user in a popup dialog box. And get the data on the main page.For example a login dialog box. When the user enters the User/Passwd , it should be available on the main page.

View 1 Replies

ActionScript 2.0 :: Disable Keyboard Inputs?

Aug 26, 2005

does anyone know how to disable keyboard inputs, such that, for example, the user could not push enter to advance to the next frame? this could be a potential problem for the application i�m developing -- i want to force the users to use mouse clicks to advance the movie.

View 5 Replies

ActionScript 3.0 :: Dispatching Mouse_over Using Keyboard Inputs?

Jun 8, 2010

i have a button (not a movie clip) and have implemented a mouse_over / mouse_down that causes the button to light up just by adding a keyframe inside the button itself I have also included a keyboard event that dispatch that mouse_event.click whenever the space bar is pressed.How do I trigger that button's mouse_over, such that when the spacebar is pressed , the button will light up, using as 3 code?

View 3 Replies

Create A File That The User Inputs Text?

Mar 4, 2012

I need to create a file that the user inputs text which looks easy enough, but I need to strictly define what they can put in.

It is a right/wrong answer so for example:

I would need them to enter the following sentence exactly: Hello my name is dog.

View 6 Replies

Professional :: Contact Page Will Not Accept Any Inputs?

Jul 29, 2010

1. on my contact page built with Flash CS5, I try to enter text into the boxes. Only the characters c,l,o,n,t will actually type. Nothing else enters. What did i do wrong? 2. I can't for the life of me, make a pretty flash link work to go to another URL. /facepalm

View 2 Replies

Flex :: Capturing Combined Keyboard Inputs?

Nov 23, 2011

I am looking for a solution in Flex where I can capture a combination of keyboard inputs such as: [CTRL] + A + B

That is, pressing the CTRL key and the user presses two keys (instead of the usual one).

I can capture the event when somebody keys: [CTRL] + A with the following code:

if (event.ctrlKey && event.keyCode == 65)

How would I capture an additional key so that the event is captured when somebody presses CTRL, A and B?

View 1 Replies

Flash :: What Exactly Does Adobe Mean By VertexShader Have A Limit Of 8 Inputs

Dec 31, 2011

Does it mean only a total of 8 float values can be passed per vertices's set of data? Does this mean you can only have one of the following?

2 inputs of FLOAT_4.

4 inputs of FLOAT_2.

8 inputs of FLOAT_1.

Any mixture that will add up to a total of 8 float values? Is this the case? Because if it is, it's really misleading in their documentation to say 8 inputs can be used. Maybe I'm having trouble because I haven't formatted my data correctly, but I'm trying to use 9 floats per vertices, as in:

[Code]...

View 2 Replies

ActionScript 3.0 :: Validate Enabled Inputs By CheckBoxes?

Jun 10, 2010

i dont know how to validate enabled input field by a checkbox.

I got 4 checkboxes each of them enabling/disabling its own input field when checked/unchecked. This for a little explanation of the user's choice. So i need to validate if the enabled input text has some text in it, if not, restrict the submit of the form (by button).

I tried something like this:

Code:
} else if (checkBox1_txt.enabled = true || checkBox1_txt.text ="") {
status_txt.text = "Please, explain your choice";

[Code]....

View 1 Replies

Flash :: Forms: Adding Numbers From Different Text Inputs

Oct 28, 2009

I am trying to create a quote estimator on my website. I want to create forms in flash that can take inputs (numbers) from the user and then automatically calculate the values by mutliping certain forms and and then totaling them up.
 
The total value does not need to be saved. No database is required.
 
I am assuming I need to use dynamic texts?

View 2 Replies

ActionScript 3.0 :: Contribute Some Inputs For Creating Flash Website?

Nov 6, 2009

Basically Iam new to flash actionscript3.0, I am plannning to create Flash website. I need some help from anyone like creating button events, getting url, loading dynamic text etc.

View 2 Replies

ActionScript 1/2 :: Masking TextField Number (Like Serial Inputs)?

Dec 31, 2009

I have a number like this 22536325214589 and I want to separate it by 4 digits and show in separated input textfields like serial number input on applications and if user try to change it skip to next field while typing And also I can return number again into one variable.

View 6 Replies

Flex :: Simplify Adding Multiple Text Inputs?

Oct 4, 2009

i have an application in which i have around 100 textinputs all are numbers

i want to simplify the addition ie. any other way than saying txt1.text+txt2.text.....

that would increase my code a lot

is it possible to have (n+=txt*.text) or some thing like that

View 1 Replies

Actionscript 3 :: Detect CTRL + C Input And F3 Key Inputs In Flex

Jul 11, 2011

I am trying to implement find functionality in my application and for this I am trying to open a find popup based on keyboard inputs like F3 or CTRL + F. But on F3, instead of going to event listener, it opens up the default find toolbar of the Internet Explorer instead. how I could bypass it and use f3 in my application?

Another thing is how do I capture CTRL + F in flex?

private function keyPressed(evt:KeyboardEvent):void
{
if (evt.keyCode == Keyboard.F3)
{

[Code].....

View 3 Replies

ActionScript 3.0 :: Export All Mouse And Keyboard Inputs To Txt File?

Jan 19, 2009

I am trying to create a project where every input (mouse and keyboard) is logged to a text file with a time stamp from a .swf file. The premise is to record this data for usability research. For example, I want to record how long the user waits between clicking on buttons, which order they click on buttons, etc.

View 3 Replies

ActionScript 3.0 :: Display A Message When User Inputs Anything But A Number?

Dec 29, 2011

I have a message and its visible property is false how can i make it so it becomes true when the user types anything but a number. So there input textfield and a send button if the user types hello when they click send i want the message to become true. How would you do it? restrict?

View 2 Replies

ActionScript 2.0 :: Declare Variable And Call It Later Using Text Inputs?

Feb 11, 2010

I have a form with 3 input fields: Name, Email Address, and Contact Number. These have the following instance names: iFullname, iEmail, iContact When the user clicks submit, I need to store this data and then call it later into another form. There are 3 input fields with the same instance names as the first form.This form is in an external movie loaded into the main movie where the original data was stored.

View 12 Replies

ActionScript 3.0 :: Calculator - Converting Number Inputs To Outputs

Jan 14, 2012

I'm trying to make a calculator that takes a number that is input and then runs it through a formula and outputs it.

Elements:
Input1_txt
Input2_txt
RadioButton1
RadioButton2
Output1_txt
Output2_txt
Output3_txt
Output4_txt
Submit_btn

What I am trying to do is:
part 1. Take the input number of Input1_txt and if RadioButton1 is selected then divide Input1_txt by 2.20462262 but if RadioButton2 is selected then just take the number in Input_txt.
part 2. The outcome of part 1 to be multiplied by (100 minus Input2_txt) then divided by 100.
part 3. When Submit_btn is pressed outputs:
Output1_txt = The result of part 1 minus the answer of part 2, then multiplyed by 2.20462262 (and rounded to the closest whole number)
Output2_txt = The answer of part 2 multiplyed by 2.20462262 (and rounded to the closest whole number)
Output3_txt = The result of part 1 minus the answer of part 2 (and rounded to the closest whole number)
Output4_txt = The answer of part 2 (and rounded to the closest whole number)

View 8 Replies

Flex :: Create Table Like Structure With Rows As Text Inputs

Sep 30, 2009

I want to create a table like structure in Flex, with labels as header. The rows entries might be a check box or a text input box,Like give below.[code]Or can I create a data grid and have text input boxes or check boxes as column values?

View 1 Replies

Flash :: Enable Keyboard Inputs In Full Screen Mode?

Jun 23, 2010

I heard that the flash action script 3 is disabled the keyboard interaction on full screen mode. How can I enable.

View 1 Replies

ActionScript 3.0 :: Check If The Inputs Fields Are Numbers Only Not String And Not Empty?

Oct 21, 2010

I have 3 input texts on the stage.

money_input
percent_input
years_input

what I want after pressing the button (calculate_btn)is to get thees values entered from these input texts into 3 vaiables.

var $money
var $percent
var $years

and check if the inputs are numbers only not string not empty. I tried to convert the inputs to numbers to insure that they are numbers without making a function to check the inputs but always I get NaN when I entr value like 444bb;

ActionScript Code:
error_txt.text = "Enter some values to calculate your loan";
//--------Make the button listener----------//[code].........

View 2 Replies

ActionScript 2.0 :: Changing Textbox Inputs Inside A Movie Clip

Mar 31, 2011

Okay... I give up. I've tried everything I know on how to do this but with no results. What I'm trying to do is simple: there's a button in the stage and a movie clip. Inside the movie clip is a dynamic textbox. Now, the button is supposed to change what's written in the textbox inside the movie clip. Here's the code I had tried using:

[Code]...

View 1 Replies

ActionScript 2.0 :: Input Variable - Get A Ball To Accelerate To A Height That The User Inputs

Aug 26, 2011

I am trying to get a ball to accelerate to a height that the user inputs.

[Code]....

View 3 Replies

Flex :: Dynamic - Dynamically Access All Text Inputs Within A Custom Component In 4

Jun 8, 2011

I have a custom component which contains many promptingTextInput controls. When i click a button, I want the text field of all the promptingTextInputs to become blank. (Note: I have around 60 promptingTextInputs) How do i access the controls dynamically ? I am looking for a flex equivalent of $('input[type=text]') (like in jquery).

View 1 Replies

ActionScript 2.0 :: Make A Button Only Work If User Inputs Something Into A Text Block?

Sep 26, 2009

I need the user to type something into a text block anything at all they just have to type something.If they wright something into the text block then the button should be able to play.Here is what I have but it does not work.

on(release) {
if(_root.text == " ") { stop// if the text box is just a space
// do nothing
} else {
this.gotoAndPlay("37");}
}

View 9 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved