ActionScript 3.0 :: Image-performance Questions (jpg Vs Png, Smoothing, Image Size, Etc)?
Feb 28, 2011
I've done quite a bit of digging but it's surprisingly difficult to find informed answers to these questions. I'm making a Flash game with a friend; as far as we can tell, the code is fine, but there are some serious framerate problems that seem entirely related to the graphics.
Is there a performance difference between Movieclips as JPGs and PNGs? Most of our graphics are imported as PNGs because they have transparent sections, but I don't know whether there is a performance difference between setting image compression to JPG or PNG within Flash itselfDoes turning on "Smoothing" for an image affect performance?Obviously larger graphics have more of a performance hit, but is there any benefit to splitting a large image into pieces? Example, changing a 2000*1000 background into two 1000*1000 pieces? One thing is most of our graphics are as much as twice the size in the library as they are displayed onscreen, then scaled in the code. We had wanted to make the game still look good when zoomed in/fullscreened but that doesn't seem practical so I'm planning on resizing all of the image files to their final size in the game and removing the scaling code. Hopefully that's the major part of the problem.
View 2 Replies
Similar Posts:
Apr 14, 2009
Is there a way have smoothing = true on an image on the stage that isn't dynamically added.I know about "allow smoothing" .What I want to do is have the image smoothing = true when mouse is over the image so a tween event can occur. The reason I want to do it like this is because I don't like it when "allow smoothing'is ticked the image is blurred.
View 1 Replies
Jun 5, 2009
I come across this again and again in flash. Using the default timeline based tweening (with the FPS set to 24)...is there any way of smoothing out the jerkiness? any AS i can add on frame 1 for example?
View 1 Replies
Apr 25, 2008
I have some high res images that I am zooming in and out of, I have smoothing enabled that works fine when zooming in on the image, but when I zoom out and make the image smaller it pixelates it really badly. Is there any way i can resample the image or make the smoothing better when the image is small?
View 3 Replies
Nov 25, 2010
I am loading an image into my swf. My code is:
var imageLoader:Loader = new Loader();
imageLoader.load(new URLRequest("btnover/Capture2.gif"));
imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
imageLoader.smoothing = true;
But I get an error:
1119: Access of possibly undefined property smoothing through a reference with static type flash.display:Loader.
The image is a set size but the swf resizes with the browser, and the image becomes pixelated.
View 1 Replies
Oct 22, 2009
If you load a Bitmap object from a domain other than that of the Loader object used to load the image, and there is no URL policy file that permits access to the domain of the Loader object, then a script in that domain cannot access the Bitmap object or its properties and methods. I can understand this to some degree but all I want to do is scale the image and so that it doesn't look completely gash I want to smooth it and hence need Bitmap.
Smoothing to be accessible (I dont and never will have a cross-domain policy file). With video you can apply smoothing and thats coming from another domain, I can even take a bitmap snapshot of the video and so I really dont understand why they wont allow this. I am scaling the image to fit the screen either as bestfit or streched and so scaling at 0.5, 2, 4 etc wont work.
View 1 Replies
Feb 4, 2010
I have a image gallery slideshow, and when it loads an external image there is no smoothing applied. So being as this slideshow scales a image to the browsers window size, the image gets pixelated.Problem is, being as i did not make this slideshow myself, i dont know how to apply smoothing. And the AS code is very long, so i cant really paste it all on here.So i want to know if there is a way to force image smoothing on any image that is loaded in to the slideshow .swf? or any other way i can do it?This is with CS4 and publish settings are Flash 8 AS2.
View 3 Replies
May 5, 2010
Currently trying to create a dynamic flash slider that basically displays a series of thumbnails which the user can rollover and click on. The idea being that on rollover the thumbnails enlarge slightly before returning to their normal size on rollout.
[Code]....
View 4 Replies
Apr 7, 2008
in flash there is a setting to 'allow smoothing' for images that are imported. how can i do this in AS3 so that the images i dynamically load are smoothed (because when i scale them they look bad).
View 4 Replies
Jul 28, 2009
I bought and installed a component and now the place I got it from is not giving support and their site has been pulled. The issues is that I can't figure out how to convert the loaded images into bitmaps in order to apply smoothing. Can someone look at the code in the attached .fla and give me a heads up as to where to add i
View 8 Replies
Dec 2, 2009
I set up this sample movie clip in the hopes to figure out a problem I'm having:[code]In the above code, I can add the contents of myImageLoader to myMovieClip with no issues and it resizes as expected (and consequently artifacts appear). With the final two lines of code, apparently myBitmap is not being loaded with the contents of myImageLoader.content which will cause the final line to fail with the following error:Code:TypeError: Error #1009: Cannot access a property or method of a null object reference.at loadImageTest_fla::Main Timeline/frame1()I understand the error, I just don't get why the contents are not being loaded into the bitmap object.
View 1 Replies
Sep 11, 2007
I'm creating a dynamic image gallery that resizes the images to fit the gallery size, and then smooths them out.I feel like I'm super close to getting it to work perfectly. The image smoothing always works, but the resizing is kind of iffy. The first image displayed will resize just fine, but when you view any others they're all distorted or squashed. What's strange is that I've traced out the resized image dimensions and they're exactly what they should be, but the images are still not resizing correctly.
Here's my code! I only included the parts of it that are really relevant, but let me know if you guys want to see all of it. It's a combination of a few tutorials that I found. I may be able to provide a live example, but it's for work so I'm not sure how the nondisclosure agreement would affect that.
Code:
var thisWidth:Number;
var thisHeight:Number;
var maximumHeight:Number;//height to which movieclip to be resized
[code].....
View 2 Replies
Mar 14, 2011
i've created a full spectrum color wheel Sprite object that is composed of 1440 vector triangles, or slices if you will. since i want to animate the color wheel, i've activated the display object's cacheAsBitmap property. however, caching the vector as a bitmap does not increase performance during animation it remains slow, jumpy. importing a PNG screenshot of the color wheel into the library with lossless compression, converting it to a Sprite, and rotating this new image asset performs great during animation. why does an uncompressed PNG image asset import out perform the same vector image with cacheAsBitmap property set to true?
View 1 Replies
Apr 6, 2011
I have three images and I want change the images size based on the scene size (default size is 1024x768). After each image has completely loaded I call bindableUtils.setter to set width/height when scene size changes but I don't know how to make a pointer or something like that. I'm using a public var img, but it only works with the last complete image.
Here is my code:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
[code].......
View 2 Replies
Apr 5, 2010
How can I tell the size [width and height] of the bitmap image that the Image is containing (not the size of the Image component)
Also I want to know this as soon as possible, so I think this needs to be in the Event.COMPLETE event?
View 2 Replies
Oct 24, 2011
i want to rotate 3D an Image called img1 in Flex. I want to rotate it around y axis 180 degree. I can do this by using 3D effect already built in Flex but i want to do a bit more different. I want during rotating, there's another image called img2 appear on back of img1 (in default case, the image appear on the back is img1) and when rotating finish, the image will be img2.
View 2 Replies
Apr 7, 2010
I am making a sort of portfolio gallery inside my flash project. Every image I try from large to small still shows up very jagged. What is the best size to fit in my 1024 by 768 stage taking up about 80% of it?
View 5 Replies
Oct 26, 2010
I have xml file with images, and they appear in gallery one by one. Is there anyway to trace the width/heigth of each image?
View 1 Replies
Aug 26, 2009
I am using flash 8. and i have one .Jpg image (1024 x 768px - Its vary) now i want to load this image to my Movieclip. But my movieclip size is 130 x 140px. how is it possible to load and fix this movieclip size.
View 1 Replies
Apr 6, 2009
I have a background image at 720x576px. My flash document is also set to the same. When I import my graphic and drag it onto the stage it is a completely different size?
This means I have to re-size using the free transform tool, and as I have to re-size many images for different movies that have to be exact, what is the best way to re-size them? Should my imported image not fit the stage size exactly without re-sizing at all?
View 9 Replies
Dec 21, 2010
I have been trying to figure this out for the longest. I had got it fixed but flash suddenly crashed and everything was lost. Now here is the as code, I want to know how I resize the _loc5, which is the image that is being called.
Actionscript Code:
var _loc2 = _loc6.attachMovie("galleryThumb", "thumb" + _loc3, _loc3);var _loc5 = swfRoot + dataObject.path + dataObject.id + "_" + _loc3 + ".jpg";var _loc4 = _loc2.createEmptyMovieClip("imageHolder", 1);_loc2.id = _loc3;_loc4.loadMovie(_loc5);
View 1 Replies
Jan 6, 2012
I am importing layers from my Photoshop file to Flash to create a Flash Banner ad using CS5. My Banner size is set-up in PS as 160x600 72DPI. Are there any tricks to getting my file size down without losing anymore resolution when importing to the flash Stage?
View 1 Replies
Jun 18, 2010
Can I get the height of an image from its URL information in ActionScript 3? I have the image URL. I want to draw the image in my UI and I want to set the height of the drawing area dynamically upon getting the image.
View 2 Replies
Apr 1, 2011
i have this source in flex - easy program which switch between two states..in second state is show myImage component
<?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 2 Replies
May 7, 2011
In my Flex application I load an image into the Image control. After loading the image I can apply filters like color transform or grayscale etc and then I want to save the image with the filter applied. I am having trouble saving the image with the filters applied. With the following code the Image gets saved without the filters.However, if I use [code]...
View 1 Replies
Jun 3, 2011
I have a swf and the background image looks bad in a monitor 1680 x 1050 , it get cutTo define this in flash, I hace to edit my image to this size 1680 x 1050, but in flash How would I define this?. Can it be done in html code?
View 1 Replies
Jul 25, 2011
I am using bitmap to load the image, if the image size is more than 2880 h/w I am getting an error.[code]...
View 2 Replies
Sep 23, 2011
I'm loading images from xml file. I want the images to have standard width when they are displayed.
Here are the snippets of the code that do the image processing:
var allThumbs:MovieClip = new MovieClip();
addChild(allThumbs);
allThumbs.width = 200;
allThumbs.height = 200;
[Code].....
this lines, where I wanted to resize the images before they show up in the ScrollPane.
View 1 Replies
Oct 25, 2011
I am wondering if there is any way to determine the width and height of an image that is decoded to a ByteArray.For example in the below, any way to determine these values for data?
var data:ByteArray = new ByteArray();
data = encoded_image.decode(byteArrayData);
View 1 Replies
Aug 26, 2009
I am using flash 8. and i have one .Jpg image (1024 x 768px) now i want to load this image to my Movieclip. But my movieclip size is 130 x 140px. how is it possible to load and fix this movieclip size.
View 0 Replies