Greetings everyone...
I've made a little flash, with AS3, to view the data generated by some program I wrote... The data is in a .csv file and are loaded to the memory with a URLLoader object.
The flash loads well .csv files which can come to almost 50 MB in size... But when I try to load a file with 160 MB, the player just stop working... I run the last flash player version, outside of the browser...
I've heard that the Flash has limitations on the amount of memory it can store... But in another question, they say it has not.
What may be causing the crash? - I don't think it is the code, since it runs smooth for small files...
Thank you in advance!
I did some quick googling and it looks like URLLoader stores the download in memory so there could be some limitations. Another Stack Overflow answer recommends using URLStream along with FileStream. I'd think this would be the most appropriate way to deal with large files based on my experience on other platforms. Are you loading from an http:// or a file:// url?
Working with flash now, it came to me the error:
Error: Error #1502: A script has executed for longer than the default timeout period of 15 seconds.
In the menu File > Publish Settings..., we can make the timeout period longer on the Flash tab.
I also found an implementation of something like asynchronous processing in actionscript... It's a very interesting approach and I'll try to implement my loading method that way...
Thank you all for your help!
Related
Is there any way to monitor the loading of the crossdomain.xml file?
I'd like report the load times of this file, since it seems to be intermittently taking longer than expected. There doesn't seem to be an event from URLLoader and Security.loadPolicyFile() doesn't allow any event listeners.
How can I get the load time for a crossdomain.xml file without requiring additional loads of the file?
When I ran into issues with crossdomain.xml, I read some basic stuff about what it was and how you can work with it. This is a "heavily simplified/not entirely true version of it" but it might serve as a guideline.
Crossdomain.xml-loading is owned by 'browser/flash initialization' and tells browser if 'any code' should be allowed to execute or not. Hence you can't really measure it since it's loaded prior to your code and in another environment.
There might be some way of finding it, it might have changed since I last tried to do that several years ago... but...
You can always measure it in another way, last app I used to troubleshoot issues in this area was Charles Web Debugging Proxy.
I'm looking for some suggestions or pointers on where to look or how to get started with a project for Windows Phone 8.1. The idea is pretty simple in my mind. I want to constantly record video to a memory stream only keeping say the last five seconds, then an event will trigger saving the video steam to a file on to the phone.
I was originally thinking I could save raw frames to a ring buffer and define the size based on the raw frame size * sample rate. Now I realize that might not work because the video provided by the MediaCapture class will be encoded. Digging on stackoverflow, I came across the idea of using MFTs but it sounds a lot more complicated than I originally had in mind.
Looking around the Development Reference material on MSDN, I'm guessing the MediaCapture class will be my friend. Can I somehow define a fixed size stream for use with MediaCapture.StartRecordToStreamAsync then on my event connect it to MediaCapture.StartRecordToStorageFileAsync? Or perhaps there might be a more appropriate way to do this that I should investigate?
Since i'm creating a stress tester for an FMS load balancer, i'd need to publish as many stream as i can , to see if the system will hold the load.
There's any way to send a local flv file through the NetStream.publish method?
After a little research, i found only the appendBytes solution, but it seems is not working.
Anyone has an example for this? or maybe a solution on how to fake a webcam so to send some bit of data.
Thank you all in advance.
Not sure if this will help you, but you could call functions on the server and pass large byte arrays (files, strings, whatever) as parameters.
Of course, this does not really count as a stream, but will put load on your server.
netConnection.call("functionName", responder(may be null), largeData)
I have a project that is getting pretty large. Large meaning lots of library assets and a pretty complicated folder structure in the library. The FLA file itself is 3,700kb and exporting a 630kb SWF …not too big. I’ve done much larger.
Starting yesterday when I save the FLA, the saving dialog appears and then I get a not responding on the dialog and I have to ctrl-alt-delete out of the flash. It happened at least 5 times yesterday over the day. It doesn't do it every time, but after I first open it, it gets progressively slower at saving then the not responding occurs.
I googled around and there’s a big thread on the adobe forum about it, but no real solution. People say its fixed in CS5 .5 but that isn’t an option for me. Has anyone experienced this or have a solution?
I've experienced this before and have tracked it down to a corrupt image in my library. First, try a Save & Compact.
If Flash crashes during this process, or if it still doesn't work when you do a regular save, go through your library and click on the images one at a time with the library preview open. One of the items in the library should cause Flash to freeze up, and that is your problem image.
Reopen Flash, hide the preview window of the library, and then delete the offending file. Try a regular save now. If it still crashes repeat the step above with the remaining images to find more corrupt ones. Hopefully this works for you, your milage may vary.
I'm writing a flash app using the open source tools. I would like to load a data file in to the app and capture a screenshot of the stage on the server. The only part that seems mysterious is running the app on the server. In fact, I don't even care if it's the same app running on the server and in the browser--if I can use the flash stage and drawing routines to produce an image server-side, I'm happy. If I have to delve in to flex, fine. Right now I'm having problems finding any starting point at all.
I gather Adobe has some commercial products that may fit the bill, but I'd like to stick with open source, apache, and linux. I know this is probably possible with haxe/neko, but I'd like to use more mainstream tools if possible. Am I asking too much?
EDIT/CLARIFICATION: Many thanks for the responses so far, but I think I've been a bit muddy in my description. I've already written the actual stage-grabbing stuff using the same PNGEncoder class as was suggested. The problem is in actually running the swf on the server side. I don't want to let the client take the screen shot itself, because this opens up the possibility of the client maliciously submitting a screenshot which does not correspond to what is on the stage, that is, I don't want users uploading porn. If I could run the the actionscript code on the server, then I could generate the screenshot from my data files and be sure that the screenshot matches the data, but I have no idea how to run the actionscript or swf on the server.
Swfs run on a client computer, not on the server. The only way it would run on the server would be if you set up a special environment on your server so that it ran a web browser, opened up the page and ran the swf. But even then it would have no correlation to what an external user was doing.
You'll need to run it client side. As far as your security concerns, the best way to get rid of those is to have the php writing the actual image only accept an encrypted form of the image file, which the flash can encrypt. That way they can't simply use the PHP file to upload whatever image they want unless they happened to encrypt it the exact same that your swf did. Next encrypt the swf itself (I recommend SWF Shield) so that a potential hacker cannot read the code to know how to encrypt the image.
We just completed a similar project where we rendered JPGs from SWFs that loaded dynamic data, we used IECapt
Did you try actionscript print commands?
Try and look at this:
http://www.phpclasses.org/browse/package/4312.html
I know this question is long dead, but I had a similar problem and ended up writing a script using applescript + ui scripting to grab the inside area of the preview window of the standalone flash player in OS X. You can grab it off github here.
How about swfdec-thumbnailer from the swfdec-gnome package? It's used to create thumbnails of SWF files but can accept arbitrarily large resolutions with the -s argument.
EDIT: swfdec-gnome has been deprecated in Ubuntu 10.10 in favour of Gnash. Here is a guide on taking screenshots with Gnash (note that certain features like gradients are not yet properly supported).