ActionScript 2.0 :: Convert Decimal Minutes Like 90 -> 1:30?

Dec 11, 2002

I need to make a dynamic text field display Sound.duration like 1:30sec instead of 90sec (for exemple...). I was not a maths major... I studied that long ago... I think... But I have no clue...

View 8 Replies


Similar Posts:


ActionScript 2.0 :: Convert Decimal To Hexadecimal

Sep 13, 2001

how to convert a decimal value to a hexadecimal with actionscript...

I want to make a funtion which will assign a random color to a movieclip... And the "set rgb" function requires the variable passed to be in hex. Bummer.

Also I could solve this problem if I could convert a string to a hex number insted of a decimal like with parseInt()

I think the solution may lie within the bitwise operators >> and <<, etc,... But I have no clue as to their use...

View 5 Replies

ActionScript 3.0 :: Possible To Convert Decimal To Binary?

Mar 19, 2012

I would like to know if you can convert decimal to binary using actionscript 3.0?

View 6 Replies

ActionScript 3.0 :: Convert Decimal To Fraction

Sep 8, 2009

I'm not familiar with actionscript 3.0, but I must use it for a project I was assigned. The final product will be a program that will take a decimal input value and then convert it to a fraction. I have searched the web for a couple hours now and have found very useful info on this topic in the actionscript 2.0 forum, but nothing for 3.0.providing a function that will convert a decimal value to a fraction?

View 2 Replies

ActionScript 2.0 :: Convert Character To Decimal?

Apr 9, 2007

I can't seem to find a function to convert a character to a decimal.

Example: Convert string 'A' into its decimal form '65'.

Background: I'm trying to take an input character value (anything from a to ZZ), substring its characters, and into uppercase (eg. G, Z), covert each character to decimal (eg. 71, 90) and then reduce those numbers, such that A=0, B=1, Z = 25 and finally add them. GZ = 6+25 = 31.

It's for an X,Y co-ord system that uses A-ZZ for X, and numbers for Y.

View 7 Replies

ActionScript 2.0 :: Convert Total To Decimal?

Jun 27, 2009

I am having trouble converting my total price in the cart text field to decimal. I have on the main timeline I have a several numeric steppers and add to cart button.

In my .as file I have the following code that takes the price * quantity and displays the total but not in the decimal $10.00 format. I have tried everything from Math.ceil, round, etc. It either will round up or just display the number with no decimal.

.AS File Code

Code:

public function GetCartValue(decimals:Number) {
var dataforAlternate = _level.BodyOilsMc.my_nstep.value;
moneysign= "$";
//trace("AS File"+""+dataforAlternate+" Products");

[Code].....

View 4 Replies

Convert Variable To Money With 2 Decimal Places?

May 6, 2010

I have a program that adds values together. I need the variable to display with 2 decimal places. Right now $1.50 would look like: 1.5

How do I make Flash display the zero automatically?

View 2 Replies

ActionScript 3.0 :: Convert Decimal To Binary Ive Got The Formula?

Mar 19, 2012

Im having a problem with this code to convert decimal to binary ive got the formula but it wont print to the screen_txt only on the console and also my calculator wont let me change any other number other than 3 so if i press 7 binary should be 111 but it stays 11...

[Code]...

View 3 Replies

ActionScript 3.0 :: How To Convert Base 10 Decimal To Twips

Mar 17, 2009

Basically, I am experiencing an inconsistency with the behavior of an equation that is calculating the change in y position from one movieclip sequentially from frame to frame, and transforming the amount of change from a smaller range to an amount of change to a larger range; moving the target mc between two points. The inconsistency is that target mc doesn't always reach the top and bottom .y points, even though the slider mc does.

View 2 Replies

ActionScript 2.0 :: Convert Decimal Number To Scientific Notation?

Jul 21, 2010

I've got a calculator that i created in as2 that converts different units of measurement. However, right now it always converts the numbers into a decimal number like 0.33333333 or 450.72. How in the world would i convert these decimal numbers to scientific notation? For example, say i have a number: 12,700. Expressed in scientific notation, this would be 1.27x10^4.I hope there is an easy way to make flash convert to such a number system? I know its easy to round numbers in decimal, but have never worked with scientific notation before.

View 9 Replies

ActionScript 2.0 :: [FMX] Convert Decimal Time To Standard Format?

Sep 19, 2005

I am trying to do a calculation which will eventually (hopefully) yield the total length of time it will take to download a certain size file over different broadband speeds.

//amount_total is the total file size (GB)
//multiplied by 1024 to give me total megabytes
mb = Number (amount_total*1024)
//15 is time (s) to download 1MB

[code]....

So, I am left with a total time of eg: 4.5 hours.i would like a standard number I can use across my movie to convert 4.5 hours to 4hrs 30, or 4.30 for simplicity.If I have 0.5 hours as a total, it would be much easier for the user to read it .30 hours.

View 7 Replies

ActionScript 2.0 :: X, Y To GPS - Convert A Decimal Value (like 10.25) Back To Degrees And Hours?

Apr 18, 2006

if I have a map of say, Wisconsin, and I know what the Latitude coords (degrees, hours, minutes) of the top and bottom of the map, and I know how many pixels tall the map is, then I should be able to convert, with math, degrees:hours:mins to pixels. (same thing with longitude, but lets just focus on one way first)

I would first find out how may hours (minutes would be over kill for my app) there are to a pixel. Thats pretty easy. But this gives me a decimal number. How do i convert a decimal value (like 10.25) back to degrees and hours (in other words, how do i make .25 a "60" based value)? Ultimately, i want the user to be able to input coords in the form of degrees, hours, mins. Then convert that to X, Y (to place a marker on the map).

Has any one had experience with this or know how to do this?

View 3 Replies

ActionScript 3.0 :: Convert Decimal To Hexadecimal And Vice Versa?

Jun 15, 2011

I have started working with colors and have got a need for playing with hexadecimals. I tried making a variable which adds two hexadecimals, and it works but when I trace the answer, it comes out in decimals. How can I make it remain in hexadecimal or convert the decimal to hexadecimal?

View 6 Replies

Actionscript :: Convert Character Entity References Into Decimal (charCodes) In It?

May 10, 2011

Is there a native method for converting character entity references into charCodes in ActionScript? For example, has a decimal or numeric entity reference of a. I assume that the charCode would be 8736 since I've found that charCodes of lower decimal values match.

View 1 Replies

ActionScript 2.0 :: Convert A Flash Binary-decimal Converter To Another Programming Language

Nov 28, 2005

Im trying to convert a flash binary-decimal converter to another programming language (TI-Basic). I've got all of it down except one key part. I've got a solid backing of actionscript understanding but find myself unable to understand the following statement:

if (iNumber%2) { bin = "1"+bin; }
from this tutorial

I realize that inumber%2 will return a value being the remainder of inumber divided by 2, but how can this be a conditional? "if (2) { }" doesn't work for conditonals im used to. Or if your a TI-Basic wiz

p.s. how do you wrap actionscript tags around content in a post on the forum?

View 1 Replies

Actionscript 3 :: Convert Seconds To Minutes And Seconds

Apr 2, 2012

I'm working with the youtube API and I'm getting the current time on the video as seconds.What I want to do is to convert them into this: MM:SS.I've tried to google and try different things by myself but nothing seemed to work and be efficient.

View 4 Replies

ActionScript 2.0 :: Convert Seconds To Minutes:Seconds?

May 23, 2006

I am currently using the following code to display the secconds of a FLV being played:
ActionScript Code:time_txt.text = Math.round(_root.video_mc.videoZ.playheadTime*100)/100;I need to change this to display MM:SS (minutes:seconds) rather than just seconds and decimals.The javascript people here at work suggested something like this:

ActionScript Code:
function strPad(str, places, pad, side) {
while (length(str) < places) {

[code].....

View 9 Replies

ActionScript 3.0 :: How To Convert Time ("4:22") Into A Decimal?

Jan 14, 2009

I have song times stored in a MySqual DB in time format: 4:22 I assume this is a string... What does the code look like that that will convert this into seconds so I can use it in my timers? var seconds:number = (everything left of the column x 60) + everything right of the column;

View 3 Replies

Publishing With CS4 Takes Over 2 Minutes

Nov 2, 2009

I just upgraded to Flash CS4 on my laptop. program that used to take 5 seconds now takes up to 2 minutes. I installed the 10.0.2 update, and searched the web for a solution. I am desperate because all of my programming is based on CS4. I know how to compile a swc and use FlashDevelop with the compiled graphics, but this isn't a solution for me. Whenever I need to make changes to the graphics I can't wait this long. I am using an HP dv5-1190. This meets the minimum requirements by far.

View 2 Replies

ActionScript 3.0 :: Get The Difference In Minutes Between 18:30 And 19:15?

Aug 23, 2010

How do i get the difference in minutes between 18:30 and 19:15?

View 1 Replies

ActionScript 2.0 :: Animation To Run After Every 5 Minutes?

Oct 13, 2004

I am working in Flash5. My problem is that I want my animation to run after every 5 minutes.
I mean that when I run my fla file, it should load my animation when 5 minutes has passed, then there should be a break and screen should become blank and then again after 5 minutes it should appear and run. I want this process to keep on happening. If this is not possible, can that be done through HTML code as I want to put it on my web page, what would be the html coding in that case. An important point is that, I want the coding to be in FLASH5, if done in flash.

View 2 Replies

ActionScript 3.0 :: Execute Function Every 30 Minutes?

Apr 11, 2009

I need to execute a function every 30 minutes including once immediately.User loads my flash swf, function gets executed.. 30 minutes later, it does it again.. and so on..

View 3 Replies

CS3 Timer That Will Stop After Couple Of Minutes

Oct 8, 2009

How I can create a timer that will start from 00:00 and will stop at 3:25 or 2:53 and etc and stuck in that position? And I want it to be in a format of 59:59 (60 minutes and 60 seconds) and NOT in 99:99.

View 3 Replies

ActionScript 2.0 :: CS3 Return To Frame 1 After 5 Minutes?

May 27, 2010

I am rather new to actionscripting and am looking for a script or something that will automatically return to frame 1 after 5 minutes of inactivity and then reset the timer. It will be used on an interactive sign that the user can click through like a website but I want it to reset so when the next user uses it, they begin at the main page. I am using Actionscript 2, with CS3 on a Mac. I have tried different scripts that I have found on the net and can't get anything to work.

View 2 Replies

Media Server :: Disconnect After 5-10 Minutes?

Jul 26, 2009

After 5-10 minutes of use my application disconnnects  all users....does anybody know some general causes of this or how do i fix it...........in the server logs i get code 600 normal disconnect.

View 1 Replies

ActionScript 1/2 :: WebSite Slows Down After A Few Minutes?

Mar 29, 2010

Does anyone know what would make a movie slow down the longer it is open. Theres nothing that I can think of this is constantly running, but after about 15 minutes of the website being open it slows down almost unresponsive.

View 10 Replies

Flash :: Current Time Plus 30 Minutes?

Mar 29, 2010

im really new to flash, how do i go about creating a variable which will get the current date and time and add 30 minutes to it ?

View 2 Replies

Flex :: Comparing Hours And Minutes In AS3?

Jul 25, 2010

Is there a way to compare the current time to a bunch of times (loaded from XML) and have it figure out which is the closest to the current time?

View 3 Replies

ActionScript 3.0 :: Playback Slows Down After A Few Minutes?

Apr 4, 2011

I've made this flash intro:[url].....(make sure you get the Dutch version to see it).It works fine, but after a couple of minutes, playback starts to slow down and it gets slower and slower. It's a simple looping timeline slideshow. I figured that perhaps of the looping, new instances of the slides are created every time, so I added this to my code, to remove a slide after it has faded out:

ActionScript Code:
var clip:MovieClip = MovieClip(  mcc.cc.getChildByName( "Slide" ) );
mcc.cc.removeChild( clip );

It doesn't make a difference.Removing the large bitmap images doesn't make it better either.Playback in FF and IE slows down faster than in the desktop flash player.

View 0 Replies

ActionScript 2.0 :: Current Time Plus 5 Minutes?

Jul 20, 2007

I've checked the forum a couple times, couldn't find an answer.this file gets local time, and then adds 5 minutes to it, problem is that when the minutes gets to 60 it continues because it's getting the actual time from the first time and just adding 5 to it

View 2 Replies







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