ActionScript 2.0 :: Display The Current Times In 3 Different Places?
May 17, 2007
I am trying to display the current times in 3 different places. On my own computer this works great, but i am not sure if this would work wherever you are, when i change my pc clock the times also change, should they not stay the same?
How can I tell flash to use only four decimal places when a number is display in a textField?Something like this:2.2356 , 0.2538, 0.2968, 0.0001 etc. Instead of infinitenumbers:.23565985 , 0.2538486
I am totally confused about this one. I am trying to display a number as x.xx, but I'm having problems! The number has 0, 1 or 2 decimal places, so I have an if else to add '0' or '.00' on the end if there are 1 or 0 decimal places respectively.[code]...
Can you make one Bitmap Object (I'm using an external jpg) or something similar, and then display it many times simultaneously without creating a separate object each time?
Also, would they be easily removed or hidden?
I've got a little checkmark jpg graphic loaded here, but I'm not sure how to go about using it in many places at once.. I can only display it in the one place at any one time...
I'm thinking there might be a way to load the picture once, then use its bitmapData elsewhere in new display objects somehow, without needing to reload the image over and over?
I want to display variable myblock down 10 times and then test it for collison, I am using the variable I to store the blocks, If I manally set the variable i to lets say 1 and 2 and then test for collison it works, but when I use I from the for loop it only detects one object from the array, I think that there is something probably simple missing such as an extra variable, as you can see from the code I am trying to use the' i' to replace for instance addChild(blockarray[1]);
I feel like such an idiot but after trying endlessly I still haven't managed to come up with a way to display the current frame number of nested movie clip ("ecke1") (in a dynamically created text field).The problem really is that I don't know how to have flash keep updating the variable. Here's my latest attempt:
Code: var frame:int = 0; addEventListener(Event.ENTER_FRAME,updateframe,false,0,true);
I have actionscript to control my car. It uses the arrow keys for steering and exceleration and braking. What my question is, do you know how to display my cars current speed.
I've got this code that displays the time but, I want the time to display dynamically, updated by the user's sytem clock so it always displays the "current time".
What do I have to do so that a text field will display outside the boundaries of the current stage? For instance, let's say I have a stage that is 300 x 200, and I want to add a text field that is 100x400
I would like to display the current date in the bottom part of the calendar on a DateChooser control. Has anyone extended the DateChooser control to do this?
Something like the attached image...
I managed to pull off some codes, but still, I have the slightest idea of how to add the label below the datechooser control.
I want to display the current time into a dynamic text box. The time comes correct but the seconds is not running... I want live seconds. what modification should i do to my following code?
How can you display current # of viewers connected to a stream and total views similar to how ustream displays them?Is this done using server side actionscript? Are there any templates and/or examples or tutorials to use to get started?
i'm new to AS3. how do i go about executing a custom function n number of times and then executing another function n number of times repeatedly?
eg.
function firstOne():void { }
function secondOne():void { }
i need firstOne() executed say 3 times and then secondOne() 3 times and then firstOne 3 times again and so on. i'm trying to move a movieclip 3 times to the left and then 3 times to the right continuously.
I have tried this a dozen different ways and I really am at my wits end.
I have a presentation that works like a powerpoint. Everything is working as it should, except one part. I have a movie clip with an instance named slides, and I want to actively display which frame number you are in this move clip.
I have tried more than one why but I see no reason why this should not work:
var frameNum:Number = this.slides.currentFrame; this.frameText.text = "P�quina " + frameNum + " de 173";
It appears to work at first, but does not update when I navigate the slides. It constantly says 1. Before I just added a function to the back and next buttons to frameNum++ and frameNum--, but after I created the Menu I would prefer it to automatically detect what frame it is on.
I'm just now learning how to use code more efficiently and i now there is a better way to reuse some of the code i'm using. For instance, how do i make this code into a reusable object(i guess with some parameters).
I have a cost calculator in flash, only the price comes out with about a hundred decimal places... any convenient way to round it up to 2? I was hoping there was some (fairly easy) way to nicely format an output..
I have a simple AS1 script running on a button: // on (release) { a = Number(answer2); w = Number(withvat); v = Number(vat2); answer2 = (w / 117.5 * 100); vat2 = (w / 117.5 * 100 * 0.175); } It works but the results are sometimes many decimal places long. Any way I can make my results round to two decimal places (accurately). So 5.6994 becomes 5.70 etc.
I have 23 keywords in an XML file. In an area of 1600px by 500px there should be zooming in and out (for about 5,6,7 sec which depends on the number of letters) 10 keywords, randomly chosen from the XML file. Each keyword may appear in different spots in the area, it doesn't matter.
my cost per month textbox typically returns multiple decimal places, is it possible to limit it's output to two decimal places like real monetary calculations?
I don't think this is right...especially if secondPosition is at the beginning of the the "temp" array (i.e. temp[0]). Is there a way to remove two items at once from an array, if they are not side-by-side??