ActionScript 3.0 :: Uncompress Method Of ByteArray Only Supports Level 3 Compressed Streams?
Jun 4, 2008
Does the uncompress method of ByteArray only supports level 3 compressed streams? Because I have a valid zlib compressed file but compressed in level 2, and Flash always throws me the 2058 error message.
I've also tried using the DefaultCompressionAlgorithm class for AIR with its two compression methods, but with no success.
Doing some quick tests with python using the same file gets uncompressed with no problems.
View 3 Replies
Similar Posts:
Oct 9, 2009
I can't seem to get a stream that Flex 3 want's to decompress.
I've tried:
System.IO.Compression.GZipStream
System.IO.Compression.DeflateStream
ICSharpCode.SharpZipLib.Zip.Compression.Streams.DeflaterOutputStream
zlib.ZOutputStream
None of these seem to make ByteArray.uncompress happy, i.e. I get
Error #2058: There was an error decompressing the data.
Also the whole Deflate vs zlib has me going around in circles. It seems that according to the wikipedia article, zlib is an implementation of DEFLATE. But according to Actionscript they are two different things?
Microsoft also seems to indicate the Gzip at least uses the Deflate algorithm, as in their docs they refer that GZipOutputStream uses the same compression algorithm as DeflateStream. So I'm assuming that it's just a header difference, which would indicate that's "no good" as far as 'ByteArray.uncompress' as the "DEFLATE" algorithm is only supported in AIR applications.
Sample "server" code, using SharpZipLib in this case (not working):
public virtual bool ProcessRequest(string path, HttpListenerContext context)
{
var buffer = File.ReadAllBytes(path);
// Specifying to strip header/footer from data as that seems to be what the
[code]....
View 2 Replies
Sep 6, 2011
Is there a way to uncompress ziped data without inflate()?
View 1 Replies
Oct 12, 2009
I have a string, I am compressing it with bytearray and save it to a file. In other application I am loading it and when I try to uncompress it, it's give me an error. How can I convert a compressed string in to bytearray type to be able to convert it? The code for compression:
var b:ByteArray = new ByteArray();b.writeMultiByte(t,"iso-8859-1")b.compress();
View 3 Replies
Feb 1, 2010
i am developing video chat system , one side is model, another sider is customer. Now i want that model sider stream sended to FMS, and then FMS make two streams, that the one stream is regular, the other stream is compressed. the compressed stream is just for administrator, so it should be small.
View 1 Replies
Feb 3, 2011
Error #2030: End of file was encountered.
This method is not working
I am using it like this
var ba:ByteArray = new ByteArray();
ba = bmd.getPixels(bmd.rect);
bmd.setPixels(srcRect, ba);
bm.bitmapData = bmd;
img.source = bm;
View 1 Replies
Feb 18, 2011
I am trying to understand the best technique for this.My game is like a side scroller. A new "Tile" or piece of game would contain one of each display objects.
-terrain
-slide (like a playground slide)
-other stuff...
pseudo example: the first tile set would be pieces terrain1 and slide3
Code:
var terrainPieces:Array = new Array(1,2,6,3,16,2,3,5,7,2);
var slidePieces:Array = new Array (3,0,1,2,00,4,2,1,4,0);
One of my issues is readability and ease of level layout.i want to keep the code stacked in a way i can read pieces easily, which is why slidePiece 0 or 00 == no slide (just to keep the array in line).I can look at this and say to myself the 6th set would look like terrain2,slide4. (which are both pooled display objects) Would it be better if each "tile" is a class containing references to each asset? If so, i cant see how to assign each tile in a readable form while setting up the level layout on my end.
View 4 Replies
Dec 19, 2005
How to access the method of an extenally loaded SWF a number of levels.
For example I've loaded a SWF file to _level1 I want to access a method inside the SWF from another SWF file in a different level .
View 1 Replies
Dec 2, 2009
I have a web application developed in Adobe Flex 3 and Python 2.5 (deployed on Google App Engine). A RESTful web service has been created in Python and its results are currently in an XML format which is being read by Flex using the HttpService object.Now the main objective is to compress the XML so that there is as less a time between the HttpService send() method and result events. I looked up Python docs and managed to use zlib.compress() to compress the XML result.Then I set the HttpService result type from "xml" to "text" and tried using ByteArrays to uncompress the string back to XML. Here's where I failed. I am doing something like this:[code]Its throwing an exception at byteArray.uncompress() and says unable to uncompress the byteArray. Also when I trace the length of the byteArray it gets 0.[code]
View 1 Replies
Feb 16, 2011
I am working on a game, made with Flash (using AS3) The game has a fast ball and when this ball hits an object it has to make a sound... but the sound starts with delay (so the ball is far away when the sound is played).This sound is edited by me and it hasn't got any silences at the beginning.The method i'm currently using is the simplest one:
public var sonidoPuntos1:sonidopunto1 = new sonidopunto1()
and then...
sonidoPuntos1.play()
I am trying to introduce the file into a ByteArray and then playing it from there...
View 2 Replies
Sep 8, 2011
I tried converting a .swf file into .avi through ffmpeg, and I got the error 'compressed swf format not supported'. How does a compressed .swf differ from an uncompressed .swf file? How do you specify which one you want to make, and is it even possible to? How would you decompress a compressed .swf and what should you expect to find? I googled a lot of these but I didn't manage to learn much from the bits and pieces I found.
View 1 Replies
Mar 28, 2011
I know its a true Pain but does anyone know any way to convert wav ByteArray to mp3 ByteArray.
View 1 Replies
May 7, 2009
I would like to add a very small and simple Flash audio player to my website. I have found lots of Flash MP3 players, but I can't seem to find players that will work with other types of audio files, such as aac/m4a/mp4.
I had previously been using Windows Media Server to stream WMA files on my site, but this only works for Windows users, and I need streaming to work for Mac users as well. So I think Flash is the way to go, but I cannot use mp3's because of licensing concerns.
I've been looking and looking for a flash player that supports other audio types, but can't find one. Is it true that flash has a native class for mp3, but doesn't have built-in support for others?
View 1 Replies
Feb 28, 2011
I have imported voice-over into my flash animation project as a WAV file. When I test it within the library, it's perfect. When I play it back using "Play" under "Controls" it is slightly degraded. And then when I play it back using "Test Movie in flash professional" under "Control" and when I publish the file, the audio is severely compressed and distorted. Why does this happen and how do I fix it?
View 2 Replies
Apr 7, 2010
I read an Adobe article which demonstrated H.264 video playback support in Flash Player. Would video encoded in this format be more compressed than typical FLV videos? Should I be using this format for video I place on websites from now on?
View 3 Replies
Jul 22, 2010
I've written a SWF distributor which GZIPs the SWF then sends it as an SWF content type, it works just if the SWF used to loop it no longer does. Any reason why the compressed SWF doesn't loop the video/animation?
View 2 Replies
Oct 2, 2009
[URL]. How is this video compressed? it loads so quickly and is large. Is it streaming?
View 4 Replies
Dec 7, 2009
I can think of to prevent my external images from being compressed. I have a few png files being pulled into flash via XML and AS3. For some reason the images that are being pulled in are being compressed and look terrible. What can i do to prevent them from being compressed so much. They are pulled in via an empty movieclip.URL...Here is the AS that is being used to pull the images in and the XML information.[code]
View 1 Replies
Apr 22, 2011
im trying to create a level select screen so the buttons unlock as you complete a level, so far i have this on each button:
on(release){
if(this.number <= currentItem){
gotoAndPlay(3);
}
}
[Code]...
View 0 Replies
Aug 26, 2010
I have two layers in my FLA both with empty movie clips as follows:In mc_Empty1, I attach a faded background movieclip as I wait for mc_Empty2 to load a SWF. Once the SWF is loaded into mc_Empty2, I want to remove the faded background movieclip from mc_Empty1. When I load the SWF from the main timeline, the onLoad() function works and removes the faded background from mc_Empty1. However, when I load the SWF from mc_target, the SWF loads, but the onLoad() function does not. Here's my AS2 code:
//Loading SWF from main timeline
mc_Empty1.attachMovie("mcFadedBg", "mc_FadedBg", 1);
mc_Empty2.loadMovie("My.swf");mc_Empty2.onLoad = function():Void{ trace("loaded"); //This works removeMovieClip(mc_Empty1.mc_FadedBg); //This works}
[code]....
I know I'm targeting properly because the SWF loads as it should, but the onLoad() function does not.
View 3 Replies
Oct 2, 2010
This is making me a little kooky today. I thought I could defined a library path in PREFERENCES > ACTIONSCRIPT > ACTIONSCRIPT 3.0 SETTINGS then that library would be available to all AS3 FLA files, but that doesn't seem to work for me. If I use the PUBLISH SETTINGS and define the library path everything is fine.
Is there something that I could have done to disable the application level class path functionality? I guess I'm trying avoid having to set the library path for every new FLA I'm making.
View 1 Replies
Dec 15, 2011
I want to capture audio samples from the microphone in my adobe AIR application and then save them to an flv file. I have the following code:
mic.setSilenceLevel(0, DELAY_LENGTH);
mic.codec = SoundCodec.SPEEX;
mic.encodeQuality = 6;
[Code]....
The problem is that I suspect that in my handler I am only getting raw samples and not compressed samples. The reason for my suspicion is that the number of bytes I get per message is equal to 20 ms (which my definition is 1 speex frame) of raw audio and not compressed audio. Also the number of bytes doesnt change if I change the encodeQuality. Reading the documentation suggests that adobe will only compress the audio before transmission to a flash media server or another peer. Is there a way to publish and read the stream locally in order to get compressed samples. ? Or any other way to get the compressed samples?
View 1 Replies
Dec 26, 2011
I'm doing a bigger aplication in flash (as2).Image, there is a main "home" flash with several menu buttons.Clicking these buttons, I load external swf into an empty container in this "home" flash.[code]clicking buttons in this second level, will load external movies into an empty container in this SECOND LEVEL swf.This works fine, but now, coming to the THIRD LEVEL (don't think there will be more in the future) problems come up, some scripts won't work.Now (I'm a as2-beginner) I think, loading external swf ALLWAYS into containers in the first "Home" flash should solve the problem.But I don't know, how to load an swf from the third level into a container in the first "home" level.In the "home" level, I have a "close" button, that will unload the container content.I need to go to a certain scene "content_2" in the home swf, too.
View 7 Replies
May 9, 2004
i have game im doing, and i want it to jump to level 2 upon completing the first level, but the problem is, the level 2 is a seperate swf, i've tried to use
Code:
on (release) {
loadMovie("level2.swf",2)
}
View 3 Replies
Aug 3, 2010
We have create a flash file for both Touchscreen TV and Website.The document frame is is 1920x1080 however we would like to export the project so it can be seen on the website at the correct compression.Is there a way to export the SWF to the required 945x532.I know how to export it in the HTML however this reads the same SWF that is still too large in file size (not web friendly).I could pull the compression down to say 10% before exporting the SWF however there must be a better method.
View 5 Replies
Dec 2, 2009
I have called main.swf into a container in index.swf.
myMCL.loadClip("main.swf","container"); is an action on my Index.fla timeline.
I have my navigation on index. (i wanted it to go on main, but the nature of the animation meant it had to go on index)
I need to call "home.swf" into "main.swf" from the navigation button in Index.swf.
When I had the navigation on "main.swf" this was my code to call "home.swf" into the page.
on (release) {
Preloader_mc.gotoAndStop("home");
}
("home") is the label name where the preloader is for home.swf
how to call the preloader for home into main.swf from "INDEX.SWF INSTEAD OF MAIN.SWF"
View 5 Replies
Feb 2, 2010
I have a file1.swf which loads file2.swf into it. Within file2.swf i have a button that when clicked needs to remove file2.swf and load file3.swf into its place.
View 2 Replies
Sep 16, 2004
Is there a way to link to one level below the current level? Instead of saying _root.level1.level2.level3, something like: ../level3 ?
View 4 Replies
Apr 15, 2012
I am currently thinking about the best multi-platform language to build a multiplayer app with, and I was just wondering if anyone knows if AIR supports multiplayer locally between devices i.e over a LAN or bluetooth? Would I need to run some aspects of the game via a server?
Not to give too much away (of the game idea) but it would be similar to a "Simon" type game, with the only info being passed to each device either a score/amount of moves to beat or other simple piece of data.
View 2 Replies
Jul 16, 2010
I have a flash banner that I want to replace with a static image if the clients browser doesn't have flash enabled.
I was wondering if I can do this with php
View 5 Replies