Getting A 12 Hour Format Clock Working [b]RIGHT[/b]
Ok I'm having problems with my clock. I want it to display in 12 hour format but when I get it to show right for AM the PM one screws over then I can't get it back. Here is the code.
Code:
// Script to get the time string from the newDate object
newDate = new Date();
myHour = newDate.getHours();
// If the hour display is less than 2 digits, add an extra 0
if (length(myHour)<2)
{
myHour = "0" + myHour;
}
if (myHour.toString.valueOf >= 0) {
myHour = myHour - "-12" * "-1" - "6" * "1" - "12";
}
if (myHour.toString.valueOf <= 0) {
myHour = myHour * "-1" - "6" - "12";
}
myMinute = newDate.getMinutes();
if (length(myMinute)<2) {
myMinute = "0" + myMinute;
}
mySecond = newDate.getSeconds();
if (length(mySecond)<2) {
mySecond = "0" + mySecond;
}
// Space out the HH:MM:SS
if (myHour.valueOf.toString >= 12) {
displayTime = myHour + ":" + myMinute + ":" + mySecond + "PM";
}
if (myHour.valueOf.toString <= 0) {
displayTime = myHour + ":" + myMinute + ":" + mySecond + "AM";
}
Also is there a way to not show passwords and only show ****...etc.
Thanx
FlashKit > Flash Help > Flash ActionScript
Posted on: 11-07-2001, 05:23 PM
View Complete Forum Thread with Replies
Sponsored Links:
- Time And Date...12 Hour Vs 24 Hour Clock
- Mobile Phone Clock - Simple Digital 24 Hour Clock
- Making A 24 Hour Clock - HOW?
- 24 Hour Analog Clock
- 24 Hour Analog Clock
- 48 Hour Clock Countdown ?
- Clock's Running One Hour Fast
- Check Clock & Do Action Every Hour?
- Clock Where 1min Real Time = 1 Hour
- Quarter Hour Chimes - Analogue Clock
- Change Image Depending On The Clock Hour
- Change Image Depending On Clock Hour
- Working Clock
- [CS3] Flash Clock Not Working HELP
- Clock .getUTC Not Working
- Digital Clock Not Working?(tutorial)
- Format Text Not Working
- Format String Not Working?
- Preloader Not Working In In Mx2004 Format
- Working With Illustrations. Best Format, Settings, Resoltuion. Problems.
- [Flash 9 AS 2]format Text In Dynamic Field Not Working
- <b>I Need A Clock, Please Help Me, Need Full Information To Make A Flash Clock</b>
- Countdown Clock (sync With Server Clock In .asp) PLEASE HELP
- Countdown To Top Of Hour
- Searching For Over An Hour?
- After An Hour Of Staring, Help Me
- Help In The 11th Hour
- HELP Meeting In ONE HOUR
- Another Hour Another Problem :)
- $100 For An Hour Or So Of Your Time.
- WebServices For The Hour
- 24 Hour Countdown
- Help 1/2 Hour Left
- A Two Hour Presentation
- 10 Hour Countdown
- [flash Mx/5] Day, Hour, Min, Sec...but What About Month
- Timer: Day, Hour, Minute
- Adding Strings By The Hour
- Change Text Every Hour
- Switching Images Each Hour
- Hour Long Videos
- UTC Issue With Not Displaying Hour Of Only 12 PM?
- Automatic One Hour Countdown
- 24 Hour Shared Object
- Streaming Audio For 1 Hour
- Play A Playlist By Hour Of The Day
- Once An Hour - Flash Cookie?
- Flash App Disconnects From FMS After An Hour
- Countdown To A Specific Hour?
- Hour Glass Preloader?
- 1 Hour Publish Times
Time And Date...12 Hour Vs 24 Hour Clock
I have an MC that displays the time as well as the day of the week, day of the month, month and year. It works perfect except it displays the date using a 24 hour clock instead of a 12 hour clock. For example, right now it is 1:19 pm, but the clock in the SWF will display 13:19.
The code below is on the first frame of the MC. How can I modify this code so that it displays the hour based on a 12 hour clock?
Thanks...
function howlong(arg) {
if (length(arg)==1) {
arg = "0" + arg;
return arg;
}
else {
arg = arg;
return arg;
}
}
myDate = new Date();
hr = howlong(String(myDate.getHours()));
mnt = howlong(String(myDate.getMinutes()));
daytext = myDate.getDay();
dd = myDate.getDate();
mm = myDate.getMonth();
yyyy = myDate.getFullYear();
switch (daytext) {
case 0:daytext = "Sunday";
break;
case 1:daytext = "Monday";
break;
case 2:daytext = "Tuesday";
break;
case 3:daytext = "Wednesday";
break;
case 4:daytext = "Thursday";
break
case 5:daytext = "Friday";
break;
case 6:daytext = "Saturday";
break
}
switch (mm) {
case 0:mm = "January";
break;
case 1:mm = "February";
break;
case 2:mm = "March";
break;
case 3:mm = "April";
break;
case 4:mm = "May";
break
case 5:mm = "June";
break;
case 6:mm = "July";
break
case 7:mm = "August";
break
case 8:mm = "September";
break
case 9:mm = "October";
break
case 10:mm = "November";
break
case 11:mm = "December";
break
}
textdate = (hr + ":" + mnt + " - " + daytext + " - " + mm + " " + dd + "," + " " + yyyy)
View Replies !
View Related
Mobile Phone Clock - Simple Digital 24 Hour Clock
Hi
I need to make a digital clock/watch for a mobile phone flash demo. I know there are lots of clock on flash kit but they all have seconds and minutes - I need just hours and minutes! - The clock also has to be 24 hour.
I've tried taking the code from a flash kit clock and tweaking it but it seems to screw up - for example 07.03 comes out as 7.3 - looks really naf like that!
If anyone can help me out with a source file or some code I would be most greatful!
View Replies !
View Related
Making A 24 Hour Clock - HOW?
Ive used this tutorial script to construct an analog clock, and would like to convert to a 24 format seeing as when i reset my system time to say 23:11 the clock crashes.
Any ideas??
onClipEvent (enterFrame) {
// Gets the time information and stores in MyDate
MyDate = new Date();
// Assigns values individually
hour = MyDate.getHours();
minute = MyDate.getMinutes();
// Calculates position for hours hand
if (hour>11) {
hour = hour-12;
}
hour = hour*5;
movement = minute/12;
hour = int(hour+movement);
// Moves hours hand
with (_root.Clock.Hours) {
gotoAndStop(hour)+1;
}
// Moves minutes hand
with (_root.Clock.Minutes) {
gotoAndStop(minute)+1;
}
}
View Replies !
View Related
Clock's Running One Hour Fast
I have a clock in the web site i am making, and its one hour fast!!?? I have tested it out on more than one system (windows xp, windows 98) both running Flash player 5. I have downloaded more than one clock setup from the turorials here, and they are all one hour fast. It is obvious that its something to do with the flash player.
So how do i get this problem fixed? I live in adelaide (and therefor go by there time) its +9:30 GMT, and we have daylight savings. Could this have something to do with it????
thanx a million in advance.
View Replies !
View Related
Check Clock & Do Action Every Hour?
Hi Guys, i have a simple clock which represents 1 minute real time as 1 hour. I want it to perform this every hour:
Code:
_root.mc._width = _root.mc._width-6;
The code for the clock is:
Code:
Minutes = 12;//the start hour (24 hour time; i.e. >> 14 == 2 PM)
function AddHour() {
Minutes += 1;
time.text = getTime();
}
setInterval(AddHour, 60000);//60000 represents 60000 milliseconds, or 1 minute
function getTime() {
Hour = Minutes;
if (Minutes>=12 && Minutes<24) {
if (Minutes != 12) {
Hour -= 12;
}
Status = "P.M.";
} else if (Minutes<12 && Minutes>0) {
Hour = Minutes;
Status = "A.M.";
} else if (Minutes == 0 || Minutes == 24) {
Hour = 12;
Status = "A.M.";
Minutes = 0;
}
return (Hour+" "+Status);
}
time.text = getTime();
Thanks alot, Dave
View Replies !
View Related
Clock Where 1min Real Time = 1 Hour
Hi guys, i'm wanting to create a clock (either analogue or digital) with hour/minute hands/digits where 1 hour on the clock represents 1 minute real time. Obviously the clock will be faster than normal so i think showing seconds would be pointless.
Hope you understand!
cheers in advance, dave.
View Replies !
View Related
Change Image Depending On The Clock Hour
hello! i´m from argentina and i am needing to do something a saw last year on kirupa, but i really can´t find it now
i remember i saw a tutorial that explained how to create a flash (menu,top, etc) that changed as the time/hour of the clock changes...
A hope i am being clear in my explanation :S
for example waht i need to do:
I want the top image (swf) of my web to change as the time of the days pass, for example in the morning the image will show the beach with the sun, but if I enter de web at nicght the image will be the same beach but at night and with the lights of the city...
Of course I have already made this images (morning, mid-day, afternoon, night) but want to know... HOW TO MAKE THAT TRANSITION AUTOMATICALLY FROM THE HOUR OF THE CLOCK...(i remember it was something like that, I REALLY NEED THAT TOTORIAL PLS! ^^
hope you can help me, and sorry for the bad english :$
marcelo.
View Replies !
View Related
Change Image Depending On Clock Hour
hello! i´m from argentina and i am needing to do something a saw last year on kirupa, but i really can´t find it now
i remember i saw a tutorial that explained how to create a flash (menu,top, etc) that changed as the time/hour of the clock changes...
A hope i am being clear in my explanation :S
for example waht i need to do:
I want the top image (swf) of my web to change as the time of the days pass, for example in the morning the image will show the beach with the sun, but if I enter de web at nicght the image will be the same beach but at night and with the lights of the city...
Of course I have already made this images (morning, mid-day, afternoon, night) but want to know... HOW TO MAKE THAT TRANSITION AUTOMATICALLY FROM THE HOUR OF THE CLOCK...(i remember it was something like that, I REALLY NEED THAT TOTORIAL PLS! ^^
hope you can help me, and sorry for the bad english :$
marcelo.
View Replies !
View Related
Working Clock
I am trying to make a working clock that keeps the time to the computer that is running, also to be able to keep the date aswell. Does anyone know the syntax to do this?
View Replies !
View Related
[CS3] Flash Clock Not Working HELP
I was hoping someone could help me out with this. I'm doing the tutorial:
Analog Clock Tutorial
It's for a website I'm doing as a final. Time is short and I need to figure this out quick. I don't know if I've somehow messed up the action script or what's wrong!
Someone help!
Here's the .fla file, I got rid of the watch border it was too much space.
Thanks,
Vendian
Drew
View Replies !
View Related
Clock .getUTC Not Working
Hi,
I'm trying to create a clock which will show time from a given time zone. In this case I'm using the .getUTC command. I have a problem though as it is working in adobe flash when I do the "Test Movie" option but later after exporting it shows time from my computer. Can anyone help me please.
Thanks in advance.
Attach Code
time=new Date(); // time object
minutes = time.getUTCMinutes()
hours = time.getUTCHours()
hours = hours +(minutes/60);
hours = hours +1;
minutes = minutes*6; // calculating minutes
hours = hours*30; // calculating hours
minute_hand._rotation=minutes; // giving rotation property
hour_hand._rotation=hours; // giving rotation property
View Replies !
View Related
Format Text Not Working
ActionScript Code:
function attachEnemy(enemyText, xx, yy) {
this.attachMovie("bomb", "bomb"+c, d++, {_x:xx, _y:yy});
this["bomb"+c].createTextField("problem", 5, 0, 0, 1, 1);
this["bomb"+c].problem.type = "dynamic";
this["bomb"+c].problem.border = false;
this["bomb"+c].problem.selectable = false;
this["bomb"+c].problem.color = 0xff0000;
this["bomb"+c].problem.size = 12;
this["bomb"+c].problem.bold = true;
this["bomb"+c].problem.italic = false;
this["bomb"+c].problem.underline = true;
this["bomb"+c].problem.align = "left";
this["bomb"+c].problem.text = enemyText;
this["bomb"+c].problem.autoSize = true;
this["bomb"+c].maskMc._height = this["bomb"+c].problem._height;
this["bomb"+c].maskMc._width = this["bomb"+c].problem._width;
this["bomb"+c].explosionMc._height = this["bomb"+c].problem._height;
this["bomb"+c].explosionMc._width = this["bomb"+c].problem._width;
this["bomb"+c].maskMc._alpha = 10;
c++;
}
For some reason my text wont format
Can anyone please help?
I appriciate your time
~Gabor
View Replies !
View Related
Format String Not Working?
Hi i have the following code, that should be formatting each attached movieclip.text with a new font, but all the text is the same font...
can anyone help
ActionScript Code:
this.createEmptyMovieClip("content", 1);
content._x = 50;
var text_array:Array = TextField.getFontList().sort();
var fontTotal:Number = text_array.length;
for (i=0; i<fontTotal; i++) {
var txtString:String = text_array[i];
content.attachMovie("txtBox", "txtBox"+i, i);
var my_fmt:TextFormat = new TextFormat();
my_fmt.font = txtString;
//trace(my_fmt.font);
content["txtBox"+i].small_txt.setTextFormat(my_fmt);
content["txtBox"+i].large_txt.setTextFormat(my_fmt);
content["txtBox"+i].small_txt.text = txtString;
content["txtBox"+i].large_txt.text = txtString;
content["txtBox"+i]._y = 60*i;
}
View Replies !
View Related
Working With Illustrations. Best Format, Settings, Resoltuion. Problems.
Hi All,
I'm having some trouble working with the illustrations on my site. I do drawings, that are very sketchy -- black and white mostly, with pencil and ink. I'm transfering my html site into Flash, and importing the illustration .jpgs I used in Fireworks are giving me, blurred, blocky images in Flash.
Are there any tricks I should be incorporating to get nice, acurate renditions of the original files via flash?
Do you recommened a specific resolution, file size, format? Are there settings within flash that I'm missing entirely?
I've tried them as .Jpegs, .GIFs and .BMP's, all looking bad once they're in flash. Should I set them up as "wallpaper" on a square object? Everything thus far is 72 dpi.
Thanks for the assist,
-AX1
View Replies !
View Related
[Flash 9 AS 2]format Text In Dynamic Field Not Working
I am trying to change the text format in an AS-created text field and it is not working. I got the codes right out of the help files. what am I doing wrong?
var my_sound:Sound = new Sound();
my_sound.loadSound("lockhart.mp3", true);
this.createEmptyMovieClip("knob_mc", this.getNextHighestDepth());
knob_mc.left = knob_mc._x;
knob_mc.right = knob_mc.left+100;
knob_mc.top = knob_mc._y;
knob_mc.bottom = knob_mc._y;
knob_mc._x = my_sound.getVolume();
with (knob_mc) {
lineStyle(0, 0x000000);
beginFill(0xFFCCFF);
moveTo(0, 580);
lineTo(8, 580);
lineTo(8, 596);
lineTo(0, 596);
lineTo(0, 580);
endFill();
}
knob_mc.createTextField("volume_txt", knob_mc.getNextHighestDepth(), knob_mc._width+4, 580, 30, 22);
format = new TextFormat();
format.color = 0xFFCCFF;
knob_mc.volume_txt.setTextFormat(format);
knob_mc.volume_txt.text = my_sound.getVolume();
knob_mc.onPress = function() {
this.startDrag(false, this.left, this.top, this.right, this.bottom);
this.isDragging = true;
};
knob_mc.onMouseMove = function() {
if (this.isDragging) {
this.volume_txt.text = this._x;
}
}
knob_mc.onRelease = function() {
this.stopDrag();
this.isDragging = false;
my_sound.setVolume(this._x);
};
View Replies !
View Related
Countdown Clock (sync With Server Clock In .asp) PLEASE HELP
I used Senocular's awesome countdown clock tutorial found here:
http://www.kirupa.com/developer/mx/countdown2.htm
but I need to figure out how to sync it to my server's clock (I understand I must do this in a .asp file and then load that into flash).
Using vbscript this is what I tried, but obviously it doesn't work I think I may need to convert it completely to seconds first before bringing it into flash:
<%
Dim MyTime
MyTime=now()
response.Write("time="&MyTime)
%>
Does anyone have any ideas?
Thanks so much!
View Replies !
View Related
Countdown To Top Of Hour
Does anyone know how to create a countdown to the top of every hour.
I'm trying to create a screensaver which will start a special countdown 90 seconds before the top of every hour. I've searched everywhere but nowhere seems to have anything faintly like it.
Please help.
Thanks
Hedgehog Online
View Replies !
View Related
Searching For Over An Hour?
I've been searching for over an hour now on how to upload my flash intro to my site. All I can find is information about people who didn't publish it or put the .fla on their site. Well, call me dumb, but they didn't go any further into detail and I'M REALLY NEW! I can't even find this info in the tutorial's section. I bought flash 5 last week. I got a demo here at flashkit, spent a week personalizing it and changing some things.
Should I be doing a search for "SCRIPTING" instead of "UPLOADING FLASH"? Where can I just find a walkthrough.
Thanks in advance for any help you can offer, and for maybe even NOT laughing at my situation!!!
View Replies !
View Related
After An Hour Of Staring, Help Me
ok... I've been working on this code... and before it always works...
but why does it not work now? I think it might be something in MX that I'm not aware of, but just help me out.
Code:
for(i=2;i<20;i++){
duplicateMovieClip("1", "z"+i, i);
_root["z"+i]._x = ((width + xMargin) * i)+ xVal;
trace(_root["z"+i]._x);
}
I am trying to duplicate a movie into a grid with a margin and what not... doesn't work!!!!!!!! ARG!
If you could see what is wrong, i'd appreciate it.
Thanks,
-Kac
View Replies !
View Related
Help In The 11th Hour
I have had an outside developer create a projector for me that is essentially a file browser. I hired outside because I have never developed any flash to affect the system.
What is supposed to happen is that in the projector, when you double click on an image it is supposed to open the folder where the file is located on the CD (where the projector is located) so you can copy the files to youyr hard drive He has managed to get this to work on the windows CD but of course the code does not work on Mac.
I have a feeling that you can do this with the fscommand but as I said I have never done this before. And of course it is the 11th hour.
Help Plaese
View Replies !
View Related
Another Hour Another Problem :)
code:
_root.Hlevel -= 1
this._xscale -= 1
if (_root.Hlevel <= 0) {
_root.gotoAndPlay("DEATH",1);
} else {
this.gotoAndPlay(1);
}
This is the actionscript i put in the
30th frame of a movie clip representing the variable "Hlevel"
the problem is...when the variable reaches
0 the main movie doesn't goto the scene "DEATH"
in fact nothing happens.
I've provided the FLA file but i dont think it will help much.
By the way i think the problem may be due to Paths...but i've been slaving over this for 2 days so i cant figure it out.
View Replies !
View Related
$100 For An Hour Or So Of Your Time.
I need help with a fairly large flash file. The file is approx 3-4 minutes long and contains 1 song. Toward the end of the song, there are text lyrics that do not appear to match up in various browsers (fine in IE, but lags in FireFox). Also, client wants move to start and stop using 'spacebar' ... that would include music.
I hope this can be resolved by somebody that knows what they are doing.
If you are interested in helping me out with this, I can pay you via PayPal or ePassPorte. Please contact me as soon as possible:
ICQ: 136-278-294
email / MSN: estuivenberg@hotmail.com
View Replies !
View Related
WebServices For The Hour
Hey, I'm new in Action Script. I would like to know how to connect to a Free Web Service that can give me the world time (hour). This is for using in a decounter for an event of my page, like the de-counter of espndeportes.espn.go.com for the final of world soccer cup
Thanks a lot
View Replies !
View Related
24 Hour Countdown
Hey it's my first post so i hope it all goes well haha
ok so i need to make a clock that counts down 24 hours. i can do that, but the thing is i need it to not refresh with the page. i also need it to be set on pacific standard time. any ideas of how i can do this would be awsome.
thanks
kris
View Replies !
View Related
Help 1/2 Hour Left
I've been working on this for a week straight.
I have a simple form in flash
Vars FirstName
LastName
Email
Phone
Ext
Fax
Comments
I have been trying to get it to use an asp formmail I know works (with html version of site). Flash doesnt seem to be posting to the ASP file. When you hit submit, flash redirects but I dont get an email at all vars or not.
I have tried so many scripts that it would be easier to start from scratch. I am under an extreme time crunch. Oh also the email form is located in an MC on the maintimeline. Please any help!
View Replies !
View Related
A Two Hour Presentation
Hi. I need to create a Flash file that includes jpegs, an mp3 file (speaker), a few embeded video clips of the person speaking, and allow the viewer to control the entire presentation (RW, Stop, Play). I've done this before but the presentation was 20 minutes long. Is it possible to create this two hour monster?
View Replies !
View Related
10 Hour Countdown
Anyone know the code to display a countdown from 10 hours to 0 displayed as 10.00.00 for example. I've searched here and found a few countdowns to xmas etc. but they seemed overly complicated and I'm having a little trouble working it all out. I'm sure there is a simple solution to this, any suggestions
Thanks.
View Replies !
View Related
[flash Mx/5] Day, Hour, Min, Sec...but What About Month
hi everyone... just got a simple question:
in the following code, which displays a set countdown in days, hours, minutes, seconds, how is it possible to show months? so that i can have months/days/hours
quote:
------------------------------------------------------------------------
currentDate = new Date();
// note: flash starts to count months from 0, so January is month 0 and December month 11.
// the date here is expressed as follows: Year, Month, Day, Hour, Minutes, Seconds.
endDate = new Date(2002, 11, 31, 23, 59, 59);
days = (endDate-currentDate)/1000/60/60/24;
daysRound = Math.floor(days);
hours = (endDate-currentDate)/1000/60/60-(24*daysRound);
hoursRound = Math.floor(hours);
minutes = (endDate-currentDate)/1000/60-(24*60*daysRound)-(60*hoursRound);
minutesRound = Math.floor(minutes);
seconds = (endDate-currentDate)/1000-(24*60*60*daysRound)-(60*60*hoursRound)-(60*minutesRound);
secondsRound = Math.round(seconds);
// Check when to put day and when to put days
if (daysRound == 1) {
dy = " day ";
} else {
dy = " days ";
}
if (secondsRound == 60) {
secondsRound = 0;
}
if (minutesRound == 60) {
minutesRound = 0;
}
if (secondsRound<=9) {
secondsRound = "0"+secondsRound;
}
if (minutesRound<=9) {
minutesRound = "0"+minutesRound;
}
if (daysRound<=-1) {
timeRemaining = "endDate introduced!";
} else {
timeRemaining = daysRound+dy+hoursRound+":"+minutesRound+":"+secon dsRound;
}
------------------------------------------------------------------------
any help appreciated as always, thanks
miss parodius xxx
PS - isn't there any way of kerning the text within a dynamic or input text box?
View Replies !
View Related
Adding Strings By The Hour
Can't seem to get what I want from this code. Have been at it for hours all diff. ways.
_root.Corp.One.slideHolder.loadMovie("Images/TestPics/" + _root.flw + ".jpg" , "slideHolder");
When I trace it the code puts it in the right order but does not go get the file. When I put in the address without the variable it gets the file just fine.
Help would be welcomed.
Andy
View Replies !
View Related
Change Text Every Hour
Hello!
I have a problem that i hope someone here can help me to solve.
What i have:
A basic digital clock
A textbox
What i want:
Every time the clock passes one hour, i want the text to change. For example:
Say i have a textfile with the text i want to appear every hour. Like this:
20:00 "Hi"
21:00 "Hello"
22:00 "Growl!"
....
How can i get the text changed every hour?
Thanks a lot for any help :-)
Amund
View Replies !
View Related
Switching Images Each Hour
Q- What is the best way to set the file up to switch between two frames each hour.
I have a presentation for the company reception that is going to display the company logo along with other information the project is pretty much complete now but to prevent the company logo burning-in (this is where an image that is constantly on the screen leaves a permanat mark) I would like the move the logo from the top of the screen to the bottom each hour.
View Replies !
View Related
UTC Issue With Not Displaying Hour Of Only 12 PM?
I have a clock running off of UTC time that displays another timezone. Everything works and displays fine EXCEPT when it should be 12pm yet will display 12am! When it hits 1-- it displays 1pm (which is correct) and correctly displays all other times. What is happening between the hours of 12-1? It refuses to display PM time for 12. It will display the correct AM time (it doesn't leap to PM).
PHP Code:
var today:Date = new Date();today.setUTCHours(today.getUTCHours() + 8);var date = today.getUTCDate();var month = today.getMonth();var year = today.getUTCFullYear();if (year == 2008 && month == 7 && date >= 9 && date <= 25) { var elapsed = date - 8; count.daysElapsed.text = elapsed;}else if ((year == 2008 && month == 7 && date > 25) || (year == 2008 && month > 7) || year > 2008) { gotoAndPlay(109);}else if ((year == 2008 && month == 7 && date < 9) || (year == 2008 && month < 7) || year < 2008) { if (date == 8) { gotoAndPlay(120); } else { gotoAndPlay(116); }}
View Replies !
View Related
Automatic One Hour Countdown
Well I'm looking for a way to have an automatic one hour countdown that counts down to the next hour. Every hour again and again.
Right now I modified kiruupa's countdown in a way as somewhere is mentioned on the site. As for now I got an external txt file that holds my data
&thisMonthDate=6&
&thisDayDate=10&
&thisHourTime=20&
&thisMinuteTime=00&
for example. This way we I need to change the txt and not the swf file. Still it would be great if there's a way to modify the txt file in a way I'd need to change it only once a day (or so that it allows me to select the hours to which it need to count down to)
>> let say count down from 2 till 3, and 4 till 5 o'clock or so... and be able to skip hours.
Any help would be great. Tnx
View Replies !
View Related
24 Hour Shared Object
I am new to shared objects. I am trying to make a poll where people can only vote once every 24 hours. So, to keep it simple, how would you write a shared object to make if statement to say that you can do 'this' only once a day. No real security measures need to be taken just a simple yes or no. Can anyone help - thanks in advance!
View Replies !
View Related
Streaming Audio For 1 Hour
Hello,
I have this little interface that has a stop, pause, and play button to play some streaming audio. It also has a slider bar so that they can rewind or fast forward through the audio. Here's the problem... The audio is 1 hour long. I have a little ticker that counts how many minutes the audio has been played, so if they are in the middle, the ticker will read "30:00". When the ticker reaches 21 minutes, it stops ticking and I can't slide the slider bar forward. However, the audio keeps playing. To stream audio you have to have as many frames in the timeline as there is in the audio. So I have something like 70,000 frames in my movie... maybe even more. My thought is that the timeline isn't built for that many frames, so the streaming keeps going even if the timeline is out of space. My question is, is there any way to do this? I think I have to stream the audio to be able to keep the play and pause button as well as the slider. I borrowed this little interface and have attached it here for you to view. It calls a seperate sound file that is the entire audio stretched out across the timeline.
Any thoughts are appreciated.
Thanks!
View Replies !
View Related
Play A Playlist By Hour Of The Day
Hi all!
First of all, this is my first post so... Hi!
I have a tricky problem! I used flash a bit for simple things. I find it easy to use as a design tool and powerfull enough to do... well, just about anything!
The background:
The problem is, I'm involved on a project that is starting on my university which basicly is a closed circuit TV that displays weekly (and daily news), some other information but on the main screen I would like to show videos (kinda like bloomberg channel). I think it's easy to do everything in a flash movie, full-screen it and then display it in a couple of screens across campus. (as you can see it's nothing very pro).
The Actual Problem:
The only problem is that I would like to set a couple of playlists and have them play by hour of the day and always loop while in that period.
For example: Loop playlist A from 10h to 12h, playlist B from 12h to 14h, playlist C from 14h to 16h etc.
It would be very great if I could have the playlists saved on a txt file or any kind of file so I could edit them in a easy way (like an html form).
Can you guys pleeeeeeeeease help me?
Thanks for your time!
View Replies !
View Related
Once An Hour - Flash Cookie?
Hi,
I'm looking for help with writing the actionscript for my movie to play just once an hour in a browser.
I'm assuming I would use the local shared object to set a cookie, but not sure how to insert in the once per hour variable/scripting. Or maybe it's code to set up the cookie to expire after an hour.
I've attached the local shared object code I am using so far.
Thanks.
Attach Code
stop();
mySharedObject = SharedObject.getLocal("savedObject");
_root.onLoad = function() {
if (mySharedObject.data.visited) {
_root.gotoAndStop(230);
} else {
mySharedObject.data.visited = true;
mySharedObject.flush();
result = mySharedObject.flush();
if (result) {
//all good
} else if (!result) {
//user at never -- prompt user
System.showSettings(1);
}
}
}
View Replies !
View Related
Flash App Disconnects From FMS After An Hour
I have developed a Flash chat for a client using FMS2. The application is used by goups of 5-15 people, who will use it for up to 2 or 3 hours in one session, sometimes even longer.
Many of our users are complaining that they consistently get disconnected after about an hour. They can usually log back in immediately. Are there any known issues with connections being lost?
A second problem I'm facing is that periodically my entire interface(AS2, SWF7) stops interacting properly. No user input(click actions, text input) is received, and several animation scripts stop updating. However, the application is still connected and new messages are received. Again, users report this behavior consistently after an hour. I know that is an extremely ambiguous problem, but I've been going crazy trying to isolate the problem, if anyone has even a guess, I'm all ears.
A few facts about the chat:
- It uses a persistent RSO to store chat history
- Chat messages are sent from client to server, and processed by server and put in the chat RSO
- User listing and info is in an RSO, which is created by ther server and modified by the clients. It is modified frequently by all clients when they type, setting a "isTyping" flag to be rendered by their name on each clients user list window
- I'm using a complex custom message renderer, which includes emoticon support and dynamic attach/removal of message clips when scrolled(to prevent application slow down as the chat history gets long).
- Our users I believe are are using somewhat older computer equipment, and are fairly minimal in computer literacy/experience.
Any help would appreciated.
View Replies !
View Related
Countdown To A Specific Hour?
I have used a countdown window to the opening of a new restaurant.
_http://www.wheelhousefalkirk.com/
The timer counts down to midnight but the restaurant opens at 10 am on the 18th.
Is there a way to countdown to a specific time?
Here's the Action script I'm using....
Quote:
this.onEnterFrame = function() {
var todayate = new Date ();
var currentYear = today.getFullYear();
var currentTime = today.getTime();
var targetDateate = new Date(currentYear,11,18);
var targetTime = targetDate.getTime();
var timeLeft = targetTime - currentTime;
var sec = Math.floor(timeLeft/1000);
var min = Math.floor(sec/60);
var hrs = Math.floor(min/60);
var days = Math.floor(hrs/24);
sec = string(sec % 60);
if (sec.length < 2) {
sec = "0" + sec;
}
min = string(min % 60);
if (min.length < 2 ) {
min = "0" + min;
}
hrs = string(hrs % 24);
if (hrs.length < 2 ) {
hrs = "0" + hrs;
}
days = string(days);
var counter:String = days + ":" + hrs + ":" + min + ":"+ sec;
time_txt.text = counter;
}
thanks
View Replies !
View Related
1 Hour Publish Times
not a very complex fla, has quite a few loaders from the components menu, they load jpgs from a server. very few jpgs, mostly text, a few tweens.
the individual scenes dont take long at all, only seconds. any ideas on why the super long test movie and publish times?
i would gladly send someone the fla if they were kind enough to help a poor guy out over here and look at it.
thanks
View Replies !
View Related
|