ActionScript 2.0 :: OnResize CPU Intensive?

Jul 10, 2007

I've made a flash file which contains the following:backgroundMC (consist of vector art made in illustrator and imported)holderMC (loads an external swf which contains my game)I want the background to scale when the Stage get resized so I used the following code as everyone else does:

ActionScript Code:
Stage.scaleMode = "noScale";
Stage.align = "LT";[code]....

Then if I resize my window the backgroundMC doesn't, because the listener isn't active anymore... Is there a way to resolve this? .I want my Stage to resize the backgroundMC, but without causing my game.swf (which is dynamicly loaded) to run slow...

View 1 Replies


Similar Posts:


ActionScript 2.0 :: Listener.onResize

Jul 8, 2003

Within flash 8 i'm working the folowing website:[URL] The centered MC size changes when clicked a button.I published the movie as a 100% x 100% with a noscale option. I want to add a movieclip in my main timeline wich must go automatically to the left of the users screen. if you got 1024x 768 and even when someone got a nice 30" screen from with a resolution from 2560x1600. yesterday i posted a thread and i've got the next code wich did not work in my movie. the next code i placed in my main timeline:

[AS]
listener.onResize = function ()
{
menuMc._x = menuMc._y = 0;

[code]...

I tried several things today but nothing works. i tried different publish settings. the listener option was new for me and i tried to find out what it does.do i need to add a line like addListener? or do i need to name the function?

View 3 Replies

ActionScript 2.0 :: OnResize - Get Position Of Nested Mc?

Jun 12, 2011

I'm trying to make a menu that resizes its size when browser is scaled. I've been able to do that, but I can't get the position of the text inside the menu bar to change position when resize.this is the code:

Stage.align="TL";
Stage.scaleMode = "noScale";
bar1._x = 114;
bar1._width = Stage.width-228;

[code]....

View 2 Replies

Actionscript 3.0 :: Swfobject Onresize Buggy In IE?

Apr 4, 2010

ive tried not using swfobject and static embedding in swfobject, and the flash itself in IE was buggy in both cases (size and position of movie clips and text inside the flash). using dynamic embedding in swfobject fixed this, however, now the size and position of the whole flash object is buggy, not the individual elements inside the flash.funny as it may sound i consider this an improvement,especially since most of the advice i am getting out there is that no matter the case i should be using dynamic embedding with swfobject always.the page consists of three divs,a content div, and a banner and menu div in which there is flash content dynamically embedded to stretch to 100% of the divs width and height,and the divs themselves are programmed to maintain the correct aspect ratio no matter how the window is stretched with the doResize function in the dimentionator.js file,which is called when the window loads and whenever the window is resized.

this works fine in all browsers except IE. in IE, when the window loads, it doesn't resize, it just shows the banner maximized for some reason. you have to actually click and drag the bottom right corner of IE to resize it manually and then see it proportion correctly. and, if you do it to quickly, the flash doesn't have time to catch up and it will be bigger or smaller than it needs to be. finally, if you maximize or minimize the window the size is what it should have been before you pressed the button.so all of those problems could be fixed the divs are resized when the window is idle right? i have tried making a timer to call the doResize function every 5 seconds, and actually increasing and decreeing the size of the divs by one pixel every five seconds, but the flash stayed the same size. i am sure that the functions were actually called, and the divs themselves resized, but the flash stayed the same size.heres the site, check out dimentionator.js (you can see it and all the rest of the stuff i used in this site by going up a directory)

View 1 Replies

ActionScript 2.0 :: OnResize Skewing Image?

Mar 27, 2007

I have the following and have managed to be able to use onResize to resize just my mc 'mcl',it currently fits horizontally but not vertically, so it's stretching, I want to stretch 100% on the left and right hand side but in proportion

Code:
var myClip = this.createEmptyMovieClip("mcl", this.getNextHighestDepth());
var myLoader = new MovieClipLoader();

[code].....

View 1 Replies

Actionscript 3 :: Add OnResize Event / Check To Scroll Bar

Jan 16, 2010

I have a an swf, called 'controls' that I created with flash cs4. I upload the controls.swf to my web server. I create an application in flex and it loads the external swf controls into itself. So far I can manipulate the controls.swf via my flex app. I created a class in my external swf, but I need to add some onResize event/check to my scroll bar. For example, if my scrollbar size increases/decreases, I want it to change variable values. Is there some movieClip.onResize event?

View 3 Replies

IDE :: Making Perlin Noise Less CPU Intensive?

Feb 5, 2009

Lately I have been trying to animate the water surface giving it more natural look by use of Perlin noise. But it seems it is very CPU intensive operation. And if I use it along with other animations on the stage which involve lot of movements then it become really difficult for the machine to render the entire scene.

View 2 Replies

ActionScript 3.0 :: Reposition All Of Movieclips When The OnResize Event Gets Triggered

May 4, 2010

There seems to be just one problem I cant get around. Its a full screen flash site so when the browser gets resized, it looks all weird until you refresh the browser. I think it would be too hard to make a function to reposition all of my movieclips when the onResize event gets triggered so I figured it may just be easier to restart the flash movie from the start when it gets triggered, how could I refresh the movie, or possibly even refresh the browser? here is the site so you can see what I am talkin about [URL]

View 4 Replies

ActionScript 2.0 :: (FMX) Less Processor Intensive MC Scaling / Fading

Aug 14, 2004

I am trying to get 50 rectangular MC's to scale larger and fade to another color on rollover and rollouts. However, with the code I am using my processor can't handle it after about 8-10 MC's have been rollovered. Can anyone offer a better way to do this? Here is my code:

[Code]...

View 5 Replies

ActionScript 2.0 :: Less Processor Intensive MC Scaling / Fading

Aug 14, 2004

I am trying to get 50 rectangular MC's to scale larger and fade to another color on rollover and rollouts. However, with the code I am using my processor can't handle it after about 8-10 MC's have been rollovered.[code]

View 5 Replies

ActionScript 2.0 :: How To Change Height / Width Of Loaded Movie OnResize

Jan 19, 2009

I am trying to get the loaded movie "GB.swf" to scale/change width and height onResize. And yes I do want to be loading into a level, not into a mc, with loadMovieNum. Here is the code:

stop();
var depth = 5, x = ((Stage.width/10)*2)+10, y = 160;
var widthscale = ((Stage.width/10)*6)-20;
var heightscale = (Stage.height-170);
_root.onEnterFrame = function() {
this["_level"+depth]._x = x;
this["_level"+depth]._y = y;
[Code] .....

View 0 Replies

ActionScript 3.0 :: Full Screen Source Rect And Onresize Event

Dec 19, 2008

So, I have my fullscreen working, selecting a rectangle to scale to. and everything is good there,.. the issue is that the I have an onresize event, that positions the entire sprite... so.. when it goes into fullscreen, it obviously fires the resize event, which inconveniently slides my content to the right, as it tries to recenter the content. any way I can make it so it doesn't fire the resize event.

View 3 Replies

ActionScript 3.0 :: Force Update During Processor Intensive Routine?

Apr 29, 2009

i have a swf with several processor intensive subroutines within a main init() routine at start up (about a 5 secs startup wait). it needs a preloader not due to asset loads but to the processor intensive routines.i'm trying to create a preloader that will display progress as the routines complete but when i try to write text to text field as each subroutine completes either the textField.text is not updated or the text field display is not updated after each subroutine finishes.this prevents me from tracking the progress of the start up.

is there a way to force an update to the display list in the middle of a processor intensive routine? i believe flash is supposed to update after each frame but i'm not seeing this.also, the text field i'm displaying *before* this processor intensive routine *does* display when running locally but *does not* display before the routine when running online.not sure why.

View 21 Replies

Flex :: Optimization - Throttle A CPU Intensive Loop In Adobe?

Aug 17, 2011

I have a method, which connects to a HTTP server and requests via XMLRPC, a list of data structures and then for each data structure gets a list of attributes and the values of those attributes. It's implemented using nested for each loops.

The problem is that it's loading a lot of data all at once, and consuming a massive amount of CPU (over 100%) reading responses from the server and parsing the XML.

If I were writing the program in C, I'd insert a usleep() at the end of the loop, to wait before trying to load more data and reduce CPU usage. What would the equivalent be in Flex?

View 2 Replies

ActionScript 3.0 :: Algebraic Or Trigonometric Functions More Computationally Intensive?

Feb 27, 2011

I'm not certain that there's a set answer to that question, so let me give you a more specific example: In my current code, I can solve a problem one of two easy ways: either by using three algebraic functions (one square root and two squares) or by using three trigonometric functions (one atan2, one cos, and one sin). And then I potentially repeat the code for several hundred iterations.

I'm curious if one set of functions is any more efficient than the other, if they're fairly similar, or if there may be a set of higher-order functions I'm missing that can do these kinds of computations much more easily.(For some more specifics, if you're interested: given a line between any two points, I want to find a new point along that line that's a set distance from one of the other two points.)

View 5 Replies

ActionScript 3.0 :: Loop Through An Array / Object That Is Less Processor Intensive?

May 18, 2011

Just curious, if you want to loop through an array or object that is less processor intensive.[code]...

View 4 Replies

ActionScript 3.0 :: CPU Intensive Animation - Get These Huge Animations To Run In The Background Smoothly?

Jan 24, 2009

So I'm building a music site for a client, he's got a record theme so I thought it would be cool to build the site to look like a big turn table with all the content on the record.the record is designed to spin (not as disorienting as you'd think, just the grooves spin)...but the record image, which I did in Photoshop, is huge.

It was just slowing things down to a near crawl in browser. So I split the record image into four pieces and then mirrored them to get the full piece of the pie. It worked, but it's still running slightly slow. I do have a couple of blending options set to act as lights over the record...I tried deleting them to see if it would run faster, it's still jumpy. When the record is not moving(there's a button to turn it off) everything runs smoothly. The entire move is about 300k in file size and the record is being animated via actionscript.How do some of these bigger sites get these HUGE animations to run in the background so smoothly?

View 7 Replies

ActionScript 3.0 :: Recording A Graphics Intensive SWF As A Video Format Runtime SWF?

Mar 24, 2010

What options are available for recording a graphics intensive SWF as a video format such as MOV, MPEG, or others. I have created an interactive SWF and would like to capture video of it so that I can share it in different formats. I have used some free screen capture software before, but am not sure it is the best choice since maintaining the frame rate is important. Worst case scenario, I could just eliminate user interaction and automate the input...

View 2 Replies

ActionScript 2.0 :: [Flash 8] MC - Make A 95% Black MC Cover Everything On The Website Page (full Screen OnResize)

May 16, 2007

how I can make a 95% black MC cover everything on the website page (full screen onResize) so I can present an externally loaded image by itself? I have seen this done before in a few flash portfolio websites but I can't seem to find the solution on any previous thread. I may have missed some threads. is there an actionscript that can do all of the above without having to resize an MC?

View 4 Replies

ActionScript 2.0 :: Stage.broadcastMessage("onResize")?

Feb 9, 2007

Stage.broadcastMessage("onResize") doesn't seem to work. I have a lot of classes that add new content to the stage at runtime and would like to be able to call all the different onResize functions in various classes that listen for a stage resize so things get positioned correctly. Do I need to do some plumbing or is there a way to tell the Stage to broadcast a message?

View 4 Replies

Java :: View Part Of A Web Application - What Technology For A Pretty Intensive Grid View

Aug 3, 2010

I'm about to have to write a web page/app that will serve the agenda for circa 100 people on a page. One line per person, one column per day with 3 clickable zones in each cell. In HTML, the page is way complex for the browser to load quick and there is no possibility to click on a border between 2 cells to for example split an event that spreads among several cells. So I search an not too overkilling technology to render this kind of view. I begun with a PHP generated HTML page but the number of elements in the page make the mouse move jerky.

Moving to JAVA would give me better performances regarding the reuse of the generator of the view but it will still be an HTML page. So, here is my question: do you think that going forward with JAVA and its graphical capability is the simple solution or is Flash a better option for this part of a Web App? I'm afraid of the code I'll have to write in JAVA to handle the GUI presentation as well as the events generated by the 1000's cells plus borders of the page. In Flash, the graphical part seems simpler even if the actions handling is still huge.

View 2 Replies

Flex - Options To Create Line Chart In Flex For Data-intensive Web App?

Jan 13, 2012

My group is working on a Flex/AS3 scientific web application that is data intensive. Luckily the only plots involved are line charts. However, each line chart may have multiple traces (up to 24), and each trace may contain up to 2000 points. The user will need to zoom in and out and interact with the data (e.g. data tips, etc.).

The response I'm getting from developers is that's a lot of data to render in a plot in Flash. For reasons beyond the scope of this post, we can't sample the data to reduce the size (this has already been done and nature of the data prevents further sampling).

Rendering speed is critical for this app. What kind of rendering speed should I expect the Flex 4 line chart component to provide for a given number of points (e.g. 1 second to render 1000 points?)

Are there products available that handle plotting large data sets better, which can be incorporated in Flex (I've seen FusionCharts and ZingCharts online but have no idea how they compare with Flex's components)? Of those, which are easy to develop with while still providing a lot of flexibility in look and feel?

View 1 Replies

ActionScript 2.0 :: CPU Intensive Loop "abort The Script..." - Prevent The Pop Up?

Dec 21, 2004

I have a very CPU intensive loop that lasts for about 30 secs sometimes more.
The loop is very well controlled and ALWAYS terminates correctly after the solution is found. It cannot hang.

The problem is that the very annoying dialog "do you want to abort the script" pops up in the middle of the loop. It really screws up the the interface as the users thinks the machine has hung. Is there any way to prevent the pop up?

View 7 Replies







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