ActionScript 2.0 :: Create A Digital Clock?
Mar 20, 2004how to create a digital clock?
View 2 Replieshow to create a digital clock?
View 2 RepliesI have to make this analog clock for a university assignment and despite some really good efforts last night and tonight I just can't work out how to get it fully working. There is both a digital and analog clock; the digital clock works fine, but the analog clock just starts from a random time whenever I play the test movie. I am supposed to use the date object, not the timer object. And I am also supposed to add a sound every minute - I have added the sound to the minutes layer and selected but I don't know where to go from there. I seem to be able to find lots of example code for the timer object but not the date.
this.addEventListener("enterFrame",clockHandler); false, 0, true;
function clockHandler(e:Event)
{[code].....
for a game I'm working on, I want to make a 'digital display', like a digital clock for example. Every character exists of 7 lines which are either on or off. This picture will demonstrate what I mean.
Currently, I've got a DigitalDisplay class that extends Sprite, which holds a couple of instances of the Digit class that extends Sprite, which in turn holds 7 instances of the DigitLine class, which extends Shape, in which I draw one such line with the drawing API. This would mean that one DigitalDisplay holds 8 Sprite, which all hold 7 Shapes, so that's 8 Sprites and 56 Shapes. This is a bit overkill I think.
Thing is, I want control over every 'DigitLine'. During transition, when the text on the display changes, I want every lines to go on and off in a random pattern, slowly forming the new text. Would this be possible with another less extensive solution? The only thing I could think of was this:
Instead of every Digit object I'd have an Array, which instead of filled with DigitLine objects is filled with Arrays. However, then I'd only have 1 graphics object, which mean I'd need to clear() it every time something changes.
I have a digital clock out on my personal server, and when I navigate to it, it works perfectly. However, if left open for a little while, it starts to slow down the browser and other various applications that may be open.
Here's ActionScript Code:
var mydate = new Date();
var seconds = mydate.getSeconds();
var minutes = mydate.getMinutes();
var hours = mydate.getHours();
var day = mydate.getDay();
[Code] .....
Would I need to clear my interval every once and a while?
I'm having a lot of trouble getting my AS3 code to work. I have made a digital clock that grabs the system's time and I want to be able to control the speed of the time by using a slider and a button to reset the time back to the system's clock. Any idea how I go about doing this? I figure I need to grab the system's time and then stop it and create my own clock by increasing the seconds by 1.
View 6 RepliesI tried the digital clock tutorial on Kirupa, but it doesn't display the correct time, For example if my cpu clock says 3:00 PM, Saturday, November 13, 2004 the tutorial clock says 15:00 AM, Saturday, December 13, 2004.
View 1 RepliesI want to know about countrywise digital clock. I have a map and when I mouseOver on a country then it should show the time of that that country.like when i over on india then it should show the indian time and when i over on china then it should show the chinies time..
View 1 RepliesI tried the digital clock tutorial on Kirupa, but it doesn't display the correct time, even the example on the tutorial page is wrong. For example if my cpu clock says 3:00 PM, Saturday, November 13, 2004 the tutorial clock says 15:00 AM, Saturday, December 13, 2004. Could someone show me how to fix this,
View 1 RepliesI'm going to design an electronic card later in Flash (CS3 & CS 4) and I wonder if anyone has a link to any decent tutorials (or tips 'n' tricks)? I'm particularly keen to creat a rolling snowfall.
Also, I've going to create a digital display for a stand at a tradeshow. Is Flash the best medium for this (or would it be better in something like Premiere)?
I would like to create a digital time which only show min and sec. This time is use in a game in order to test the users speed and accuracy. When the user finished the game, the time will stop and then have to check the time user has spent to finish the game. So, if the user manage to finish the game before 10 min, will get 100 points. If is between 10 and 15 min, will get 90 points and so on.
View 3 RepliesI would like to create a digital time which only show min and sec. This time is use in a game in order to test the users speed and accuracy. When the user finished the game, the time will stop and then have to check the time user has spent to finish the game. So, if the user manage to finish the game before 10 min, will get 100 points. If is between 10 and 15 min, will get 90 points and so on.
View 3 RepliesI have a clock image that has a space for the day (eg: M, Tu, etc)a space for the month (spelled out) and a space for the date. It refers to a page I'm working on in Flash CS4. I'd like it to show the correct date in a specific type style. How do I program that?
View 3 RepliesI want to create an analogical clock but i have a problem. I've created a new MovieClip that is a square. This square i want to use to represent the seconds in a minute and minutes in a hour.[code]...
View 7 RepliesI'm trying to create an analog clock that changes color when its PM. The only thing is that the variable won't update. I made the code a function and put it in a code block that runs every second. To make it clear: The function DOES work, it just doesn't update the variable ampm which means when the clock passes 12, it won't change color. The function only gets the variable once from what I can tell. I traced the variable ampm when the local time was 3 PM but even if I changed the time to 3 AM, the variable didn't change. So it'll change color correctly when the flash file is first run but if the time goes from AM to PM while it's running it will not change color.
Code:
Here is my function code:
function color():void
{
/* AM PM, if hours is greater than 11, that is 12 and 12 is PM */
if (hours<12)
[code]....
I am designing a couple of games in flash and i came to the conclusion that i need a more flexible solution for timing instead of onEnterFrame; An interval based system which i can pause or change the speed, independent of the frame-rate of the flash file. So some processes might be running at frame-rate while others use the clock. One of the trickiest parts might be controlling animations with the clock, but this would allow to make a real slowmotion effect.. Since i really have to brush up my skills, i have some problems/questions;
what technique would be most usefull for this? thinking of an interval and 'addlistener's type of thing. Is this heavy on performance?Not sure if the animation part would work.Do You guys think it could be a usefull function? is there another way?
Ps. I posted this here, because to me this is more about the technique than its application (the game).
I'm trying to create a clock which shows the time returned by the server. get this code working with the server time on..(E.g.: time.php returns 1295532770)
server = new LoadVars();
server.onData = function (src){
clock_txt.onEnterFrame = time;[code]....
can you tell me if it is possible to detect if an object is rotating anti clockwise or not? at present i get x,y co-ords and use the code below to rotate it which is fine. now i could write an if statement to check if rotation is negative or positive but because rotation can be negative and positive when rotating clockwise and anti clockwise this wouldnt work.
[Code]...
at present i get x,y co-ords and use the code below to rotate it which is fine. now i could write an if statement to check if rotation is negative or positive but because rotation can be negative and positive when rotating clockwise and anti clockwise this wouldnt work.
Code:
theAngle = Math.atan2(diffy , diffx);
this._rotation = theAngle*360/(2*Math.PI);
[code].....
I've done two Flash animations, and both, when I use the Simulate Download function, show what appears to be a digital artifact in the upper left hand corner. It looks like a series of small squares or rectangles briefly fluttering from left to right.As far as I can tell, this doesn't show up in the actual .swf. Has anyone else seen this? Is it a sign that I've done something wrong, or should I just ignore it?
View 3 RepliesDoes the digital publication (emag) created using Indesign and flash require any action script knowledge in order to produce the search, zoom and table of contents features seen in most online digital magazine? Or is there a basic "template" that is produced in which you can modify?
View 1 RepliesI'd like to make an online comic of "swfs" where each swf file is an image with simple animations, and a "next" button.
View 1 RepliesI am a designer using InDesignCS4 to export a 16 page document as a SWF file with a page curl page transition. I am also exporting a static footer bar that holds a client logo and website address that acts as a hyperlink to the client's website. I currently place these 2 SWF files in Dreamweaver, 16pager above the footer, 1 above the other, and save as .html, upload to an ftp site to get the whole thing to work as a FlippingBook page curl Digital Magazine with static footer bar and hyperlink that directs to the clients website to download the corresponding PDF and print.
I am no Flash developer, but what I would LIKE to do is export from InDesignCS4 as an Adobe Flash CS4 Pro (XFL) document, open up in Flash where I know each spread imports as its own frame, save as a new .fla file, create some great Text effects with actionscript, which I CAN do. But what I can't do is export this as a SWF file AND retain the page curl transition it would have had as a SWF from InDesign??? Is there a way, despite handing over to 'my' Flash developer to encode (according to every video tutorial I have seen on the subject!), where I can 'stitch these page frames together to export my frames from flash with page curl, have the footer bar independently at the bottom, have the whole thing scale as one flash animation but also include some features such as print, zoom and 'goto' page field? At the moment all this appears to be alot of coding work.
I subscribe to a bunch of magazines in digital format. They attempt to replicate a print mag onscreen, but I find their "specail features" annoying, so I like to download a PDF for offline viewing. For the last month or two, every time I try to print to a PDF from one of these digital magazines, I get a gray screen saying Flash has crashed. If I try to download the PDF, a new tab opens in my browser but the PDF doesn't load, the screen remains black. Reloading the page, closing and restarting the browser doesn't help.
Win XP SP3, 32 bit
Firefox 4.0.1
Flash 10.3.181.14
Acrobat 8.2 Pro
I want to make a digital framing application like at this website:URL...Im not sure if i would be able to make this with an adobe program or if its something i would have to download off the internet.
View 1 RepliesI have a NetStream set up and it's supposed to listen for DRMAuthenticateEvent.DRM_Authenticate. When I give it an encrypted file (encrypted using software from drm-x.com), no DRMAuthenticateEvenet seems to be dispatched. The code looks like this:
[Code]...
I have both proxy and drm authentication types in there because drm was not working for me so I decided to try proxy. Am I doing something wrong? I got this stuff off of the Adobe reference pages, is there an easier/smarter way of going about DRM in Flex?
I'm currently writing an image editing application using Flex and I'm trying to make a blemish removal functionality like in picnik.com. I have searched everywhere but couldn't find anything. I have tried to just blur away the blemishes, but the results are bad.
View 2 RepliesI subscribe to a bunch of magazines in digital format. They attempt to replicate a print mag onscreen, but I find their "specail features" annoying, so I like to download a PDF for offline viewing. For the last month or two, every time I try to print to a PDF from one of these digital magazines, I get a gray screen saying Flash has crashed. If I try to download the PDF, a new tab opens in my browser but the PDF doesn't load, the screen remains black.Win XP SP3, 32 bitFirefox 4.0.1Flash 10.3.181.14Acrobat 8.2 Pro
View 2 RepliesI have created a DIGITAL MAP but i have a problem. It goes like this, whenever you click the buildings in the MAP it will automatically "ZOOMS IN", it "ZOOMS IN" in that specific building that you have clicked.
View 3 RepliesTiming Format in Flex "24-hour clock" and "12-hour clock"if "24-hour clock" Button is selected, the control should convert times to 24 hour clock time. For example, if 3:45 p.m. is entered, it should be converted to 15:45.if "12-hour clock" Button is selected, the control should convert times to 12 hour clock time. For example, if 15:45 p.m. is entered, it should be converted to
View 2 RepliesI am just wondering that what are the core reasons behind using Flash Media server for implementing IPTV, wheras we have some efficient devices such as following digital tuner boxes http:[url]....We can get the MPEG-TS stream and send it to this box and it can play the TV for us. Is it not simple? I think that I misunderstanding some thing, why people use FMS for IPTV implementation.
View 3 Replies