ActionScript 3.0 :: Flash - Keep Animation Running While Receiving Large Data File?
Feb 3, 2011
I'm developing a web application with Flash CS5 and AS3.0. The problem I'm having is this:At a certain state, the application goes to a frame with a "loading..." animation that loops continuously until the next state is reached. The animation is inside a MovieClip that lives on this frame on the stage (I'm not creating or animating it dynamically). While in this state, the app is waiting to receive a large xml file from an XmlSocket connection. The file takes a few seconds (literally - not milliseconds) to be received fully by the Flash player, and during this time the loading animation stops. I believe the socket is blocking the animation thread until it's done receiving the entire file.Does anyone know of a workaround that would allow the animation to keep playing while the socket is receiving? I've seen pseudo-threading hacks, but those always deal with computations or other activities that can be accomplished by calling a call-back function multiple times. Since I'm just listening on an open socket, there's no callback I could pass to a pseudo-thread.
View 2 Replies
Similar Posts:
Jul 9, 2011
I want to retrieve data from a Database and display inside a datagrid in a Flex web application. The way I'm thinking of doing it is :
Send the Query data from .mxml file to the .jsp page using HTTPService. In the .jsp, connect to the database and retrieve the data using select statements. send the results back to the .mxml using HTTPService.
I know what to use but I have an ambiguity. In the (.mxml) I use xxx.send() to send the data. What do I use in the (.jsp) to send it back ? I know that I should store the results in an XML in the .jsp file, but how to do that ?
View 1 Replies
Jan 18, 2012
i am looking for some kind of library which does CRUD easily using PHP and MYSQL.My goal is to make some app in flash AS3.0 , where i will be receiving some data from user and storing in data base , and perform CRUD opertaions. I dont want to be so much involved in writing php and sl query.My scenario is:
Data types : [ like user_profile data, etc]
add under data types 1 to many fields with various types..
Database tables and realtions etc should be done by my DREAM library, then user when select a Dtat Type, he is presented with related fields to fill up data.
I will be using Flash AS3.0 ( Builder or IDE ) to perform .If only i can find some php library i think AMFPHP can connect flash with php
View 2 Replies
Jul 24, 2009
I'm trying to stop an animation running that I've imported from an .SWF file.I've loaded it using the new URLRequest method, but now I can't seem to talk to it.Is it possible to Talk to it, or should I just leave it in the Library and pull it from there.
View 2 Replies
Aug 1, 2009
can an an swf file save data to an xml file while running?
View 4 Replies
Apr 2, 2011
This is something I noticed on the Adobe documentation pages.
When receiving a textfile from a URL, the function to set the text will either look like this:
function completeHandler(event:Event):void {
var txt:String = URLLoader(event.currentTarget).data as String;
tf.text = txt;
[Code].....
View 2 Replies
Apr 18, 2011
I'm building an action that basically handles receiving post data from a flash app,I have no problem receiving the data. after that, it should redirect to another controller/action.I tried Redirect, RedirectToRoute, none of them worked.[code]
View 1 Replies
Jul 29, 2011
I know this is frequently asked, but I have looked all over the internet to find the mistake I'm making with the code I've used to send and receive data from AS3 to PHP and viceversa.Can you find the mistake? Here is my code:
AS3:
import flash.events.MouseEvent;
import flash.net.URLLoader;
[code].....
View 3 Replies
Jul 20, 2011
I'm trying to make a barebones, simple flash client communicate ANYTHING to a server over a regular socket. I setup the listeners:
socket = new Socket();
socket.addEventListener(Event.CLOSE, closed);
socket.addEventListener (DataEvent.DATA, onSocketData);
[code]...
And then I connect. On the server side I have a simple policy server on port 843.And then the real socket server that the flash client is connecting to.The flash client connects to the policy server and gets the policy. The flash client then connects to the actual socket server. I know this because I can both see it when snooping the network traffic and the fact that the Event.CONNECT fires off. From snooping the network traffic I can see the flash client send data TO the server when it:
socket.writeUTFBytes( "TEST CLIENT
");
From the server app I can see the data the client sent. The server then returns a little data. I can see this data going from the server to the client in the network traffic snooper. However, the client NEVER sees the data. It never fires off DataEvent.DATA or ProgressEvent.PROGRESS or ProgressEvent.SOCKET_DATA. There are no errors and the connection remains open for as long as I want it... but the flash client never seems to see the data... no matter how much I send.
Over and over I read online that the data sent to the flash socket needs to be terminated with a � zero byte. I can verify it is in the network traffic snoop.if I try to read any data from the flash app via something like readUTFBytes it always returns nothing found.
View 2 Replies
Jul 20, 2011
I'm trying to make a barebones, simple flash client communicate ANYTHING to a server over a regular socket. I setup the listeners:
socket = new Socket(); socket.addEventListener(Event.CLOSE, closed); socket.addEventListener (DataEvent.DATA, onSocketData); socket.addEventListener(Event.CONNECT, connected); socket.addEventListener(
[code].....
View 1 Replies
Sep 11, 2011
I am trying to send a server "schooltraq.com/api/" variables for a request.My Code:
package
{
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.events.*;
[code].....
How ever when I keep getting back "error:empty request". I emailed the site owner and he said that my program may be dropping the data during redirects.[URL]
View 1 Replies
Jul 12, 2011
I'm doing photo gallery and like to enlarge an image when I click on it with some animation like it's in flash (the picture slowly expands first by x-axis and after by y-axis and the space around the picture dims), that it scales to it's largest possible size to fit in screen, but it can be any other animation. I found some topics about this, but I don't want to use any 3rd-party plugin (including flash, drupal...) to do it. Maybe it can be somehow done by jQuery...
View 1 Replies
Oct 1, 2010
I m trying to receive some variables from a PHP file in AS3.
AS3 code :
package {
import flash.display.MovieClip;
import flash.events.*;
import flash.net.*;
public class bakar extends MovieClip {
[Code] .....
The problem is I am getting output as :
Code:
username is undefined
email is undefined
I am using a WAMP server.
View 2 Replies
Nov 2, 2010
I'm currently working on a project where I generate a large amount of audio data to be stored on a users machine.
It works fine for small amounts of data but as the memory usage grows the flash application begins to struggle and eventually dies.
I've been thinking about possible ways to overcome this problem and I was thinking instead of storing all the data in memory (sometimes up to 100mb) a possible solution may be to stream the data to a server (44100 float numbers per second) as it is is being generated then once the accumulation of data has ended sending it back to the client.
1) can you see any problem with this idea and if so could you offer a better alternative?
2) could you reccommend a good server technology to achieve this?
Edit 1
To add more detail.
I am generating audio on the client using the sound.extract method. As the audio is being sent to the speaker I also send it to a byte array.
Once the user has hit a stop button I prepend a wav header to the audio data in the bytearray and allow the user to download a wav of the audio they have just being listening to.
Ideally I didnt want to impose a limit of how much data the user could save. This may not be possible.Storing all this audio data in memory was causing severe performance problems in flash. I don't know of any way to incrementally store this data on the client machines so I was thinking a solution may be to incrementally stream the data to a server somewhere to reduce the memory load.
View 2 Replies
May 20, 2011
I have a large flash project and I'm trying to figure out the best way to handle it. I want to load in an XML file of groups and their members, and a bunch of attributes related to each group and its respective members - but these groups and members are only displayed on screen after a user clicks on their parent groups. My first thought was to just pull in the XML for the whole tree of groups and users, then assign movie clips for the groups, and attach properties related to their display and how the user will interact with them - but if they may never appear on screen, is it pointless to do this? How do I best structure this project? Build an object and attach properties only to the object, then add display data only on click?
View 2 Replies
Aug 31, 2009
I am writing in reference to Visualizing LARGE Data Sets .
Apparently, using the underlying Flash API for drawing:
g.beginFill( o.x * 0xFFFFFF, 1 )
g.drawCircle( o.x * w, h-(o.y * h), 2 );
[code]......
View 1 Replies
May 31, 2010
my first flash webpage sends data to a php script. I then do
var result_data:String = String(contactLoader.data);
if (result_data == "ok")
{
navigateToURL(strURL, "_self");
}
So if the data is sent with no problems, it will load up my new url. Problem is, this new url needs this data to display it. So, if my php file holds the data in variables, how can my new url retrieve these in real time? (meaning that data goes straight from swf to php to new swf) I have been trying LoadVars, but not sure if this will work in real time, maybe it will.
View 8 Replies
Feb 28, 2012
Not getting data back into flash from php that queries mysql data, think the problem is with my as3 code here?The php works, the as3 posts to the php ok, its the returning of the variables to as3 that I am unsure about and seems to be the problem?
public static function MineData():void{
var myRequest:URLRequest = new URLRequest("login.php");
var myLoader:URLLoader = new URLLoader();
[code].....
View 1 Replies
Jun 29, 2010
I'm setting up a kind of database, where the data are coming from a specific url.
I receive the source code of that url, get the data I look for, and display this in a text box. This works fine as long as I start the swf locally. However, when I copy the swf to my home page, the data obviously cannot be received anymore.
To make it more clear (with fictional url): Homepage [URL] contains the swf; tries to automatically read and display the source of [URL]
View 11 Replies
Aug 4, 2009
We are thinking of adding a feature to a main page of a flash site that I will be building shortly, but it requires sending data out to an API where it will be processed and send back to Flash.The form will need to post a number of variables to a URL and then interpret the response code.. is this possible in AS2?
View 9 Replies
Aug 4, 2009
I'm writing a flash chat program using XMLSocket.It's connecting and sending data just fine. The server is sending the data back just fine (I checked the packets on Ethereal), but Flash is just not receiving any data.[code]The server is a Java server written with the NIO classes.
View 2 Replies
Jun 10, 2009
I want creating an interactive cd rom using xls file, is it possible to read data on an swf animation from an excel file?
View 5 Replies
Sep 28, 2008
I have a problem with my code that I've realized to read data from txt file. My problem consist to receive data by call a method I've try a lot of ways but I'm not to be able to resolve it. I attach my code. This code is a class.
View 8 Replies
Jul 29, 2011
I'm goofing around with developing a Flash game that would be accessible via a Facebook application but am still trying to figure out how I want to organize the game itself. The game essentially is an educational game with competitive components - completing tests faster results in more points with which you can customize your avatar and other items in the game. Also, passing certain "lessons" open up new lessons. So the major components I see are:- Player data storage (scores, progress, etc.)- Social connections - transference of rewards, comparing high scores, etc.- Lesson data (what questions to ask, possible answers, etc.)How is this best controlled? PHP and SQL? XML? Should I use datagrids as an intermediary? I'm having a lot of problems finding good information, both on the internet and at the bookstore about how to manage this.
View 3 Replies
Dec 21, 2009
it seems that Flash was supposed to run in a sandbox in the browser. But, if Flash can get data from a remote server, can it similarly get data from localhost IP on the same machine? In other words, can I use a Windows app that provides a TCP socket on localhost to feed data into a Flash app?the answer is yes at least for the case of an SWF file hosted in the file system, URL...(turns out the localhost access error can be fixed if you add the SWF app to some security whitelist). Still wondering if this can also be done for SWF apps hosted on the network.
View 1 Replies
Jul 18, 2004
I've begun playing with Flash and XML Socket Servers and I thought I started taking to it easy, I was able to connect and disconnect to a socket server I wrote and Unity but I seem to be having problems sending and/or recieveing data. I wrote a small amount of code to try it out:
[Code]...
It seems to be connecting fine but when I click and I try my send,
View 2 Replies
Apr 16, 2010
I have the following form code in my HTML, basically including a couple of hidden input fields and the Flash object (disregard the missing <object> and <embed> values):
[Code]....
View 1 Replies
Apr 6, 2010
The component itself receives all its parameters from a .txt file. The editor is a read/save form that initially loads the parameters into it's form fields, and then overwrites the .txt file when the user hits submit. You then refresh the component on whatever website you have it to see the changes.Here's the php code that I found to get me going:
<?php //Capture data from $_POST array $title = $_POST['Title']; $comments = $_POST['Comments']; $image = $_POST['Image'] //Make one big string in a format Flash understand $toSave = "Title=".$title."&Comments=".$comments."&Image=".$image;
[code].....
View 2 Replies
May 26, 2010
I'm working on a project currently and need to import a large file FLV into flash. It's not over the 16000 frame issue as I've checked this. I'm in Flash CS4 and have an animation in 1080p res. It will import up to about 4653 frames fine but it will be only part of the complete file. Is there any way around this? We're using this as a cross platform container to alleviate video programs and compatibility issues for training. In the Publish settings we can export for Mac and windows options etc.
View 3 Replies
Feb 22, 2010
I know that the best way to make a connection from my main app to my modules is through interfaces.
So, my problem is, how can I implement an interface so my module can send and receive data from my main app?, cuz, I understand that my module implements an interface that is used by my main app.. but, can I do it "viceversa"?
Other issue I have is, why do I need to call my main app children if I can just import a module's class?.
View 1 Replies