Php :: Sending Time With Timezone From PHP To Flash?
May 10, 2010
I am trying to send the time to flash but set to the currently timezone. When you view the below even though the echo date, looks like its working the $time is the same. When i test in flash I get the extra hour added.
i have been creating many flash clocks, but with the normal code, i mean, the code to show the time on every computer of each visitor.
What i must know is how to make a normal flash clock show the time of a specific world time zone, i know that they work from -5 , -4 ... 0 ... +1 , +2 ... .
So i have this flash clock, and it has this action script code:
I have a countdown timer that will be used for events that happen locally central time, mountain time, etc. However, if someone on eastern or pacific time (or any variation of the 4 timezones) looks at the countdown timer, I want to make sure that it shows the time relative to their timezone.I thought i could read the user's timezone offset (Date.getTimezoneOffset) and subtract from it the hardcoded timezone offset of the event (passed as a variable from XML depending on the event's "primary" timezone).
Am I getting the math here wrong? The "net" timezone offset from the user - the event timezone offsets SHOULD add into the countdown time.However, Date.getTimezoneOffset, regardless of my Mac or PC timezone setting/time, keeps showing an Eastern timezone offset of 5 hours. What's going on?The time is correct when I hardcode an event timezone offset to anything other than Eastern time. I think the problem is that it's not getting a user timezone offset OTHER than -5 hours for Eastern Time.Code for the timer is here (assume that the target event timezone has been passed in):
Code: this.onEnterFrame = function() { var today:Date = new Date();
I am programing a flash page but writing function to send two stings at the same time? In my case, I would send backwardH and backwardLI have has tested all three options, but there is no error but either backwardH or backwardL movieclipet gets affected, not both at the same time though I would like both to be influenced at the same time. For example if I click button_1 then movieclip_1 and movieclip_2 would play. And if I click button_2 then just movieclip_1 would play.
//Option1 family.margeAS3.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_3); function fl_MouseClickHandler_3(event:MouseEvent):void{ direct = "backwardH", "backwardL" ;margePa.play();}
//Option2 family.margeAS3.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_3); function fl_MouseClickHandler_3(event:MouseEvent):void{ direct = "backwardH" + "backwardL"; margePa.play();}
//Option3 family.margeAS3.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_3); function fl_MouseClickHandler_3(event:MouseEvent):void{direct = "backwardH"; direct = "backwardL" ;margePa.play();}
I have time in UTC format coming from a different application. Now i can convert it into browsers timezone and show the time properly.However the problem is I want to show the Short code for time zone instead of TZD that is used by default.
I've developed an FLEX application for distributed data administration. When our Asian employees specify a date, it will be saved +1 day.If I check my timezone offset it is +60, their offset is +520.
var dNow:Date = new Date(); trace("Your time zone offset: " + dNow.getTimezoneOffset() + " minutes");
I assume this is the problem? If so, would you suggest that I correct the entered date by 460 minutes before sending it to our server for saving? How to do that?
I'm working with an AreaSeries + DateTimeAxis in Flex 4. The dates for the time axis originate from a server in another time zone. I'd like to see the graph (in my local time zone) displayed using the server's time zone.I know that I can set the DateTimeAxis.displayLocalTime property to true or false, to have dates displayed in the local or UTC time zone. But the time zone I want is neither of those.Is there a simple way to make DateTimeAxis work with another time zone? Or even a complicated way?
i have a flash site that i need to put in a page a list of the food menu, in this site will have 6 menu's of food, and each menu is for one week, in first week will have the first menu untill the last week that is the six will have the sixt menu, than it will return in the beginning and starts again. Basically the menu's will make a loop in the weekends. I was told me that its better to do in javascript since it looks like in actionscript isn't possible, so i think ill export the info of a html page to a swf.My question is how can i control in javascript a event of a object whit my time zone and days.
I have a requierement in my project that i need to store 'US/Eastern EST' and day light saving 'US/Eastern EDT' in data base if client machine is in US/Eastern time zone. Because this gives clear identification instead of justing the chars like 'EST'. There is CDT in US region as well as Chaina too so can't relay just on three chars like 'EST'/'EDT'.
I am working on an application that is near the end of its development cycle and has mostly passed user testing. We recently realized that having flex convert dates to the client's local timezone is not desired, as all of our dates are in EST and contain no time data. Since BlazeDS sends dates in UTC, this results in the dates being converted to the day before in timezones west of EST.
The best solution is to go in and refactor all dates to adjust for the timezone offset, but that is just not doable at this stage. Since all dates in our application don't care about time, I would really like to be able to intercept all Date objects that come across BlazeDS and adjust for the timezone offset.
I am working on a site that has a clock but it displays in military time, is there a way to change it to regular time. The following is the Action script:
I've loaded a video into the FLVPlayback component and I'm looking for a way to get the total time and the time played so far and output them to two text fields so the end result would look something like "00:12/00:50".
Right now I'm defining the video by the components inspector but I'm eventually hoping to define this bit by actionscript as well.
What I am trying to accomplish is two simple analogue world clocks (which I had already done using Jquery) but IE has turned out to be the biggest nightmare to get this working correctly in - so I am trying a different avenue.
I have written a small script to retrieve server times which is below:
var ldr:URLLoader = new URLLoader() ldr.load(new URLRequest("http://chronos.csr.net")) ldr.addEventListener(Event.COMPLETE, onLoaded) function onLoaded(evt:Event){
[Code].....
do take into account DST as this was a slight pitfall I had even with JS (would have worked it out eventually but time is not on my side - excuse the pun).
I am having trouble on sending my data to the php..I am using flash cs 3 and the code is what I copied from a site. here's the code.[code]I pasted this code to the button named 'submit' and when I checked the script for errors, my script has an error! it says:Statement must appear within on/onClipEvent handler and I don't know what does it mean I am just newbie in flash cs 3.
Friend wanted a change in Email address and I'm assisting. I notice at the bottom it posts to a formmail.php file but I was wondering if there was an easier way to understand what exactly it POSTS and how AS handles POST methods so I can rewrite a script.
function playTier() { switch(this.tierContent.tier_txt.text) { case "Sinking Ship": bullseye_mc.arrow_ani._x = 205; break; case "Piggy Bank": [Code] .....
The BLOB field (pic) is turning out as 0 Bytes when trying to send ByteArray through as3 to PHP, so i assume the PHP script or the HTTP_RAW_POST_DATA isn't working.I think the Flash part is working, I have set a trace() to see if the bitmapdata is coming through and it seems it is, so I'm assuming its my php side.3
private function export():void { var bmd:BitmapData = new BitmapData(600, 290);
I have a flash file where I can pass xml from file : script type="text/javascript"> var flashvars = {}; flashvars.xmlSource = "XML.xml"; ... /script>
Can I send xml from php in varible to flash example: $xml = "?xml version="1.0 ..."; script type="text/javascript"> var flashvars = {}; flashvars.xmlSource = ?php echo $xml; ?>; ... /script>
I am currently working on an online connect four game where the state of the game needs to be updated after ever move. i've had no problems sending variables from a php script to flash but i'm having difficultly sending variables from flash to php when trying to update a database. i am getting this error message:
The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs.
To try an understand the process and figure out what i am doing wrong i've stripped down both my actionscript and php files to the bare minimum but still it wont seem to work. here is my actionscript:
Code: var game_id:String = "1"; var postURL:String = "updateMoveScript.php"; var variables:URLVariables = new URLVariables();
[Code]....
i know the php query is fine as i've tested it by changing the $game_id variable to the value i want to send.
i've tried changing urldataformat from variables to text and also messed about with changing post and get and about every different possible combinations of doing this but with no joy.
I am creating an online video for a client. I have it set to play the video in frame 1 and then go to frame 2 once the video has completed. What I'd like to do is have it automatically send me an email once the person has reached that 2nd frame. Is there a way to do this? It wouldn't need to have any kind of form or anything. Just a simple message saying "Fred has watched your presentation".
how to send data from a flash to a database and how the receive it aswell. Im presuming you pass the data from the flash to a php file to the database when sending and call the data using a php file to the database aswell. What im trying to do is just have a button that will increment a number in a database by 1 and then display that information on a different Frame within the flash later.
Basically what i want to do if have a button pressed to increment a number in a database.
I want to send variables from my Flash (AS2) movie to a PHP file that would then process the variables and echo them, but echo in an HTML page. Basically, I want to make my Flash movie form the equivalent of an HTML form, in that, when it's submitted, it sends the variables by POST and opens the PHP page for the PHP page to process and deal with, instead of sending the variables and loading the response from PHP into Flash.
I've been unable to use loadVariables in the usual way that I do it. Actionscript Code: form.loadVariables("myPHPfile.php", "POST);
Because that sends the variables to the PHP file, but then does not open the PHP file in the browser. Is there anyway that I can make this work? How can I make the variables send from Flash and then open the PHP page in a new browser window, just like an HTML form would?
having an unusual problem sending vars to php. it is sending the var but my flash game is being unloaded off the site once the var is sent. if there is another way to send VARS please let me know, OR maybe my code is wrong.
Code:
function sender() { varsToSend = new LoadVars(); varsToSend.var1 = beatTimer;
If i send bitmap data from Flash AS3, to PHP and then PHP turns the bitmap data into a image file and saves on server... Would it take too much resources?I mean, The Bitmap Data could contain too much pixels etc does that affect the resources? If 10-100 people send data simultaneously is it going to cause problems.
So this is probably a simple question, but for some reason, I'm having problems with it. I have no ideia why, but I suspect the fact that sending a xml with full "< something >" tags may cause the php to behave wrongly.So all I need is to send (from a swf as3 client) a filename and a xml. The php will write a xml file with the required filename.
Everything should be okay with the php side, because I tried it using " $_GET " variables, but whenever I try using the flash client, It just doesent work, and the php log says that "the filename variable can't be empty". Whenever I try some static filename (not using GET or POST), it works.
EDIT: Code added.
var xmlURLReq:URLRequest = new URLRequest("www.url.com"); var test:URLVariables = new URLVariables; test.filename = "01.xml";[code]............
I was wondering... in the past it was never smart to send flash in emails, but now it's 2011, and I thought, would it be smart to embed flash in emails, and even possible?