Flex - Return Byte Array From Alchemy C?
Feb 3, 2011
I have written a alchemy code for reading the byte array that i have passed from flex.
When i print the value i get the error cannot convert "OggS" to flash.utils.ByteArray
Alchemy Code
[Code]....
View 1 Replies
Similar Posts:
Feb 3, 2011
I am trying to send a bytearray extracted from a file to the C code and return that bytearray again from the C code..I am printing the contents of the return value from C in a text view contents.text but all i can see is the byte array object "OggS". I can't see the contents of the byte array. Can anyone say where i am going wrong?.. I have posted the C code and the AS code.
AS Code:
private function copyByteArray(content:String):void{
try{
[code].....
View 1 Replies
Dec 8, 2009
I have seen a few blog entries on this and have had a discussion or two with my team mates but I would like to see what the stack overflow community thinks.
So why does the Adobe Alchemy Tool create so much faster running flash byte code than the flex compiler?
Also, when will the flex compiler be able to make similar performance gains? Will it require programmer specific use of special Array's or something of that nature to get the same performance?
View 2 Replies
Mar 28, 2012
convert pdf file into byte array.and also i tried in Google also but no results yet.can u prefer how to convert pdf file into byte array and retrieve byte array into pdf file in flex application.
View 1 Replies
Jan 17, 2011
Im calling a function in lua from actionscript using callstack : Array =
luaAlchemyInstance.doString("luafunction");
my function should return some values
function luafunction()
return true, 125
end
When i look at the callstack array returned by the function in as3,I recieve only the success/fail part.The array length is 1, true, and contains none of my return values.
View 3 Replies
Jun 13, 2011
I'm using Flex 4.5 in a Mobile air for android application. So, Using the Camera/Camera roll [URL]I want to do a simple upload using amfphp Note: Since this is how you get pictures on devices, i cant use the filreference because it wants you to get the pictures using "browse" which cant be done on android or ios My plan is, after I select a picture or capture one with the camera, in the event I can get the local url to the picture that was taken like this:
[URL]
I'm putting this in the imageURL var (i'm assuming i should make it into a byte array to transfer it, im not exactly sure this is my first time making something like this)Here's how i'm taking that image, making it into a byte array, and using amfphp to send the upload to the server:
protected function upload_btn_clickHandler(event:MouseEvent):void
{
var request:URLRequest = new URLRequest(imageURL);
var urlLoader:URLLoader = new URLLoader(request);
[code]....
But i'm getting an error NetConnection.Call.BadVersion.This is the first time im trying something like this so im not even really sure if im going about it right. All the examples I find online go about using the fileReference class, but that seems to require me to use the "browse" method, and im on a mobile application that uses the camera and camera roll to grab pictures off the device, and im not sure how to incorporate that into the fileref class. I figured i could just get the byte array and send it to php myself and it should be just fine.
View 1 Replies
Mar 24, 2011
I have a video file in my local system.I am using windows XP in my system. Now i want to send this video file byte array to server in Flash Builder (Flex 4). I am using PHP at server end.
View 5 Replies
Dec 17, 2010
I made a server connection with AC3 and C, I need the client(AC3) to be able to send a 3 byte message to the server (C) and have the server return a resopnse. So far everything works except for the fact that the feedback isn't fast enough becuase AC3 just tests for data once and moves on instead of waiting like in C. I'm using a binary socket at the moment but I was wondering if there was any way to wait for new data before moving on
View 2 Replies
Jun 13, 2010
this seems really simple but I haven't gotten this to work. I am building my app with grails on google app engine. This pretty much requires you to use JDO. I am making an HTTP call from flex to my app. The action that I am calling on the grails end looks like so
[Code]...
I have tried just returning "hello from grails" and that works just fine. I have alos tried the following return showInstanceList the JDO docs say the query.execute() returns a collection. Why I cant just return that to Flex I have no clue. after playing around with this some more I was able to get a result event back by have grails convert the object to JSON or XML wish I could just return a damn ArrayList.
View 1 Replies
Aug 17, 2010
is it possible to write an object as byte array (in Air)? Or would I have to serialize it?
I tried this - but get an error ..
[Code]....
View 1 Replies
Aug 4, 2009
I'm just trying to find the size of a array I created. I know how to find the size of the swf and movieclips with getBytesTotal but that doesn't seem to work for arrays. anyone know of a method to find this or some built in function. I searched google and other search engines but only find the getBytesTotal command for use with MCs.
View 3 Replies
Feb 2, 2012
I'm working on a childrens game (flash as3) in which stories, poems, songs, etc are read to the child. There's a voice recording reading/singing the text, the text highlights as the words are spoken/sung. The child may toggle on and off the voice and word highlighting independantly. The child may also opt to make their own recording. Now said recording works fine. I'm able to capture it from the mic and the child may play it back no problem. The issue lies in that the client wants the child to be able to save this recording to a web server.
I thought I had the issue solved by using a URLRequest and URLLoader object. The mp3 was showing up in the specified folder on the webserver. I played it with a media player and it worked. The child could also load said file no problem. THEN, when I tried it via browser(instead of flash player) I got the dreaded sandbox error. The only way such an operation with said objects can occur in a browser environment is if it's user initiated via a dialogue window. This is children were talking about and we're not saving locally anyway.
The child is provided 3 save slots which they click on (WSprites). Which technically is user initiated, but flash has no way of knowing that. The 3 save slots hold the sounds in memory and only change when the user records or loads. When the user saves, they get sent off to php to save. Now I did try using js as a middleman, but I ended up losing my bytes in the process and my js and php are probly the weakest areas of all my programming skills.
[Code]...
View 2 Replies
Mar 16, 2012
I was wondering what the 0x0 in byteArray.writeByte(0x0) means?
Is it writing a null value into the byte array?
View 1 Replies
Jun 16, 2011
i recently posted a question on embeding XML,i have it working however im still struggling to access individual elements of an XML document i would like to work with, below is a basic XML structure id like to acess:
Code:
<Game>
<Level>
[code].....
View 1 Replies
May 18, 2010
Our web application has a feature which uses Flash (AS3) to take photos using the user's web cam, then passes the resulting byte array to PHP where it is reconstructed and saved on the server. However, we need to be able to take this web application offline, and we have chosen Gears to do so. The user takes the app offline, performs his tasks, then when he's reconnected to the server, we "sync" the data back with our central database.
We don't have PHP to interact with Flash anymore, but we still need to allow users to take and save photos. We don't know how to save a JPG that Flash creates in a local database. Our hope was that we could save the byte array, a serialized string, or somehow actually persist the object itself, then pass it back to either PHP or Flash (and then PHP) to recreate the JPG. We have tried:
[Code]...
View 1 Replies
Jul 18, 2010
How do you add null bytes to a byte array or in my case I need to pad a byte array with null bytes before its wrote to disk.
View 1 Replies
May 7, 2011
it is possible to open a gz or other format archive, which contains multiple files with flash and then process the files.i guess it should be possible with byte-array.i managed to open a gzipped xml file this way.however i am a little stumped on how to determine which file is what in the opened and decompressed archive.
View 4 Replies
Dec 9, 2009
I want to load an SWF object from a Memory Stream or a byte array instead of a file on disk.AxShockwaveFlash class provides methods and properties to load an SWF providing its path to disk as a string but I haven't seen another way of doing it. There is an InlineData property but generally the class is undocumented and I don't know what this property does. Can it be done at all?
View 2 Replies
Jun 5, 2011
I have a PHP image object created using imagecreatetruecolor(). I'd like to send this via AMFPHP to Flash. I understand the best format is using a ByteArray. How can I achieve this without writing the image to the disk?
View 2 Replies
Jul 29, 2011
I'm trying to serialize and deserialize a byte array to a string using Base64 for as3.
Here is my code
public function Serialize(vector:Vector.<Action>):String
{
var bytes:ByteArray = new ByteArray();
var serialized:String = "";
[Code].....
is the error I get after calling deserializedObj = deserialized.readObject(); Should I be get that error if I'm just trying to put this into an object? I'm not trying to put it into an action class object yet, but if it is then the action it's getting doesn't have parameters that were originally inside.
View 2 Replies
Jan 18, 2012
I'm trying to prepend the byte array of a sound object to a captured microphone sound byte array.
It works, but the extracted sound object get pichted down and doubled in length. I guess this is because the byte array of the sound object is in stereo, while the mic byte array is in mono.
I have this:
sound.extract(myByteArray, extract);
myByteArray now contains the stereo data. How can I turn this to mono
UPDATE:
Here's a working solution:
existingByte.position = 0;
var mono : ByteArray = new ByteArray();
while(existingByte.bytesAvailable) {
[Coe]....
View 1 Replies
Jun 22, 2010
I'm looking for an efficient way to filter a specific color from a bitmapData object in ActionScript 3. Currently I use a loop with readByte32(). This takes about a second to process which is unacceptable. I have been trying to get paletteMap() to work but so far haven't been able to grasp its API (any truly useful links? Google has failed me...). Here's my current logic, which I want to improve:
[Code]...
View 2 Replies
Dec 13, 2011
I'm currently recording and storing a ByteArray of sound and then playing it back. But for some reason the playback starting position of the ByteArray is 163840, not 0 as I need it to be.
var soundBA:ByteArray = new ByteArray();
var sound:Sound = new Sound();
var ch:SoundChannel = new SoundChannel();
var recordingsArray:Array = new Array();
[code]....
View 1 Replies
Oct 28, 2009
I am using Flex's Alchemy library to generate SWC's out of C files. I have a byte array (unsigned char buffer[size]) in the c-layer that I'd like to return to the ActionScript layer as a ByteArray. Do I have to iterate through the array and explicitly call AS3_Set on each element or is there a way to just return the entire C array at once?
View 2 Replies
Jul 30, 2010
I'm trying to use Adobe's OggVorbis library. But I can't seem to get the Sound object to loop. I even tried looping the _sound object inside the AudioDecoder.as in the "com.automatastudios.audio.audiodecoder" package. Do you really have to reload the file and stream it over and over?
View 1 Replies
Feb 3, 2011
I want to pass a byte array object from flex code to C code.How to do that?
View 3 Replies
Mar 5, 2012
I upload a file using adobe air HTTPService.Send method by passing byte array of file content read using FileReference. When I write the set of bytes from the server side (php) it writes the details of the byte array (buff) to the file instead of contents of the file like "endian=bigEndian&position=0&bytesAvailable=61127&length=61127&objectEncoding=3" . Below I have included the code that how I read the file and send it to server. Is there anyway that i can directly pass the data in the byte array to send method?
File Read
var buff:ByteArray = new ByteArray();
var localFilePath:String = "/Videos/sample.txt";
var uploadedFile:File = new File(localFilePath);
[Code]....
View 1 Replies
May 25, 2010
Invalid byte 1 of 1-byte UTF-8 sequencemy error is the above line.am using am calling java method using Blaze DS.
View 3 Replies
Oct 15, 2009
I have an xml file (externally saved) that is similar to the following:
[root]
[main]
[title]...[/title]
[Code]....
What I like to do is to get what's in [title] tag using HTTPservice, import it into Flex, and save it as array objects, and do the same thing for [content]. This way I can later refer the array object saying title[0] or content[2].
View 1 Replies
Mar 9, 2011
A Java developer just asked me the following:
If I send you byte[] for all the method calls on Remote Objects - will you be able to convert it to domain objects?
View 1 Replies