Flash :: Custom DEFLATE Implementation To Speed Up PNG Encoding
Jun 13, 2011
I'm optimizing a PNG encoder for use within Flash SWFs (but I'm writing it in HaXe).I've so far managed to speed things up a fair bit, mostly by using speedy memory read/writes.While profiling my code, I noticed that about 75% of the time is spent in a single call to Flash's built-in compress() method, which uses the zlib algorithm (which uses DEFLATE in turn).I'm not too fussy about compression ratio, but faster compression would be awesome. So, I was wondering if it's worthwhile to try to implement zlib/DEFLATE myself. A little searching has turned up the zlibC.implementation source, but it's not exactly light reading (or easy to port!).Are there any simple implementations of zlib/DEFLATE that I could use as a starting point? I'd rather not have to wade through the two specs, especially since I don't know whether an implementation running in AVM2 could even perform as fast as the native Flash one in the first place.
View 3 Replies
Similar Posts:
Aug 1, 2011
I need to perform encoding of a wav file into base64...
View 2 Replies
Jan 24, 2012
I've got a custom CalloutButton component in a package called uiComponents. This custom CallOutButton is needed because I need some more properties in it. This CalloutButton gets added to my MXML like usual;
<uiComponents:MyCustomCalloutButton someproperties here >
</uiComponents:My...>
Now, the enclosed s:calloutContent gets a compilation error, the (almost standard) could not resolve... Naturally, the namespace has been imported.
View 1 Replies
Mar 19, 2011
I've come across a potential issue that I think I will be able to solve, although it seems to be to be something that may already have a solution, so I thought it best to save time and check.
I'm basically looking to create a menu where the labels are highly detailed and visually pleasing. The problem is that each and every label needs to be dynamically generated so that the menu is shown in the correct language.
My issue is this: is their a method in flash of defining letters for use as a font that aren't just flat colours? Imagine taking each letter into an image editing program, applying some effects to it, then important them all into flash as graphics/bitmap data. Could those graphics then be defined as letters in a font so that, when the swf is handed the string, it can create the dynamic label from my lovely looking alphabet?
I have a few ideas on how to implement a system using arrays and swapping the dynamic textfields for dynamically created movies, but that would mean building it from the ground up, something which may not be necessary if something similar already exists.
Anyway, I look forward to your replies; this forums has unknowingly solved a large number of my problems in the past, and acted as a safety rope as I learnt AS3. Now that I am on this forum I will likely try and take some time to give something back and help out other beginners, at least I will do when my thesis is finished
View 4 Replies
Sep 22, 2011
I'm doing a project where I manually create sorting algorithms.After several tests I found out that my heapsort is way quicker than quicksort (I think it should be the other way around), my selection sort is also faster than insertion sort.I'm testing using integers from -100 to 100, randomly generated, 5000 values in an array (I modified this number several times, still the same problems).My quicksort isn't in-place.I thought that maybe flash's recursive functions are slow? my heapsort uses loops, unlike quicksort. That's just a hypothesis though. I start a timer, run the class's exec() function, stop the timer and calculate the elapsed time.[code]
View 3 Replies
Dec 13, 2009
I'm tweening a movieclip from startX to finishX. The value of startX varies but finishX is a constant. But as the startX increases in value the animation appears to be quicker. How do I adjust the speed of the tween to ensure a consistant speed regardless of the value of startX?
View 1 Replies
Jul 17, 2010
This is working, but is this a good example of polymorphism?[code]...
View 1 Replies
Nov 14, 2010
I'm implementing the RTMP-protocol for my bachelor thesis. I got through the handshake and application connect process and received the play-command from my client which is actually a jw player.But I now stuck with the audio and video-messages. I can't find something about the exactly built-up of these messages neither in the specification nor somewhere else.What should i do with the metadata and header of the flv-file? Can I send the whole tag and audio-/video-data from my file in the RTMP-audio- and video-messages?
View 1 Replies
Dec 31, 2005
Does Flash have a way of emulating Hashsets or Hashmaps? If it doesn't, what is the best way of storing and quickly retrieving 10-100 thousand entries of data?
View 14 Replies
Apr 23, 2008
I've been using Flash Video Encoder for quite a while now and never had a problem encoding flash from wmv. But in the last week suddenly encoding crashes on ever attempt. At first I thought it was a change in the format of the video that was being introduced, but then I tired videos that I know that I've converted previously. They crash too. I've also tried on 3 different computers, that have all had success in the past.
View 6 Replies
Mar 31, 2011
I have some German content which contains an umlaut (ü). This content is being built into an XML file. I then have a flash file which uses the xml to build a coverflow. My problem is that the 'ü' character is not being displayed in the coverflow. I've made sure the xml is encoded correctly, as you can see from the snippet below:
<?xml version="1.0" encoding="UTF-8"?>
<artworkinfo>
<albuminfo>
[code]....
As you can see, the umlaut is in the albumName element, but when that text displays it simply misses out the 'ü'. I've added a bunch of encoding groups to the text element in the coverflow file, as well as specifically adding the 'ü' in the 'Include these characters' element. I'm stuck for how to get this to display.
View 1 Replies
Nov 11, 2009
I am trying to convert our all-flash website to HTML 5.But since so many users still use IE and other browsers that do not support HTML 5 yet,I am looking for some flash media players that can replace <audio> and <video>. My google skill does not yield good results.The flash media player should dispatch events specified at https:[url]..._audio_and_video_in_FireFox (or at least talk to javascript some how for those events).Do you know a flash media player that can easily be embedded inside <audio> or <video> and talks to javascript for events?
View 2 Replies
Jul 14, 2011
Does anyone know if there is a (preferably efficient :-) ) implementation of elliptic curve cryptography for ActionScript? The only library I know of is as3crypto, which offers great implementations for symmetric cryptography, hashing and several other cryptography-related operations, but it has only RSA for public key cryptography.
View 2 Replies
Aug 2, 2011
I just upgraded out Flex project to use SDK version 4.5.1.21328 and the Flash Builder to version 4.5
All of the sudden, I'm getting several red tags on the Flash Builder: "could not resolve s:State/fx:Script/whatever to a component implementation"
However, the project builds fine with Maven, and seems to work well too.
Does anyone have any information on how to remove these "problems"?
View 3 Replies
Aug 3, 2011
I've been wondering if it's possible to change the backend of the LLVM implementation from ARM to something else for instance C or C++? Currently Adobe uses a Actionscript3 frontend (which I can't currently find - closed source?) for the LLVM to produce iOS applications. I'm wondering why there isn't more options for other backends? Of course there are limitations to going this route, no loading of external swf files at runtime (to name just one), but the iOS applications seem to manage really well with this feat. I did find this pdf which talks about the AS3 LLVM frontend, but no guidance to where the code is or how to investigate... I just think it's a missed opportunity that Adobe are missing and wondered how much work it would be to do such a feat?
View 1 Replies
Oct 14, 2010
I am trying to send a twitter update when I press a button in flash. I get the twitter page to open from the flash file but when it passes the variables, it is passing it as the following into the browser address bar [URL] and on the twitter page text box it shows [URL]. The browser is rendering the percent sign and the number 20 as actual text and not as the space that I need it to.
Here is my code
function onTwitterButtonClick(evt:MouseEvent):void{
trace("Twitter button clicked");
var twitterShareURLPart1:String = "[URL]"
var shareUrl:String = "[URL]"+youtubeVidID;
var twitterShareURLPart2:String = "&text="
var escapedText1:String = encodeURIComponent("Check out this latest video from Me");
var gotoURL:URLRequest = new URLRequest (twitterShareURLPart1 + shareUrl + twitterShareURLPart2+escapedText1);
navigateToURL(gotoURL,"_blank");
trace(twitterShareURLPart1 + shareUrl + twitterShareURLPart2 + escapedText1);
}
View 1 Replies
Feb 22, 2010
Are there any standard practices for Video encoding, streaming, etc?
View 1 Replies
Aug 25, 2010
I have a flash app that needs to download a file, whose name contains UTF-8 characters.
Internally, the filename is read from a UTF-8 XML file, e.g. "my filé.pdf". The code goes something like this:
url = get_filename_from_XML();
req = new URLRequest( url );
ref = new FileReference();
ref.download( req );
The problem is that the URL is encoded in Latin1, i.e. the é is encoded as %E9 instead of %C3%A9 (according to FireBug). How can I get Flash to encode the URL correctly?
View 2 Replies
Aug 25, 2010
I have a problem reading from Flex a url which has Transfer-Encoding: chunked because the FLex waits for the server to send terminate signal which in chunked transfer isn't sent...
View 2 Replies
Aug 7, 2010
I want to add an animated .gif file to my movie. So I created a new symbol and then imported the .gif file to the stage. This created the symbol containing the animated .gif.I dragged the symbol onto the scene where I want it. However, the animation seems to play at a different speed (fps) than normal. So I changed the fps of the symbol (at bottom of Timeline where it says "fps"). But for some reason this changes the fps of the rest of the entire movie.
View 3 Replies
Jul 24, 2009
is there anyway to change a songs playback speed depending on a speed variable. heres the kicker tho im limited to using only as2.
View 2 Replies
Nov 12, 2010
I'm new to Flash and trying to communicate with an app engine server but I'm having some encoding problems. [code]This does not work, gives me some encoding errors on the server side. But if I switch POST to GET it automagically works.
View 1 Replies
Feb 8, 2011
is there method/algo to detect universal file encodings ?
View 1 Replies
Mar 1, 2012
Adobe's "SWF File Format Specification v10" says that Speex encoded data can be used for streaming sound (a little clarification of the "streaming sound" definition here: "The SWF file format supports a streaming sound mode where sound data is played and downloaded in tight synchronization with the timeline. In this mode, sound packets are stored with each frame." - this has nothing to do with any FMS streaming, no ActionScript needed - just plain SWF).This should be accomplished by using a single SoundStreamHead2 tag with StreamSoundCompression set to 11 (which means "Speex", as stated in the abovementioned Specification) and then N pairs of ShowFrame and SoundStreamBlock tags. However, this does not work - Flash Player plays no sound when playing the SWF generated by me this way. Please note, that I am capable of generating such SWFs containing streamed MP3 or PCM data, which then play perfectly. Just not Speex...
I strictly conform to the Specification:URL...I tried the streaming sound approach as well as the event sound - both do not work.Moreover, I was not able to find (anywhere on the Internet) any sample SWF with streaming sound (nor event sound) encoded in Speex. Do they even exist? Anyway, Flash CS5.5 is not capable of generating them.I would just like to know whether Speex support for SWF streaming sound can be found anywhere else than in the Specification. (I know that FLV can contain Speex and that Flash Player can stream Speex from a microphone and that FMS can stream Speex to its clients, but this is not what I am asking for)
View 1 Replies
Mar 23, 2010
I have a movie clip on my scene which has a speed applied to it making it move across the screen. This is duplicated when it reaches the other end of the screen.On my scene I have some action script which is acting as a timer. After a set time I want it to increase the speed of the movie clips, making the game become "harder". I seem to be able to manipulate the alpha of my movie clips but can't seem to trigger the speed increase.If i use a setInterval it seems to trigger the speed increase but it does it each time the movie clip is duplicated (so the delay resets, it does not change once and apply throughout)However, where I am changing the alpha I cannot seem to change the speed.
View 2 Replies
Sep 20, 2009
How can i detect mouse speed with AS 3.0, and then put speed limit? Also can i use speed var for anything else? *sorry for my bad English, i live in non-english-speaking country*
View 9 Replies
Jun 12, 2009
I use wowza server and need to build a flash client to publish different encoding qualities streams. Does it has any open source or paid with source code flash client products?
View 3 Replies
Feb 1, 2010
I am having an interlacing issue when I load my .flv files up to my site.The strange thing is that when I watch them after encoding in Flash Video Encoder (with adobe AIR) the interlacing does not appear. I can't understand why the interlacing issue would appear once the videos are loaded up to the site and yet they look perfectly crisp and clear when I watch the completed .flv's in AIR. I didn't de-interlace the videos the first time I created the .flv's but that shouldn't matter since they play fine in AIR right? Of course I can go back through and de-interlace them, but I want to make sure that this is the problem before I take the time to re-encode them all.
View 1 Replies
Feb 3, 2010
In Adobe Flash CS3 Profesional and when I start the Flash Video Encoder I get the following message: "A required system library did not initialize properly. Please ensure you have DirectShow 9 and QuickTime 7 or higher installed on your system."
View 2 Replies
Aug 15, 2011
I have a issue here with unzipping the .zip files that i have in combobox.i select 1 .zip file and after selecting the particular .zip file Button should unzip it and put the contents in another combobox.
[Code]...
View 2 Replies