Flex 4 :: Keeping Data Providers In Memory

Jun 11, 2010

I am working on a modularized Flex application, and I am trying to cut-down on the amount of client-server interaction.Every time a module is opened, a request is made to a web service to get values to bind to the Flex form. If a user closes the module, and then reopens it at another time during their session, the same web request will be made.Since this data is static, i.e. not changing, I am thinking about creating global variables to hold the data providers. On the initial application load, a series of web service calls will be made to fill all needed data providers. Then, any time a module is opened, it can use these global providers instead of making unnecessary and repeated requests. These are NOT going to be huge providers, so I don't think browser memory should be a concern.

View 1 Replies


Similar Posts:


Flex :: Switching Between Data Providers ?

Jun 5, 2009

Suppose I have one combo box and I am switching its data provider from oldDataProvider to newDataProvider with ActionScript. Both data providers are ArrayCollections. Then, when a change occurs in the oldDataProvider ArrayCollection, it affects the combo box, although it is not its data provider anymore. Specifically, when removing an item from oldDataProvider (in the range of the newDataProvider values), it decreases the selectedIndex value of the combo box by one, changing the selected item.

View 1 Replies

Flex LineChart With Multiple Data Providers?

Jan 15, 2010

Can I create a LineChart with multiple data providers? Since LineSeries has a dataprovider property, I'm assuming the answer is Yes

[Code]...

View 2 Replies

ActionScript 3.0 :: Keeping External SWF In Memory

Feb 22, 2011

So I am loading external swf's. These swfs contain a 16 frame image sequence on the stage. When I load the swf's and go to each frame via actionscript, they load into memory and they play fast and smoothly. If they sit on a single frame for a certain amount of time, the rest of the frames are dumped from memory and the image sequence plays slow again until each frame is displayed and stored in memory again. I really want to keep all the frames of these timelines in memory until I choose to unload the swf's manually.

View 1 Replies

ActionScript 3.0 :: Arrays Of Arrays / Data Providers And Dictionarys

Aug 26, 2009

I've got a bit that loads a big chunk of xml data about products.I push product info into an array(e.g. productArray), then add that array to another array (e.g. allProductsArray)How do I sort those arrays? For instance, if I want to sort the allProductsArray based on the info in productArray[0]?Alternatively, would something other tha an array of arrays be a better route?This loader loads the same sort of info for many different clients, so the bit to sort on will change.

View 5 Replies

ActionScript 3.0 :: Load Data Into Flash And Keeping Their Data Type?

Jun 4, 2009

i load in AS3 data into flash and mantain their data type? Like receiving an array and even with arrays in it and recognizing that is an array instead of a standard string.

And if this is possible is it more reliable then using XML?

View 1 Replies

ActionScript 3.0 :: Keeping Loader Contents After Loader Removed From Memory

Aug 21, 2009

I'm loading some images with Loaders, cloning the BitmapData to a new Bitmap, and adding the Bitmap as a child of a Sprite. So far, so good. I want the Loaders I'm using to be removed by garbage collection, which they seem to be. The problem, or so it seems, is that when the Loaders are cleaned up, the Bitmaps I'm creating lose their data.

Edit: All this is happening when a class is instanced, and many copies of this class are being used as actors in a game. As the Actors are being created the older ones are losing their BitmapData to garbage cleanup. When all of them are finally loaded, only the last few are visible. I've rewritten my posted code as a class. If I prevent the Loaders from being cleaned up by somehow keeping a reference to them, the Bitmaps don't lose the data, but I don't want these Loaders hanging around.

[Code]..

View 1 Replies

ActionScript 3.0 :: Keeping References To Primitive Data Types/Properties?

Oct 26, 2009

Primitive Data Types (Boolean, int, Null, Number, String, uint, and void) are treated as "values" rather than Objects, so when you pass one of them into a function, instead of passing a reference, it basically clones the information, and creates a new instance. It does the same thing when when you use "primitive1 = primitive2", and instead of passing on a reference, clones it.I thought there might be a slim possibility Flash allows me to reference primitives if I treat them as objects instead of (in this case) ints.

Code:
var num1:int = 5;
var num2:Object;

[code]......

View 6 Replies

ActionScript 2.0 :: Keeping The Data Parameter Of The Object Created With A While Loop

Mar 7, 2004

i've been struggling with the following:

i am creating a list of buttons with an attachMovie. the AS is :

//as
var i = -1;
while(++i<userlist.length){
var user = userlist[i];

[Code].....

okay the problem is this: then i assign an on click function to every button right in the while loop that uses the data parameter of the "ob" object and when i play the movie the data parameter is always the parameter of the last object created for all the buttons. I know why this is happening- it overWrites the old "ob" with the new with every itteration of the loop.

But how would i go differently about creating an individual "ob" for each button created and still be able to have a function with a data parameter like this.onRelease.userClicked(data)?

View 9 Replies

Flex :: Flash - Total Memory Usage And TaskManager Memory Usage Are Different?

Aug 24, 2010

I wrote an application in flash AS3, and when I trace from flash the total memory usage of the total application is only about 9MB, But at the same time Task Manager Shows the memory usage as 110MB. Around 100MB difference.Flash Trace Method System.totalMemory difference of the Trace from the Beginning of the application to end of the application.

View 2 Replies

Flash :: Sharing Different Videos Providers To Facebook Using Wordpress?

Aug 28, 2011

I want to be able to share videos from my Wordpress site to Facebook using different video providers. I was able to use my own video player, but I'm not ready to post videos using my server and I prefer to have users post using a provider like youtube, vimeo, facebook, ect.. Right now my site has those kind of video players. I edit the meta tags several times, this is the one I currently have:

[code].....

I also tested it using a single youtube video and it worked fine. But since I have other videos beside youtube I can't do it where it just gets a youtube id. Yesterday the posts without videos were showing up, but now when all posts gets share it shows up like if it was a video on my wall, so if clicked it will give an error. I been pulling my hair all week with this and still couldn't get it to work.

when I update my script, it takes so long for facebook to update the change. I have to wait for so long in order to test it again, like if facebook is holding it in cache for too long, is there a way to bypass that?

View 1 Replies

Actionscript 3 :: Flex 4 - Keeping An Element/component Always On Top?

Feb 29, 2012

I have placed two custom components in the flex 4 application <preload:PreLoader horizontalCenter="0" verticalCenter="0" fontWeight="bold" fontSize="50" id="preLoader"/> <util:Debug top ="0" right="0" id="debug"/>

As per the order components added in the MXML, Debug will stay on top.

My intention is to always keep the Debug component on the top the PreLoader component has all the logic to initializing the application including instantiation of some of the classes which intern has logic to add some other elements to the application (like below)

[Code]...

View 1 Replies

Actionscript 3 :: Access Raw File Data As FileReference.load() Loads It In Memory?

Jul 8, 2011

access raw file data as FileReference.load() loads it in memory?

View 2 Replies

Flex :: Keeping Focus On A Textbox When Clicking A Button

May 31, 2011

I have a series of editable text areas in which I want to be able to add a variable on the click of a button.

If I click the button the textarea loses focus and so I cant code which textarea I need to add the variable into. Can anyone think of a way of keeping focus on the textbox, inserting the variable and then allowing the user to carry on typing.

I've been playing around with the setFocus function trying to get this to work with no success.

Here is a snippet of my code:

public function addFirstName(myText:string):void{
myText = myText + "<<firstname>>";
}
<mx:TextArea id="txt1" change="text1=txt1.text" text="{text3}" editable="true"/>

[Code].....

View 2 Replies

Flex :: Blazeds - Keeping Alive HTTP Session For Long

Oct 30, 2009

Any standard way to keep alive the http session as long user has open the flex app in the browser? I played around with the polling mechanism of blazeds. But it had no affect on the http session.

View 3 Replies

Flex :: Photo Gallery - Resizing Image Whilst Keeping It Central

Mar 4, 2010

I am using a mx:Resize effect to change the width of an image in Flex (leaving the height to look after itself) but I want the image to remain vertically centered on the page. Whilst I could calculate the aspect ratio of the photo, and work out the new y value to keep it centred, I would have to include a mx: Move effect too, and I am hopful that Flex has a simpler way. This is for a photo gallery where images are loaded at run-time, and swapped about.

So I really would like to avoid recalculating the aspect ratio and vertical position every time the updateComplete event fires, I tried putting my image inside a mx: VBox with verticalAlign="middle", thinking that the box would do all the centering for me, but this only seems to happen when the app first starts - i need it to gradually adjust the position during the period where the effect plays (to keep it central even when part-way through).

Here's a stripped-down example (which doesn't work):
<mx:Application xmlns:mx="[URL]" layout="absolute" width="600" height="600">
<mx:Resize id="fxResize" target="{imgPhotoA}" widthTo="350" duration="500" />
<mx:Button x="10" y="10" label="Resize" click="fxResize.play()" />
<mx:VBox id="boxPhotoA" x="100" y="20" height="500" width="350" verticalAlign="middle" borderStyle="solid" verticalScrollPolicy="off" horizontalScrollPolicy="off">
<mx:Image id="imgPhotoA" width="60" maintainAspectRatio="true" source="[URL]"/>
</mx:VBox></mx:Application>

View 2 Replies

Actionscript :: Hiding Nodes In A Flex Tree Component Keeping The Children Visible

Apr 9, 2011

I have a tree with a dataprovider which takes the following form:

<details name="Cars">
<contact_person>aaaa</contact_person>
<list>

[Code].....

That is I want to hide the contact_person and list nodes.Deleting the nodes from the dataprovider cannot be done.So what i did was to create a custom tree data descriptor by extending DefaultDataDescriptor.Then override the getChildren method and applied a filterfunction to the collection returned by super.getChildren.The problem is when i hide the 'list' node I cannot have the child nodes to show up.So is there any way I can hide 'list' but show the children of 'node'?

View 1 Replies

Actionscript 3 :: Greensock LoaderMax Memory - Clean The Memory Which Been Occupied By The Previous Queue

Jan 31, 2012

I have a bit trouble with LoaderMax memory occupy, i have a queue, and i am keep loading images depend on user's action. if they click load more and it keep load, but i would like to clean the memory which been occupied by the previous queue (i have remove all the children been added by the loading previously). is there a way i can do it? the behavior like this.

[Code]...

View 1 Replies

ActionScript 3.0 :: Memory Monitor That Allows To See The Memory Leaked And Find Its Location?

Sep 26, 2010

I have an FPS monitor running and notice that I am getting choppiness here and there, bringing my game from 40 to 27 fps and back and forth at certain stages. I have an idea of where it is happening, but do not know for sure. I looked up quite a few memory monitors but haven't found anything decent yet. Is there a memory monitor that allows you to see the memory leaked and find its location? If not, how about just he memory leaked?

View 4 Replies

Flex :: Removing Flex DisplayObjects From View AND Memory Pool

Feb 15, 2011

There is a Flex app with 7 main views. And there is a memory issue when navigating between views.All these views were in a ViewStack, but due to some involving 3D objects I assumed it was too much to have it all in the display list. I'm now clearing all children from the stack and adding/removing them when needed. This gave a small performance increase, but still becomes unresponsive with use. The strange thing is, with this and the original method, the CPU climbs with use but eventually levels out somewhere. Now I'm creating new instances of each screen when they are navigated to and setting the previous variable to null. Now it looks like CPU is spiking when the view is created, but leveling out to something much much lower than it was. This felt like progress, but now the available memory keeps climbing where it wasn't before....

My understanding was calling remove child or remove all children would mark the object for deletion when the garbage collector next ran. I can't see any other references to the instance. My code is along the lines of [code]I have a function for each button to add a new instance like the above.The only thing I can see and feel silly asking but need confirmation, is each view extends a class called "Screen", this class contains a singleton reference to some core components.[code]Would this trick the garbage collector into thinking it was still needed? General advice on clearing Objects from the memory pool would awesome!!! I've never needed to analyze the Flash Player in such depth.I think it's an error with sound drivers, removing all sound and shes purring like a kitten. Works on my machine fine with windows XP, but not on the touch pad the application is crashing on with windows 7 (unsure of the drivers looking into them now) Now I'm thinking its not the drivers, tried 3 different versions, all with no improvement. I did discover the sound was fading in and out with the TweenLite lib. Doesn't look like there are any memory leaks in TweenLite as it works fine on other machines. Just the use of volumeEasingFunction seems to consume increasing amounts of CPU until it freaks out. It is crappy hardware running windows 7, which doesn't help.

View 1 Replies

Flex - Can't Find Huge Memory Leak In A Flex 4.6 Web Application?

Mar 16, 2012

I have a Flex 4.6 web game which displays 2 Lists with virtual layouts with 2 custom item renderers. The renderers consist mainly of BitmapImages displaying user avatars + few Labels.

The Lists are being updated often over TCP socket with gzipped JSON data. I merge that data into 2 ArrayCollections serving as dataProviders for the Lists. This seems to work well, the Lists do not flicker and are updated correctly (I've monitored debug traces a lot to get it right).

[Code]...

View 1 Replies

ActionScript 2.0 :: Memory Management - Take Less Memory For Scrolling

Aug 2, 2007

I'm making an isometric game and I need to know which takes less memory for scrolling, making everything invisible that you can't see? Like if(!this.base.hitTest(worldHitter))this._visible = false; Or would it be better to remove the movieclips unseen and then reattach them when i should see them?

View 2 Replies

Flex :: How To Get Memory Size Of ArrayCollection

Feb 2, 2010

I have built an image cache which is an ArrayCollection containing images. I have built functionality so that the cache can hold a max of 250 images. However, the images can be of a different size, so it's better to limit the total memory size of all images in the ArrayCollection. How I can get the total memory size of an ArrayCollection without looping through all the items in the ArrayCollection?

View 1 Replies

Flex Application Memory Usage?

Mar 4, 2011

System.totalMemory gives the total memory used by the flash player and not one particular application. Is there any way I can get the flex application's memory usage in code/actionscript?

View 3 Replies

Actionscript 3 :: Loading Images In Flex Cause Memory To Go Way Up?

Jun 29, 2009

Loading images into Flex (size < 100kb) causes IE7 memory increase by a megabyte per image. What's going on here? Here is the code I have -- this for each image:

[Code]...

View 3 Replies

Flex :: Spot Memory Leaks In Profiler?

Jul 20, 2009

I have an AIR/Flex app I made, I have a few people testing it and everyone is reporting that after leaving it running for a while, it is making all there machines run very slow. It runs fine at first so this must be a memory leak somewhere. I used the profiler on this and the only thing that shows as using a substantial amount of memory is MethodQueueElement which is not a class I wrote, and I have no idea what it does, I am assuming its part of the Flex framework. I am not familiar with using a profiler so I am not sure what all I shuld be looking at, that was the only class that was high on "memory" and it said it had over 100,000 instances. If this is my problem what can I do to fix it?

View 1 Replies

Flex - Degrafa States Memory Management?

Nov 10, 2009

I was recently profiling my application that uses Degrafa States in the skins and noticed that doing so uses more memory than I expected. Between the SetProperty and State, they were using about 10% of the total used application memory.

Would it be better to use css for the state changes and a new skin for each state? or Are there some simple tips to reducing the memory footprint of degrafa?

View 1 Replies

Flex :: Memory, File Size, And Variables?

Feb 4, 2010

Does creating a lot of private variables that may never be used increase file size and or memory usage of your application?

View 2 Replies

Flex :: Detect Memory Leaks In Flash?

Feb 11, 2010

How do you know if your compiled SWF file has a memory leak?

Are there tools, a firebug setting, etc... to see if there is a problem? I cannot find much in the debug Flash player besides file size and loading time.

I have a large Flash application that I maintain and suspect that is using way too much memory so I wanted to measure the amount of RAM being used while it executes to find key areas to optimize.

View 3 Replies

Flex :: Find Where Is Memory Leak In Application?

Sep 7, 2010

How to find where is memory leak in a flex application?

Are there some tools to catch and analyze this problem?

View 2 Replies







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