ActionScript 1/2 :: Unable To Output The Time Returned By The Php
Feb 15, 2011For some reason I'm unable to output the time returned by the php. This code is on my website and viewrs from different countries see different times.
[Code]...
For some reason I'm unable to output the time returned by the php. This code is on my website and viewrs from different countries see different times.
[Code]...
I'm trying to use the Simple Encryption Key Generator Class found here - http:[url]..........Everything seems to working properly except the hash encryption key that is returned is the same string every time (as mentioned in the the comments of the link above). locate an updated version of this class.
View 1 RepliesI'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]....
i need a function or a property that returned the current value of the time line
View 1 Repliesi need a function or a property that returned the current value of the time line
View 1 RepliesI've set up FlexUnit in my app, I want to debug a test using trace, but im not sure how to get flexunit to traceto the flashlog file. Here's part of my test task in ant, I thought the 'localtrusted' property would help, but it doesnt seem to. In my logs I get the testcases only, none of my traces which are inside my tests.
[Code]...
I have an AS3 program that calls a function multiple times. The function must return multiple variables, so I created a class for the function to declare an object containing all of these variables. For example, here's my class:
package
{
public class PER
{
[Code].....
Let's say the calling program calls the function, which returns the variables into data_set1 (where data_set1 depends on input variables arg1, arg2, arg3) using:
var data_set1:PER = function_name(arg1, arg2, arg3);
The calling program does some stuff, then calls the function again, but returns the variables into a new variable name, data_set2:
var data_set2:PER = function_name(arg4, arg5, arg6);
My intention is that data_set1 and data_set2 are different (e.g. not linked together).
My question is, given that arrays are passed by reference, will data_set1 be modified to agree with data_set2 upon the 2nd function call? Why or why not?
I'm working on updating a quiz game my employer has. One problem I encountered was that the timer that runs during the "exam" mode of the game wouldn't work, so I found a work around by replacing it with a timer that did. All that it is, is a dynamic text box on the first frame of the questions, with the following script embedded in the start button to make it run:
start_time = getTimer();
countdown = 7200000;
onEnterFrame = function () {
elapsed_time = getTimer()-start_time;
[Code]....
When the game ends following the completion of question # 20 (there's about 200+ questions programed into it, with the 20 chosen at random) the game is redirected to a frame with results page; and here the time stops, using this code: count=(stop); Rudimentary, but effective - at least in stopping the timer. On this page is the option to save the results, with input found on this page (score, name, date and time completed) being output on another page, in a form the user can save or print off. What I can't figure out is how to output the elapsed time paused in the resutls screen, to dynamic text box in the save form. What script do I want, to send this information to the proper text box at the end?
This is my code:
onClipEvent(load) {
test = new Date();
}[code]....
But the output is always the same number the whole time. Is there anything wrong with my code?
I have a C executable (named myprogram). When I run it by ./myprogram I get some output statements on the standard output of my Linux shell. I used run.php to get access to whatever is being printed to the standard output:
#run.php
<?php
$output = shell_exec('./myprogram');
echo $output;
?>
Then I called an HTTPService having id="service" to access this run.php file and I also set the text attribute of a TextArea to {service.lastResult}. When I run my Flex app, the interface kind of halts for a moment and then the TextArea displays all the 20 lines at once. But if program is run from Linux shell they appear one by one. Is there a way by which I can display a line as soon as it gets printed to standard output? This will then make the TextArea show the output in real time.
Or is Flex unable to do this? Rather how can a PHP program achieve such effect i.e. showing, whatever is being printed on standard output, concurrently in the browser in real time? Myprogram outputs 20 lines each after some microseconds. I want only the first line of standard output to appear in TextArea of Flex or in the browser (but in real time) while the program may then continue running the program.
Does the getTimer function affect the output time? so it's seen different in each country? I've created adigital clock using the time received from a php. Customers see a different time than mine. (php file works perfectly and output the time in my timezone).
View 3 RepliesIs it somehow possible to output the traces in a deployed application to a display element?'m aware of the debug deploy in Flash Builder, but unfortunately I can't convince my iPad to work with that,Edit: On second thought, a full console output would probably be best. The flash console kostik suggested looks pretty good, so making it display the console output would be ideal.
View 2 RepliesI need to be able to detect if the input a user types into an Input text field is not a number (NaN). I thought this would be a breeze, but I am having trouble. First I created a function that sets a new variable equal to the input value multiplied by 1.Code:valuetest = value*1;For testing purposes I placed a temp text box on the stage (var: valuetest). Sure enough, when the function is called and if value contains anything but numbers, valuetest becomes NaN. Then later on the timeline I check what valuetest is.
Code:
if (valuetest == "NaN") {
gotoAndPlay("error"); }
[code].....
I am loading an external swf animation and playing an audio which should be synchronized with the loaded swf i have used the loader class for loading swf and sound channel to load sound, when the audio gets fully loaded only we are calling function to load swf, at that time audio remains stopped when the swf too gets fully loaded, we are adding swf int stage and playing the audio. In local system it works fine but when we upload it its not synchronizingly properly for the first time The issue what i see is that swf (only one is there) gets loaded frome inbetween ie the first ceration animations are missing. and audio is playing from the begining why is it so....
View 1 RepliesI've been playing with prototype a bit and I've noticed that either it isn't as static as it should be or that some functions are protected from altering, or that in some cases the prototype actually extends a function. For example, I was trying to modifiy the global trace function to output the current time of a trace action, something like this :
Code:trace("lulu"); // output 12:48:17.286 lulu I DID achieve something close to it, but it seems that I haven't actually modified the global trace function, but rather it's "_root" counterpart,
[Code]...
I'm quite new to AS3 (coming from php/c#) and like it very much. My problem: trace doesn't output anything in the Output window anymore?!
View 2 RepliesI'm quite new to AS3 (coming from php/c#) and like it very much.My problem: trace doesn't output anything in the Output window anymore?!
View 3 RepliesI'm teaching myself ActionScript and the book I'm reading just got into input text capabilities. The book shows me how to link input text to a variable and output that text to the output window using trace. My question is: how can I display the text that the user input onto the actual movie. For example... if I wanted the visitor to type their name into the input text box and click Submit and then a phrase shows up with their name such as "Hold on Name, my site will be done soon." How do I reference that variable and have it actually display in my movie?
View 5 Repliesvar nextY = 0;
var nextY2 = 18;
for (var count = 0; count < result_lv.typeCount; count++)
{
[code]....
The type count is correct but the information for the project is wrong.
I work with Flash Pro allmost 11 hours per day and every while i get a error which messes up everything. Approximetly i get this after about 2-3 hours withevery project.After i get this error there is no chance to test movies afterwards.I see a fast flash of the loader window but it dissapears so fast i cant even really see if it is loader.
View 1 RepliesI've set up a holder flash file that checks an XML file every 30 secs, and if the content has changed loads a new movie into itself. I am getting mixed results and baffled why this is not working consistently - the XML is being read successfully, but the attributes that should be read from the XML are being returned as 'undefined' for some reason.[code]...
View 3 RepliesI'm trying to debug my player, which is having a problem loading xml files from IE over https.
I tried putting in the following code:
[code]
xmlLoader.addEventListener(HTTPStatusEvent.HTTP_ST ATUS, httpStatusHandler);
[code]
With the function httpStatusHandler firing an alert when it is hit:
[Code]....
When I load the player, nothing happens. What does this mean? Have I done something really stupid?
I'm creating a registration form that contains a 'chain-select' series of ComboBoxes. In other words, select an item in the first CB and display the results from a mysql query in the next CB.
PHP returns the results in an XML String (Code: Select allecho "returnXML="$returnXML; ). All is working great up to that point. What I would like to do is loop through the Code: Select allXMLList, running Code: Select alldataP.addItem({label: newData}); for each node. The problem is that the Code: Select allXMLList.length(); function is returning a value of 1.
Code: Select allxmlList.hasComplexContent() returns 'true' which, i believe, would indicate that the XMLList is being created successfully.
Here's a bare-bones version of the code that should be sufficient for solving this problem.
AS3:
Code: Select allimport flash.net.*;
import fl.data.DataProvider;
var dataP:DataProvider = new DataProvider();
var newData:String;
[Code]....
I have a PHP file that sends different amounts of variables back to flash depending on what the user has done.
I was wondering if there was a way of counting these variables in the event.target.data so I could make a for loop?
[Code]...
This is my first crack at writing a class and after reading up this is what I have. Essentially, I want to be able to write var txt:adamsboxmaker = new adamsboxmaker(parameters); and have txt be a display object from the returned MovieClip. But that's not happening.
I think I have the recursion working properly, but I'm not able to get the originally requested item's property set to the right value.The goal here is to find the topmost parent (or "ancestor," depth = 0) of the nested item (a taxonomy based on Dictionary "parent" attributes), and assign that originally requested nested item's "ancestor" property accordingly.For instance, in
Apples
- Red
- - Empire
- - - Fresh
"Fresh"'s ancestor should be set to "Apples." While I'm attempting this on an "on-demand" and individual basis, I'm open to a solution that tags all children that are related to the same ancestor in one fell swoop or for statement, since that would probably be more efficient.
REQUEST
for (var mc:Object in taxonomy) {
var term = taxonomy[mc];[code]....
As you can see, while the recursion does find the root, the originally requested item still gets the default value.
I am trying to call a functoin which will use the xml object to retrieve data and return the data to the function call. When I trace "test_var" inside the "book_xml.onLoad" functoin, it works. but I can pass the xml data out of the get_data function.
stop();
//define function
function get_data(id) {
[Code]....
The more I get into haXe and cpp the more I'm wondering this about as3. Iteration in as3 is easy in comparison to those languages. But if Array extends Object, overriding getters and setters to create what's basically an IntHash<string> or map<int,string>, and which only takes an int as a key, then why shouldn't the key iterator also return an int? Why does it return a string?
View 5 RepliesIf an AS3 method returns a reference to a complex type, is there any way to make that 'readonly', like how you can have const member functions in C++? An architecture I want to use calls for a class building itself from a passed template object... and really the template object should not be modifiable. I'm currently forced to add call-back enumerators and/or lots of extra accessor methods.
View 4 RepliesI am developing a chat application using flex, which can use different service providers users like gmail,yahoomail,ami etc. Almost similar like meebo.com.
I am using jabber server. My question is what kind of information jabber returns.I am getting userid,password,status,status message but I am not getting address or phone number of the user or picture of the user..
Please let me know,how can I take these values and what should I pass to jabber server to revcieve full information from jabber for different service provider's users.