ActionScript 2.0 :: Load Swf Depending Of The Hours Of The Day?
Oct 18, 2005
i want to have an swf loaded between 8am and 6pm and another one between 6pm and 8am. How can i do that? i guess it's not very hard but i don't get it. i suppose i need a variable with the hours. then do a if statment that check if the current hours is between 8am and 6pm. then if it's between this time do this if not do that..
I have 3 swfs of a cloud animation, one for the day, one for the evening and one for the night. I would like to load the day swf from 6 am to 3 pm, evening from 4 to 6 and night well...the rest..but honestly I dont know where to start or how to make flash read the computers internal clock.
Medium-load chat server using Shared Objects segfaults every few hours. Runtime size has been increased to 30MB (this saves it from crashing every 10 minutes). I have the core dump but don't understand what it means.
I need to load a SWF depending on a parameter in the URL ... how do I do in order to make flash recognize the RUL parameters? For example, I want that: [URL] load the index.php with an animation for utah, [URL] load the index.php with an animation for texas, and so on... how do i achieve this?
I have a MC which when user presses a button slides onto the screen. Within this MC is a number of buttons, with names like 'btn1', 'btn2' etc.I have already searched around and found a tutorial which shows me how to load images from an XML file.What I'd like to do is for each button in the MC, find the corresponding XML element and then load those images, then move onto the next button, until they are all done.So I'd imagine the XML would be something like:
im starting to get the hang of 3.0 now.. but i have a little problem loading different swf files related to witch button i click..
everything works just fine. when clicking on a button the movie plays and its listening for the end of each video playing.. but i cant get it to load different swfs depending on witch button is clicked. is it possible to do this using the same loader as i do now?
heres my code:
var compact:String = "axesse_mc.swf";var compactreq:URLRequest = new URLRequest("axesse_mc.swf"); var loader:Loader = new Loader();loader.load(compactreq);
Preloader hanging / freezing with "hiccups"I'm trying to do the following. I have a menu with 11 buttons and a xml. The user can select multiple buttons and depending on which buttons are selected it will be loaded images of the xml corresponding to the selected buttons.
The menu have to works as follows, for example, if I select the button 1, will be loaded X images, if I select the button 1 and 5, will be loaded X + Y images, if I select the button 1, 5 and 9 it will be loaded X + Y + Z images.
I'm trying to do the following. I have a menu with 11 buttons and a xml. The user can select multiple buttons and depending on which buttons are selected it will be loaded images of the xml corresponding to the selected buttons.
The menu have to works as follows, for example, if I select the button 1, will be loaded X images, if I select the button 1 and 5, will be loaded X + Y images, if I select the button 1, 5 and 9 it will be loaded X + Y + Z images.
I have a small gallery that loads thumbnails and the links they represent from an xml file. When I test it gallery on my computer everything works fine. However, when I simulate a download or when I upload to an actual site things start going wrong.[URL]I modified what i needed too and reused the rest. Everything works fine except for that the load order of the thumbnails is reversed. I haven't really changed any part of the code that would cause this, or at least I don't think I have.
The real problem, however, is that when i simulate a downloaded version or when upload them to my test site, the position of the thumbnails are swapped. A thumbnail i expected to load in a certain place and order has now taken the place of another one. When clicking a thumbnail it displays the picture of the thumbnail that should actually have been there, so the links still load in the correct order.When i change the simulated bandwidth while testing the movie, the position alter. At one bandwidth they show up in a certain order and when then trying out another bandwidth the order changes.
The XML load function:
Code: function loadXML(loaded) { if (loaded) { var xnRootNode:XMLNode = this; //trace( xnRootNode );
Is there a way for flash to detect a user's bandwidth, and depending the size of bandwidth, stop loading, or continue with the load? Now that I'm thinking about it, this would probably be a javascript detection script and if the bandwidth is high, load .swf, if not load a .jpg?
I want to show a full 24 hours along the datetimeaxis wherever the values fed into it happen to fall. I thought that setting the minimum and maximum of a datetime axis on the chart would have that effect.
so I have private function loadDayComplete():void{ //called when data is reloaded. also includes reassigning the dataprovider of the chart.
[Code]...
When I load up the function though it doesn't plot any points when the min and max are set. If I take out the minimum and maximum they show up fine! I double checked in debug mode that the minChartDate and maxChartDate are what they should be.. but maybe I'm misunderstanding how minimum and maximum are supposed to function... I also tried widening the min/max to include several days and still no luck. I also tried assigning the min/max when the chart data changes like so:
[code]This passes the date to another function that uses the date to see who in my office is oncall in the database and displays their name. The problem is, everyone that is oncall has to be oncall until 7am the next morning. So this works great IF they were off at Midnight each night. Is it possible to subtract 7 hours from this date?
use it for my final project to graduate with a CS degree. I did some basic animation type stuff around 5 years ago in school but nothing major. I want to make a website for a non-profit organization for my project. I know what I want to do, but I need to give my advisor an estimate of how many hours it will need to complete it.Here is a general outline of tasks I want on the website:Message boardBlogEmbedded videoPhoto galleryArchived newsE-commercestoreGuestbookCounterPollsApplications - games, instant messenger type thing (if I have time)
i am trying to create a 24 hour countdown clock that will loop and play backwards counting it self back down to 00:00:00:00, being new to flash As3 i am struggling to create this animation
00:00:00:00 hours:minutes:seconds:milliseconds
I have been given this code by a very helpful user
var timer:Timer = new Timer(1000); var currentSeconds:int = 86400; var milliseconds:int = 86400000;[code].......
the problem i am having now is do i need to add an instance name to the 00:00:00:00 design on the flash stage for the code to work as i have tried and i think im doing something wrong.
I have recently developed a standalone Flash entertainment system, containing Flash games and screensavers etc., i have also included a third party mp3 player.
The problem i have is the PC is left switched on daily and the system is used quite heavily, i.e mp3's playing in background while screen savers are displayed and games are played.
Everything starts fine but after a few hours the flash animations slow down to about 2 or 3 frames per second, then the PC will finally crash.
I am trying to create a 24 hour countdown clock that will loop and play backwards counting it self back down to 00:00:00:00, being new to flash As3 I am struggling to create this animation. The AS3 code I have put into my actions is as follows:
var timer:Timer = new Timer(1000); var currentSeconds:int = 86400; var milliseconds:int = 86400000; var result:String = ""; timer.addEventListener(TimerEvent.TIMER, countDown); function countDown(e:TimerEvent):void { [Code] .....
When I press to test the movie the numbers are still 00:00:00:00. Below I have attached a link to an image to give a better idea of where i am at with this animation: [URL]
I'm making a timeline with a moving car. It has to go from left to right in about 11 hours. I got this code and the car is moving from left to right:
[Code]...
But everytime I refresh my page the car is at the begin again. So I have to attach it to a Timer/date class to it so it stops at a certain point / time and date.
I am a game programmer and i have made a game where there is a character which has to select the right pieces and avoid the wrong ones. the pieces/food come from top, the character jumps and fetches them. Thats why we are keeping a gap between the pieces to avoid the character touching the wrong ones.
Problem : When I win the game and keep re-playing it continuously for more than an hour i notice that the gameplay gets slow(slow FPS). The behavior and movement of the characters become slow. Upon playing for 3 hours the slowness is easily noticeable. This also happens when I minimize the game window or get the focus off the game to some other window for a long time (half an hour or more). The problem doesn't come if I play once or if I lose the game and try again. This comes when I keep playing it for a longer time.
I am building a scheduling system. The current system is just using excel, and they type in times like 9:3-5 (meaning 9:30am-5pm). I haven't set up the format for how these times are going to be stored yet, I think I may have to use military time in order to be able to calculate the hours, but I would like to avoid that if possible. But basically I need to be able to figure out how to calculate the hours. for example 9:3-5 would be (7.5 hours). I am open to different ways of storing the times as well. I just need to be able to display it in an easy way for the user to understand and be able to calculate how many hours it is.
I'm hitting a wall on this one. My script finds the difference in hours between 2 dates, however..
var data:Array = ["2011-08-30 11:19:19", "01-09-2011 02"]; var aDate:String = data[0].split(" ")[0]; var dateElements:Array = aDate.split("-"); var date1:Date = new Date(); date1.setDate(int(dateElements[2]));
[Code]...
As you can see, the date elements trace out the way they should. Now try changing the first element of the data array to "2011-08-31 11:19:19". Although the date elements are fine, the last trace gives a totally weird value. What's even weirder is that when compiling this script a second time in Flash IDE, it takes a long time to compile, then traces nothing at all, as if the script times out.
As per title said how to calculate the hours and minutes for 2 diferent values eg; value 1 = 9.15 AM value2 = 2.45 PM So I want calculate how many hours and minutes between this 2 values.. 9.15 AM -----> 2.45 PM
i am trying to create a 24 hour countdown clock that will loop and play backwards counting it self back down to 00:00:00:00, being new to flash As3 i am struggling to create this animation
the AS3 code i have put into my actions is as follows:
var timer:Timer = new Timer(1000); var currentSeconds:int = 86400; var milliseconds:int = 86400000;
This is my first time skinning a scrollbar and I ran into a issue. The button I click and hold to scroll up and down changes in size depending on how much content there is. Is there a way to keep the button from changing in size?
For example if my scrollbar button was a smiley face and I didn't want it to stretch.
I am changing my scrollbar components globally by creating an instance of my custom scrollbar and applying it via the style manager in my code.
How to fix date to retrieve minutes/hours with zeros ? E.g. it's 05:09 AM > trace(_date.getHours()+":"+_date.getMinutes()); //5:9 But I want 05:09 instead of 5:9 - so how to add zeros? var _date = new Date(); _min = _date.getMinutes(); //fix date: var _str:String = _min.toFixed(1); _min = Number(_str); trace(_date.getHours()+":"+_date.getMinutes()); = 5:9 ....