ActionScript 3.0 :: Delegate Heavy Computations To Be Handled Asynchronously (on The User's Machine)?

Aug 20, 2010

Is it possible to delegate heavy computations to be handled asynchronously (on the user's machine)? When it's done, I could just fire an event, catch the new data, and update. I have played with this for lesser operations, by just setting up a que and only handle a few operations per frame; but is there another method? That feels like a heavy handed workaround, and it won't scale with faster/slower machines. IE: 12 operations per frame works fine on the test machine, but my machine can handle more, but won't do it because it's hard coded.

View 2 Replies


Similar Posts:


ActionScript 3.0 :: Determine User Machine Performance?

Feb 20, 2009

I'm thinking of varying content in my app depending on user machine performance.
Is there any good standard methods? Like a mini-benchmark-test first thing in the app. I guess you could measure both the time of a function (quick but true?) or framrate of some drawing.

View 14 Replies

ActionScript 2.0 :: Possible NOT To Cache Mp3 Files To User's Local Machine?

Jan 11, 2005

I want to use this Flash MP3 player URL...on my website to play my music compositions. It is a fantastic player, but it is caching the mp3 files to location "C:Documents and SettingsuserLocal SettingsTemporary Internet Files" on the user's machine.Is it possible NOT to cache the mp3 files to the user's local machine.Pls let me know if there is any other flash xml mp3 player which has the same functionalities.

View 14 Replies

Flex :: Flash Player Only Returns The Domain Name Of The User's Machine?

Nov 19, 2011

I have developed a flex application (Flex 4.5.1).I want the flex application to be used only by the domain names that I allow. As soon as the application is loaded, I check with the remote database if the domain name is valid.

The problem is that flash player only returns the domain name of the user's machine. What I want is the domain name of the website that the flex application is part of. For instance, if the webpage I browse for my flash application is[url]...., I need [url]...or [url].... Is that possible? Every method I have tried only returns the name of the website visitor's computer.

View 2 Replies

Flex :: Store Some User-specific Data On Machine Such As A History Of His Entries?

Mar 31, 2010

I am deploying a desktop application using AIR, and I would like to store some user-specific data on the machine such as a history of his entries.

View 2 Replies

ActionScript 3.0 :: FileReference.load() -> Loader.loadBytes() - Allow A User To Upload An Image From Their Machine To Be Displayed On A Website?

Jan 22, 2011

The purpose of this is too allow a user to upload an image from their machine to be displayed on a website. The code's pretty straight forward and i have it all working fine, but have come across an issue. When certain portrait images are selected to be loaded and displayed, they get rotated at some point in the process and become landscape? There doesn't appear to be any consistency to the way they are rotated. Some are clockwise, some counter clockwise.

The one thing i've noticed though, is that it doesn't appear to be an issue with images that have been re-saved (so simply taken into photoshop and then saved without any modification), only images that are the original source of an image taken by a digital camera? This has got me wondering whether there's a possible issue with flash reading the meta data of the source image? The attached zip file contains the source code and swf, a selection of images from 2 different camera's and a modified image.

Just to note, due to the dimensions of the images, in the source code the bitmap is scaled to 0.1 so that the result can be clearly seen. I've tested this without the scaling and the image still gets rotated. There's a trace in the Event.COMPLETE handler of the Loader.loadbytes() method and you can see from this that the width and height of the loaded image have been switched? Note - due to the size of the zip file (4.6MB) because of the images, i've put them up on my server for download instead.[URL]

View 5 Replies

ActionScript 3.0 :: In MVC, How Should Already-loaded Data Be Handled

Sep 3, 2011

I have an AS3 application and I'm trying to implement an MVC framework.On the model's initialization, data is gathered about the user. When the user clicks a button, say to print their first name, I want to request and retrieve only that data from the model.I currently have the view listening for a button click. The button click is handled by the controller. The controller fires a "getUserFirstName" method in the model. I'm confused about this part...Since the controller and not the view is calling the method, I can't do a return of the user's first name in this method. Should I dispatch an update event? I'm not sure how to pass this data to the view in the most efficient way.

View 2 Replies

ActionScript 3.0 :: Should A Second Request To The Same Flv Be Handled By Browser Cache

Aug 6, 2009

I have a bunch of flvs that I want to play seamlessly. I figured the safest way to ensure a seamless playback was to preload the files first using a class called bulkloader. Once they have all loaded I start using the flvplayback component with .load() on mulitple vp depths.

My reasoning was the second time the flv file is requested (through the flvplayback.load method) it has already been cached in the browser cached from the previous call so it will be pretty much instant. When I test this with Charles proxy (throttled but with caching allowed it makes two calls for each flv and both are requested from the server ignoring any caching.

I wonder if there is a special case where flv's don't get cached. The bulkloader class uses a netstream object to download the video and I wonder if that has different behaviour to a loader object when it comes to caching.

View 0 Replies

Flash :: Can Swf Be Downloaded Asynchronously

Jan 25, 2012

I'm starting a project that will build a flash file with quite complex capabilities. I expect the size of the swf/swc files will be quite big. In order not to slow down the page download, can I build the swf file so only immediately needed components are loaded with the page and other later-stage components can be silently loaded in the background?

View 1 Replies

ActionScript 3.0 :: PHP To Flash Asynchronously

Jan 31, 2010

I have a Flash application that exchanges data with php scripts. Problem is, I can SEND updates, not receive.Example:

- user drags an object to another area
- flash sends this action to a php script using URLLoader
- the server acknowledges the action and returns an "ok" message with the same URLLoader

Now if the server wants to send a message, like "there's an update available", or "your friend has logged in", how is this supposed to happen?I believe an always-open socket is out of question, because the server will have to handle too many users at once and the section might be indefinitely long. I'm not so sure about the Flash client constantly pinging the server.So, what's the best way to send data from PHP to Flash asynchronously?

View 11 Replies

ActionScript 3.0 :: Loading Images Asynchronously?

Feb 3, 2012

I am trying to write a class, which loads multiple images asynchronously. Can anyone help me to write a image loader class which loads multiple images. My doubt is that do i need to create different instances for Loader and URLRequest for each images? How this is managing efficiently.

View 3 Replies

Flex :: Load Components Asynchronously?

Oct 3, 2011

I have a flex application that shows information gathered from different external services by using rest api. Some of them are resource intensive, take longer to response.

View 1 Replies

ActionScript 3.0 :: Loading Large Content Asynchronously

Aug 20, 2010

I have made an application which loads large pictures and videos (1920*1080 px).

- Picture component is a swf movie that I load with a Loader and feed him with the path of the picture I need

- Video component is a custom actionscript class that uses Video class.

Before to create any of these components, I display an animated sprite (a wheel to suggest a current loading). Then I create this component and load the content. When the content is loaded, then I add it to the display list and remove the wheel sprite.As these actions take a while, the wheel is visible for 1 to 2 seconds. My problem is that during this loading operation (by a Loader or Instantiation), the animated Sprite is not running properly and smoothly, like if Flash was loading the pictures and videos synchronously.Is there a way to make an animated sprite running properly while I am loading a swf or loading a video through the instantiation of a class, means running something asynchronously?

View 2 Replies

ActionScript 2.0 :: Heavy SWF File Size

Aug 3, 2010

I have an expandable banner project to do and the final swf file has to be under 40kb. My swf size is actually 144kb and I don't know what to do to get to 40kb.I've tryed to compress my images but I can't to 40kb even if they are all squashed up.I've tryed also to load my PNG's file externally using Loader but it just don't decrease the swf size.

View 0 Replies

ActionScript 2.0 :: CPU Heavy Alpha Shift?

Sep 22, 2006

So i am building a site for a client, and in it i have incorporated an automatically cross-fading background made of large photos.Wheneve they cross fade programatically my CPU gets WORKED!

I am using

Code:
if (this.photo1.imageholder1._alpha<100-this.fadeSpeed) {
this.photo1.imageholder1._alpha += this.fadeSpeed;
}

as the fading command. Is it just a characteristic of flash that it HATES to do ALPHA changes?

View 6 Replies

ActionScript 2.0 :: Snow Effect Not Processor Heavy?

Nov 18, 2008

Has anyone found a script in AS2 for a nice snow effect that it doesn't make the computer go crazy with so much processor calculations?I tried almost every script around and makes my website completely crash most systems.my flash file is about 600k with quite a few menus and 930 x 630...so its a bigger res than most

View 4 Replies

Flex :: Asynchronously Poll A File Using A Flash Timer Without Blocking The UI?

Jun 26, 2009

I have a flex application that repeatedly polls a remote XML file to detect changes, but I've found that once the file hits a certain size, the poll blocks the UI and makes the page unresponsive for a short time.

Is there any way to ensure that the call made to the server or the event from the flash.utils.Timer class runs asynchronously to the main UI thread?

View 3 Replies

Flex :: LocalConnection AsyncError : Dispatched When An Exception Is Thrown Asynchronously?

Nov 6, 2010

I'm working on implementing communication between an Adobe AIR app and a browser Flash object, and the LocalConnection documentation mentions an asyncError as a potential event:

asyncError: Dispatched when an exception is thrown asynchronously — that is, from native asynchronous code.

However, that's the only documentation I can find on it. Does anyone know what this error actually means? I've searched around but couldn't find any reference -- most sample code I found does an addEventListener() for the asyncError but doesn't give any clue as to what it means or when it could occur (i.e. if it could occur when sending or when recieving).The Adobe documentation page also lists potential events for each method, but asyncError isn't listed under any specific method, only for the general class.

View 1 Replies

Actionscript 3 :: Update Data Inside A Scroller Asynchronously In Flex?

Nov 22, 2011

I am adding data inside a VGroup dynamically using Action Script. Each data is an instance of a custom component. So when the number of item is more, It take time to load, which look bad.

Is there any way, we can load data to it, asynchronously or is there any way, so that more data can be added inside a scroller only when the scroll bar reaches to the end ( as it happens in Android or IPhone).?

View 1 Replies

Java :: Use Eclipse And Make Heavy Use Of The M2Eclipse Plug-in

Oct 30, 2010

Our project badly needs to move to Flexmojos4 to get a fix, but this requires Maven 3. Our project makes extensive use of Maven and we really love it, but have configured it very heavily. Between a dozen modules we probably have 50+ pages of XML configuration.

We also use Eclipse and make heavy use of the M2Eclipse plug-in. We also use the following Maven plug-ins:

Resources
BuildNumber
SQL
Hibernate3
Flexmojos

[Code]...

View 2 Replies

ActionScript 3.0 :: Heavy Calculation Prevents Screen Update?

Feb 8, 2009

I'm not 100% sure thats the problem, but It seems so. One other thing it could be, is maybe the screen doesnt update untill an event listener has completely finished?

Anyway here is my problem: My app does some pretty heavy calculations when the user clicks on a certain button. From testing, the calculation can take up to 3 seconds to complete. What I want to happen is, as soon as the user clicks the button, a "please wait" appears in the middle of the screen. 3 seconds later, after the calculations have completed, the "please wait" sprite disappears again.

However I cant seem to make that happen. Right now, when the user clicks the button, the please wait sprite does not show up at all. Using trace statements I'm pretty sure whats actually happening is, after the 3 seconds of calculations, the please wait sprite is set to visible and then invisible at essentially the same time, so you dont actually get to see it on screen.

Heres the code:

Code:
private function mouseDownListener(e:MouseEvent):void {
pleaseWaitSprite.visible = true;
trace("now visible");

[code]....

The trace statements "now visible" and "now invisible" show up at exactly the same time in the output window, even though there is 3 seconds of calculations between them. I guess the same thing is happening with the visible code.

Ive tried e.updateAfterEvent() but not surprisingly that didnt help. I think I need something more like e.updateDuringEvent() ... ?

View 14 Replies

IDE :: SWF Optimization - Heavy Graphics - Convert A MovieClip To Sprite

Jun 19, 2009

I'm coding games that come with the graphics done. Unfortunately the designer has some bad practices, such as not using Sprite symbols - never. And the files have dozens (even hundreds) of symbols in the library, very few of them with any animation. I would like to re-brand such symbols as Sprite to save some CPU (and maybe even kB), but my graphics-related skills are very low. Where should I start? Check and convert the symbols at authoring time or it's possible to do this at runtime? Can I effectively convert a MovieClip to Sprite (I'm guessing casting to sprite won't help much) or another light image type?

View 3 Replies

Flex :: BitmapData Heavy Usage - Memory Disaster (Spark / FB4)

Apr 12, 2010

I've got a flex component which works pretty well but unfortunately turns into a disaster once used in a datagroup item renderer of about 40-50 items. Essentially it uses bitmapdata to take screenshot of a fully-rendered webpage in mx:HTML (this version of webkit rocks btw, miles better than flex 3). The code is pretty self-explanatory I think. [URL]. I've optimized it all I could, browsed, search for answers and already trimmed it down a lot, I'm desparate to reduce the memory usage (about 600mb after 100 draw). The Garbage collector has little effect.

View 3 Replies

ActionScript 3.0 :: Download Music And Heavy Files To Users Hard Disk?

May 1, 2010

MMO best practice. Download music and heavy files to users hard disk? I have just downloaded a Hello Kitty MMO app for research (for my kid of course).I am developping my English teaching app with LOADS of classical music, mp3 sentences and heavy background bgs. Would the best idea be for client to download these to their hardisk ie I would not need to stream them and therefore save a fortune on bandwidth charges from my ISP?

View 3 Replies

Application :: Heavy Flash Animation /interactive Infographic Be Adapted Or Made Into An App?

Jan 12, 2012

My question is can this site's [URL]..flash animation architecture/ interactive infographic be made or adapted into something more accessible like an app?

What would it take do to something like this. I need help wrapping my head around a project like this.

View 2 Replies

ActionScript 2.0 :: Menu To Call And Load Image-heavy Movies Separately

Jan 13, 2010

I am trying to create a flash service tutorial to appear on a website that will be able to play and load 6 steps of a process separately when prompted with a button click. I do not want to link back and forth between web pages to do so, but rather have the files loaded on demand and played within one flash movie "viewer" to keep things clean.

Each movie is going to be somewhat image heavy. load each of the 6 step movies within one main movie file?

View 2 Replies

ActionScript 3.0 :: Why To Delegate / When Can Apply

Feb 16, 2007

What is the advantage of using a Delegate class in as2? I realize that it's old news for as3 guys. But Ive got a medium sized as2 project and Im going through my code and wondering why Im using Delegate.create sometimes. What's wrong with "apply"?I admit that I must have jumped on the Delegate bandwagon without thinking anything more than "dhuu...thats what the pros must be using".Am I right in saying that there is nothing at all wrong with simply saying "function_name.apply( this, args )"? Or am I missing something? Is it a matter of memory management? I've done a lot of research on delegation and read all kinds of blogs and scripts from little tweeks to the official.. to >200 lines. Yikes! At the end of the day I wrote my own little delegate class that worked for me (just a rewrite of Proxy without loops). But now that I go though my code I see that I might as well have just used apply because that's all Im doing with it!

Id like to be a better programmer. What am I missing and why shouldn't I do a find and replace here. Why is it better to wrap up "apply"? Will I be better readied to learn other languages?I just don't understand why I was so convinced that I needed the delegate class when I had "apply" out of the box.

View 5 Replies

ActionScript 2.0 :: Using The Delegate Class?

Oct 30, 2007

I'm having trouble using the delegate.create method (my first time using it!). Here's part of a class I have...

Code:
public function SiteData(xmlFile:String) {
imagesXML = new XML();

[code]....

View 9 Replies

ActionScript 3.0 :: When To Use Delegate/ Dispatcher/ Listener

Jan 29, 2011

I have a ColorPicker Component and I want to (on its CHANGE EVENT) have the LISTENER OBJECT ( known as A) change ANOTHER OBJECT's (known as B) color, based on the ColorPicker's.selectedColor. I do this because i need OBJECT A to keep track of the colors used. Also OBJECT B is dynamic and its instance is based on USER INTERACTION thus B can equal B1 or B2 or C based on mouse click at any given time but must only be 1 at any given time. SO I'm trying to "chain" the events together using listeners/ or delegation but I'm not sure at the logic.how do i reference the objects in the event? should I just try to chain B to listen directly to the event?  How can I do this without having to attach listers to the colorpicker every time?

View 8 Replies

ActionScript 2.0 :: Using Delegate For Nested Buttons?

Sep 29, 2009

I'm having a hard time understanding to use the Delegate class. I don't seem to understand what it does from what I read online.

Will it work for this situation? I want to rollover a menu that expands onRollover. You can then click on buttons within the rolled over portion. Is delegate for me?

View 0 Replies







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