ActionScript 3.0 :: AIR Async Encoding In A Loop: Png Vs Jpg

Apr 17, 2012

in a AIR mobile project I've done an initial loop that call a class that save images listed in an xml file to the applicationStorageDirectory of the device (iPad/android). With png files I have no problems since I got a jpg file. All files are correctly saved into the directory, but when a jpg occours it stops the save process (so the jpg is the last file saved and the loop on the list is incomplete, no others pngs are saved).

Some code: my class

Code:
package com.fabiogarzoli
{
import flash.events.Event;
import flash.events.IOErrorEvent;

[Code].....

View 5 Replies


Similar Posts:


AS3 :: Flash - How To Perform Encoding Of A Wave File Into Base64 Encoding

Aug 1, 2011

I need to perform encoding of a wav file into base64...

View 2 Replies

C# :: Async Threaded Tcp Server?

Mar 30, 2010

I want to create a high performance server in C# which could take about ~10k clients. Now i started writing a TcpServer with C# and for each client-connection i open a new thread. I also use one thread to accept the connections. So far so good, works fine.

The server has to deserialize AMF incoming objects do some logic ( like saving the position of a player ) and send some object back ( serializing objects ). I am not worried about the serializing/deserializing part atm.My main concern is that I will have a lot of threads with 10k clients and i've read somewhere that an OS can only hold like a few hunderd threads.

View 4 Replies

ActionScript 3.0 :: How To Implement An Async Method

Nov 14, 2011

it most used on network accesses. But now, I have a class that will do several things, including but not limited to network accessing, many many single loops within a huge code(maybe). The return time is unspecific, so I think about using an async method. However, when I run my program, I found that all things in call stack are stuck when the loop running. I made a short version of my code. First, the weird AsyncClass.as class is like this:

[Code]...

View 7 Replies

Mysql :: Async Call Of A Callresponder?

Oct 21, 2011

I have a problem with my Flex-Application. As you can see in the code-sample below i try to add some panels to a vgroup. The panels are getting their title from my MYSQL db. My problem is that I can't wait on the async call of the callresponder, so the panel doesn't get filled. How can I wait for the data from DB?If i try to build a new panel with a button it works. When i press the button one panel appears with the right title.

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"

[code]....

View 1 Replies

Flex :: Multiple Async Webservice Call Requests?

Jul 26, 2011

I am using Flex and Actionscript 3, along with Webservices, rpc and a callResponder. I want to be able to, for example, say:

loadData1(); // Loads webservice data 1
loadData2(); // Loads webservice data 2
loadData3(); // Loads webservice data 3

However, Actionscript 3 works with async events, so for every call you need to wait for the ResultEvent to trigger when it is done. So, I might want to do the next request every time an event is done. However, I am afraid that threading issues might arise, and some events might not happen at all. I don't think I'm doing a good job of explaining, so I will try to show some code:

private var service:Service1;
var cp:CallResponder = new CallResponder();
public function Webservice()[code]....

I could ofcourse save the actions in an arraylist, but whose to say that the addToArrayList and the check if other calls are available do not mess eachother up, or just miss each other, thereby halting execution? Is there something like a volatile Arraylist?

View 2 Replies

Javascript :: Is External Interface In Flash Async Or Sync

Jan 10, 2012

I will call flashObject.httpRequest to complete a http request via flash. The problem is there is no reference about httpRequest is an async method or sync. It is important for my application.

private function httpRequest (uri:String, param:String="", method:String="GET"):void
{
var

[Code]....

View 1 Replies

Multithreading :: Flex Async I/O Operation Is On A Worker Thread?

Jan 22, 2012

I am aware that Action Script does not provide multithreading so when writing flex application we are limited to work on one thread. which is ok for rendering my UI.

However some questions arise when preferring flex over silverlight:

As a UI layer single thread is good enough but is it fair to assume that for Aync httpservice like operations in flex , internally it would use some worker threads to manage the async operation and then come back to the main thread ? it looks like it does since my UI does not freeze.Can the flex/flash player deal with multiple httpservice calls in parallel ? ( e.g more than one section of the UI loading data at the same time.)How about the animation stuff ( e.g the parallel animation ) - does flash player internally leverages some threading for accelerating graphics or is it all done on the UI thread ?

View 1 Replies

Actionscript 3 :: Flash Async Calls With Mouse Click Permissions?

Nov 19, 2009

The current workflow is as follows:

user clicks a button sends a Loader to see if the user has permission if the user has permission uploads a file

Unfortunately, this gives:

SecurityError: Error #2176: Certain actions, such as those that display a pop-up window, may only be invoked upon user interaction, for example by a mouse click or button press.

It appears that as a security feature, Flash 10 disallows certain functions (such as uploading a file) unless it is preceded by a mouse click or button press. However, since I am first loading the request for permission, it no longer see the MouseEvent event (presumably in the stack) and thus throws a SecurityError.

View 2 Replies

ActionScript 2.0 :: Flash/IE Doesn't Bother To Use Async Load When Expected

Sep 23, 2011

I'm having a weird situation that only seems to occur in IE. This may or may not be related to my other post ("Need to worry about thread-safety?"), but I'm not sure, so I'm putting this in a separate thread.I have a setup in my my flash app to load an arbitrary number of different sounds, but with an limit on the number of sounds being loaded simultaneously. It works like this (psuedocode):

Code:
arrayOfURLs = ["a.mp3", "b.mp3", "c.mp3", ...etc...];
arrayOfSounds = [];
nextToLoad = 0;

[code]....

EDIT: In other words, it starts loading up to the first, say, 5 sounds, and then after each one finishes loading, it starts loading the next sound in the queue.It works fine on everything except IE. And it will work on IE as long as the files aren't cached. But if they are cached, then in IE (and only in IE) the flash app will hang and produce a trace like this:

a
b
start callback
start callback

[code]....

And after roughy 50 of those "start callback"s the flash app hangs and it never gets to any "end callback" or "c".It seems that loadSound is deciding to call onLoad synchronously, instead of asynchronously as would normally be expected. But this never seems to happen in anything but IE, even when the given browser has it all cached. So apparently it's either calling onLoad the wrong way in IE, or flash events like onLoad are susceptible to race conditions and need to be written accordingly.

View 0 Replies

Encoding Flash From Wmv Crashing

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

Xml :: Character Encoding In Flash?

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

ActionScript 3.0 :: JPG/PNG Encoding And Vectors?

Dec 4, 2010

So I have recently created a Tshirt design application where a user can draw on a tshirt / add text / upload images. Though I am having a few problems. Problem #1: Using the pen tool I can only allow users to draw and reset the drawing using the graphics class, no idea how to create an eraser tool

Q1 - Is there any way to create the eraser? Problem #2: Once a user saves the shirt it is later encoded into a JPG or PNG With no way of editing the shirt in the future.

Q2 - I thought of saving the locations of the shapes / items they uploaded onto the shirt and colors and later re-creating the shirt once loaded. But ran into one problem that is I cannot save the drawing they did using the pen tool, only the location of the objects (MC's) is there any better way to creating this?

View 5 Replies

ActionScript 2.0 :: Encoding Strings For PHP/SQL?

Jun 3, 2002

which characters need to be encoded for PHP and SQL, and how to do it?

View 2 Replies

Flex :: What Encoding Unescape() Function Uses

Aug 24, 2010

what encoding unescape() function uses? I have problem that URL param has utf8 foreign chars, that flash fails to read.

View 1 Replies

Flex :: Encoding For RTF Text - Does One Exist

Nov 2, 2011

I'm wondering if there is an encoding like UTF8/16 that can account for characters that are bold, italic, underlined, and super/sub-scripted? If not, is it under consideration by the powers that be? Reason for the question is that I have a large excel file where many cells contain rtf text such as italics, bold, superscript; and I need to access the information on a row-by-row basis. I know I can save the file in html or xml, but I would like to import the data into MySQL - keeping the formatting - and then being able to access the data a row at a time.

I've considered using Markdown or Textile, but that means a whole lot of time changing each cell - we're talking about 5,000 records. Also, I want to continue to use Flex and I'm not sure if Flex can display html formatted text in their text controls because of their their text engine...

View 1 Replies

ActionScript 2.0 :: Cyrillic Encoding With GetURL?

Jan 12, 2010

I am creating a swf for use on a Russian website. I have search box that the customer enters there search term which I then concatenate to the URL string in the getURL method.

When i use western characters this work fine but when i use cyrillic characters it breaks.

Does anyone know a way round this?

Or a way to output the characters using UTF-8?

View 0 Replies

ActionScript 3.0 :: Encoding Bitmap (bitmapdata) To JPG

Aug 27, 2010

i'm writing simple image editor. I want to allow user to change contrast, brightness ect and save file as jpg. I got 2 problems.

1. I apply filters to bitmap and when I save it, it saves only original image without filters.

ActionScript Code:
var bitmapData:BitmapData = Bitmap(source_image.content).bitmapData;
var bmp:Bitmap = new Bitmap(bitmapData);
bmp.filters = combineFilters();
combineFilters function gives a set of ColorMatrixFilters to change contrast and other stuff.

2. When I encode a JPG with a as3corelibrary it makes it very slow (over 20 sec for img) and freezes app. Is there any way to aviod this?

View 0 Replies

Video Encoding For Alpha Channel

Jan 20, 2010

I am experimenting with video using the alpha channel capability of the FlashCS3. I followed the tutorial on the gotoandlearn website on how to create chroma keyed video. I exported an avi video file having removed the background. Ive used Flash video encoder for VP6 and flash player 8 with encode alpha channel ticked. However my swf is not showing the video, just a white blank where it should be. It puts out the audio only.

This is the log file.
FILE SUCCESSFULLY ENCODED
- Source file: C:downloadsflash greenscreenvideoscreentestalpha.avi
- Output file: C:downloadsflash greenscreenvideoscreentestalpha2.flv
- Video codec: On2 VP6
- Alpha channel encoded: yes
- Deinterlace: no
- Frame rate: 25 fps
- Key frame interval: 50 frames
- Video data rate: 40 kbps
- Width: 720 pixels
- Height: 576 pixels
- Audio codec: MPEG Layer III (MP3)
- Audio data rate: 16 kbps (mono)
- FLV duration: 00:00:10
- Encoding time: 00:01:00

View 1 Replies

Actionscript 3.0 :: URLLoader Encoding With PHP & MySQL

May 30, 2010

I'm stuck with a stupid problem of encoding. My problem is that all my accentuated characters are displayed as weird iso characters.

[Code]....

View 1 Replies

ActionScript 3.0 :: URL Encoding Within Flash And Passing Variable

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

ActionScript 3.0 :: Encoding Bitmaps And Byte Arrays

Jul 2, 2009

I am making a program which will ask the user to select an image, then encode it to a binary string and store in an XML file. It will then be able to 'decode' the fil and reconstruct it.

I've followed a few guides online, but I can't seem to get anything to work. My understanding is that I need to break the Bitmap into it's BitmapData components, convert that to a 'byteArray' which is saved, (or optionally encoded) then that same byteArray data is retrieved and made into a movie clip onto the stage. However, no matter what I do, I can't get it to properly recreate the bitmap once i've grabbed the data... It always throws a "end of file

In order to get the basics, i've cut my code down to the bare minimum - which is just to load the image from the local filesystem, grab it's bitmapdata, clone it and place it into a new Bitmap which is added to the stage. However, I only ever get returned a "End of file encountered" error message - which seems to indicate to me it's not properly populating the byteArray. (It certainly looks much too short when traced)

[Code]....

View 5 Replies

Preview Live Video Encoding Settings

Oct 13, 2009

I am working with an AS2 application that was put together a while back.  The app is used to publish a live video stream to FMS.  I am using the Camera class to connect to a local camera (Camera.get()) and to setup the encoding specs for the stream that is to be published to FMS.  To preview the camera signal, I am using Video.attachVideo() to attach that camera output to a Video instance on the stage.  This is all working greta for me. But here's the thing.  The video stream that is being pumped to the Video instance is the direct signal from the camera.  Nice and clean.  I seem to remember that there is a way to view the video signal with the encoding settings applied to it.  It's just one little line of code, if I remember correctly.  However, I can't seem to find the code that will do that.
 
Can anyone quickly share the code that will allow me to preview the encoded video stream?

View 1 Replies

Media Server :: How To Secure Live Encoding On FMS

Dec 17, 2009

After installing FMS 3.5.1, anybody can use my server for live enconding. How can I configure the server to authorise live encoding only from subdomain 1234.4567 or by a password?

View 3 Replies

Media Server :: How To Secure Live Encoding

Jan 26, 2010

We just found out someone is bouncing a pirated feed off our FMIS 3.5.2 server. after months of not having to look at this thing (and not remembering crap about parts of the setup), I'm trying to discover a few things.
 
First is, how do we tell FMIS which vhost allows live encoding?   Second, as I look at the logs and logger.xml, I'm trying to tell how to force it to show the ip's of inbound/outbound traffic.  Think I'm doing the right things to the file, but the log for the application/entry point the pirate is using doesn't show what I believe I configured to be the fields that should show up in the log.   Finally, trying to figure out how to force authentication of media encoders talking to the server. I'm scanning the online help docs, etc. trying to remember all this stuff.... but if anyone can say "look at this page in the pdf, and this page in the online" to affect what I need to do to lock this up quick,

View 3 Replies

Professional :: Encoding For FLV Results In 10x Larger File CS5 Vs CS4

Oct 1, 2010

I've recently upgraded to CS5 and the Media Encoder creates incredibly HUGE files compared to the CS4 media encoder.
 
For example, I can convert a 15MB mpg file to a 12 MB flv file in CS4 using the preset  "FLV same as source"
 
I do not find a matching preset in CS5, but tried "FLV - match source atributes (medium quality)"  Encoding the same file in CS5 with this preset results in 170MB file.
 
I've tried adjusting the settings, comparing the options in both versions, and I still can't get a reasonably sized file out of the CS5 media encoder.
 
This seems really broken to me.  A 170 MB file is not useful in any way.  Do I have bad presets?
 
Adobe Media Encoder version is 5.0.1.0  (32-bit)

View 4 Replies

Professional :: Encoding Video At A Larger Size?

Feb 11, 2011

Given:I encode video at 600kbpsI set the video to display by default at 448x336 (4:3)Users can set the video to display at full screen (let's say full screen = 1280x960)I can only provide one video resolution to cover all scenarios .Is there any logic to encoding the video for the larger size of 1280x960? Am I wrong in thinking:

Video encoded at 1280x960 and displayed at this size will look better than video encoded at 448x336 and enlarged to 1280x960; andThere will be minimal difference between video encoded at 1280x960 (and shrunk to 448x336) and video encoded at 448x336.

View 10 Replies

Media Server :: H.264 Encoding Not Displayed Properly

Jun 23, 2011

We have a webcam/chat application that is having bad issues with the video display of a live stream. The application is a bit old (Flex 3.2 recompiled to FB 4.5) and uses FMS 4 which gets it`s encoded streams from FMLE 3.2. The problem is that when a stream is sent using H.264, the playback in Flash is quite bad. Visually, it basically looks like Flash does not always display the "in between keyframes information" properly. Big square pixels from the last keyframe appear instead.

View 3 Replies

Media Server :: Publish To FP11 With H.264 Encoding?

Nov 16, 2011

I want to build an application to stream h.264 video from the browser, how can I be able to do this? I can't seem to find the playerglobal.swc anywhere, I have Flash CS5.5

View 1 Replies

ActionScript 3.0 :: Setting Character Encoding To UTF-8 In AIR Or StageWebView?

Feb 28, 2012

I'm making an AIR app that uses StageWebView to display an external html page.  The external page displays Spanish accented characters fine in browsers, but they show up as �� in AIR.Is there a setting available that I'm unaware of for setting character encoding to UTF-8 in AIR or StageWebView?Here's my code:
 
var webView:StageWebView = new StageWebView();
webView.stage = this.stage;
webView.viewPort = new Rectangle( 660, 180, 335, 480);

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved