ActionScript 3.0 :: Flash Player 10 3D - Bitmap Smoothing?
Jun 16, 2011
I'm creating an aerial view style game with the flash player 10 built in 3D, but Some of my sprites are very small, like 32x32 pixels, and when they are placed into the 3D world they become very blurry.
Is there a way to prevent flash player from smoothing the objects?
View 0 Replies
Similar Posts:
Oct 18, 2010
I'm doing a simple bkend admin using php for the client to upload images to be displayed on their flash website. ideally if they upload at the correct size, no problem, but sometimes they don't. So my problem comes in when the uploaded images are very big. When they are scaled down, the smoothing makes no difference at all.
I was wondering if there is a work around?
Code:
import flash.display.*;
loadMcListener.onLoadinit = function(){
var bitmap = new BitmapData(mc._width,mc._height,true,0x000000);
[Code].....
View 1 Replies
Feb 7, 2012
What I am doing now is loading a .png image with a Loader object. After loading the file I cast the loaderInfo's content to a bitmap and set the smoothing value to true. This works without a problem until I reach a ScaleX and ScaleY value less than 0.5.
For example, if I have a 1000x1000 object, scaling it down to 200x200 causes the bitmap smoothing to no longer work.[code]...
View 1 Replies
Dec 9, 2003
getting a bitmap to apply smoothing properly after being scaled very small.What I am doing now is loading a .png image with a Loader object. After loading the file I cast the loaderInfo's content to a bitmap and set the smoothing value to true. This works without a problem until I reach a ScaleX and ScaleY value less than 0.5.
For example, if I have a 1000x1000 object, scaling it down to 200x200 causes the bitmap smoothing to no longer work.I can reproduce the problem using all of the following Sizing methods:
Change the scaleX and scaleY properties on the bitmap. Directly change the height and width properties of the bitmap. Add the bitmap as a child of another sprite and change the scaleX and scaleY properties of the sprite. Add the bitmap as a child of another sprite and change the height and width properties of the sprite. Creating a new BitmapData object with a matrix scale and then drawing the original BitmapData onto it.I've also tried some other workarounds that I found when searching, such as:setting the scaleX of the image to 1.001 or 0.999 forcing the height and width of the Bitmap object to be even numbers.
Below is some sample code for reproducing the problem. (I am running this locally so I have a copy of testimage.png in my bin-debug folder)
public class MainObj
{
public var comp:UIComponent;
public function MainObj()
[code]....
View 2 Replies
May 11, 2010
i have made a bitmap over a menu and the only problem is that I made a scale and a rotation over that bitmap and it gets distort and I don't know why, because I use this:
ActionScript Code:
attachBitmap(b, 2, "always", true);
when i attach the bitmap.
View 9 Replies
Aug 3, 2010
I would like to use the smoothing function for my code here below.This is just a slideshow gallery that resize the photos at 100% full page with scaling proportions.=
2 - Another problem issue: this has a little movement effect that moves the photo when the mouse moves. To do this i scaled the images at 110% but it looks a bit streched here.
Code:
// import tweener
import caurina.transitions.Tweener;
import flash.events.Event;[code]....
View 3 Replies
Nov 8, 2009
Trying to set the smoothing of a dynamically loaded, through XML, JPEG set to true using AS2. I've seen an example of that would do this with this code:
createEmptyMovieClip("myMC",getNextHighestDepth()) ;
loadBitmapSmoothed("mypic.jpg",myMC);
In my code I'm loading a series of products from an XML file. Each bit of information for each product gets loaded into a seprate array. I have a 'zoomy box' image, which loads an image, but at 200%, which I want to smooth...
The code:
nZoompic1[i] = (childs.childNodes[EEE].childNodes[i].childNodes[18].firstChild.nodeValue);
What the syntax would be for getting it to work?
View 4 Replies
Jan 1, 2011
Can I control bitmap smoothing levels, or is it strictly on and off (true, false)?
View 1 Replies
Nov 9, 2011
I'm using the regular 3D API of flash player 10 and i'm rotating on the Y axis a sprite which contains my bitmap. Although the bitmap.smoothing property is set to true, the bitmap is far from smooth.
View 8 Replies
Dec 1, 2008
I need fullscreen gallery and the bitmap smoothing thing. I tried to combine the gallery code and the bitmap code I found in this thread. Well, it's a xml based fullscreen gallery and it works fine but without smoothing . okay, i hope anybody can help - here is an extract of the gallery code:
[Code]...
View 2 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
Apr 20, 2010
I'm having a helluva time trying to figure out the syntax for smoothing of dynamically loaded png's. It's such an easy function for as3, but seems very complicated in as2.
Actionscript Code:
import mx.utils.Delegate;import mx.transitions.Tween;import mx.transitions.easing.*;var numOfItems:Number;var radiusX:Number = 100;var radiusY:Number = 40;var centerX:Number = Stage.width / 4;var centerY:Number = Stage.height / 2;var speed:Number = .001;var perspective:Number = 3;var home:MovieClip = this;theText._alpha = 0;var tooltip:MovieClip =
[code]....
View 5 Replies
Feb 19, 2009
I have searched several threads, and no answer has been found to apply a bitmap smoothing to an image already inserted inside a movie clip on stage (not dynamically loaded). Any suggestions on what to do to apply smoothing to an image inside a clip? Trying to come up with an answer as I am getting a funny fuzz around a logo that I'd like to see disappear. It appears clean and crisp within the png file, but not in the compiled swf.
View 4 Replies
Nov 6, 2009
i have a question and a unfortunate problem to report. First my question is how do I apply smoothing to a rotating bitmap asset that is in the flash timeline, (i.e.: not dynamically loaded), I don't like it all jaggy like that. Is there a way I can apply bitmap smoothing to a movieclip with a bitmap in it without going through all the rigamarole of loading the asset eternally? Bonus points for something super simple like MovieClip.forceSmoothing (I need this in AS3).
And unfortunate issue: I have a problem in Papervision. I think it might be a bug, where a plane object with an externally loaded BitmapAssetMaterial makes the computer chug like mad when the plane is viewed edge on or very close to edge on (I am using transparent PNGs). They display fine otherwise.
[Code]...
View 0 Replies
Nov 26, 2011
Enable the development of apps that use very large bitmaps. BitmapData objects are no longer limited to a maximum resolution of 16 megapixels (16,777,215 pixels), and maximum bitmap width/height is no longer limited to 8,191 pixels.Does this mean that limit does not exist anymore, or it just has been raised to a greater value (as it used to be in previous versions)?
View 1 Replies
Feb 15, 2010
I am having problems with the images being smooth.I have edited the code throughout with forceSmoothing = true and _quality = best.It all works and looks smooth if I test the file in the preview window and if I run the HTML file. But as soon as I put the file under IIS the smoothing stops.All my flash players are v10+ . I have turned the IIS compression off but no luck.
View 1 Replies
Jun 15, 2011
I have a problem with embedded FLVs: if I have a player I can apply the smoothing easily, but if I have a timeline-embedded FLV without a player? How can I smooth it?
View 2 Replies
Mar 5, 2010
In Flash, I can go into the properties of an image in the library and check 'allow smoothing' to enable resampling when the image is scaled or rotated.
How can I achieve the same effect for images loaded dynamically by the SWF from an external URL?
View 2 Replies
Aug 19, 2009
I have a short flv I want to play on my website. I use the below actionscript 2 code to play the video, but the anti-aliasing of text is really poor quality. I added a line to introduce "smoothing" to the video, but it appears to have no visible effect.
var my_video:Video;
var my_nc:NetConnection = new NetConnection();
my_nc.connect(null);
var my_ns:NetStream = new NetStream(my_nc);
my_video.attachVideo(my_ns);
my_ns.setBufferTime(2);
my_ns.play("thevideo.flv");
my_video.smoothing = true; //does nothing
Incidentally, I am exporting the flv video from aftereffects, and when I export the movie as a (larger) "lossless" quicktime movie, the movie looks perfect when played in quicktime, but has the same poor anti-aliasing when viewed in adobe media player, VLC, or mplayer.
View 1 Replies
May 13, 2011
I think that Tweener is not using fractions of pixels on x,y movement, but that exactly what I need. I read about rounded parameter (default:false), that would round pixels, to reduce problems with text, but I want to slowly pan an loaded image, so I don't want to use a rounded value. My code:
var bmp = Bitmap(loader.content);
bmp.smoothing = true;
Tweener.addTween(loader, {x: 20.0, time:10, transition:"linear"});
Image smoothing works fine, but it slides choppy. It looks like moving 1 pixel at seldom frames, not some fraction of px per frame. I'm considering that flash image smoothing has to deal with fraction of pixels. I searched over stackoverflow, and all I could find was about image smoothing, and not about x,y movement smoothing.
View 3 Replies
Sep 29, 2008
Is there a way to auto set smoothing for all bitmaps in the library? or at least for imported bitmaps?
View 1 Replies
Nov 29, 2009
I've got a MovieClip containing several child clips (images and text). I'm trying to scale this parent clip very slowly - from 102% down to 98% - this works, however the child movie clips are all scaling a bit jerkily - like they're trying to stick to pixels or something. What's the cure for this? The scaling is done by using a motion tween on the timeline by the way. I've tried to tick "Cache Bitmap" but that makes no difference. If I used the 3D motion tween, there is no jerkyness. But I need to publish to flash 9, so can't use that!
View 1 Replies
Aug 7, 2009
Use the flash CS4 tool's on a bitmap image after tracing the bitmap image and applying my settings?
View 10 Replies
Feb 3, 2009
I'm cutting my teeth in actionscript 3 on a game that has a character running through a world. So, I have set up my Hit Testing by using the bitmap data hit test method, since I figured my world is going to be destructible - it'd be nice to update the level and then redraw it and have the character interact with the new change. (That works beautifully) I am however; a bit confused as to how I have my hit Testing set up. I've been messing around with it, and it works for now - but I'm not sure why.. currently, I have a character set up by using a class I built and using a series of animations I created. So, this character has a walking and falling animation, etc. This is a movie clip.
Then there's a bitmap 'emptyBitmap' with bitmap data created - however; I never really added this as a child to the character. This is sized to the dimensions of my character. My level is created as a movielip, then it's drawn to a bitmap - when the level movieclip is changed, the bitmap redraws, and that's how this updates.
[Code]....
View 1 Replies
Aug 20, 2009
I know the topic of "duplicating" movieclips is a hot issue with the new virtual machine. Luckily, I understand the implications. I only am [currently] interested in duplicating a Bitmap. See, I load an image from an URL using 'flash.display.Loader.load', which is a non-blocking operation in Flash Player.However,I may use multiple copies of the loaded image (which is reported to be a Bitmap, naturally) in the display list at the same time.Hence, I naturally do not want to load the image from an URL every time, because I don't want to wait for a non-blocking call to complete. Nor do I need to - I mean one copy is already loaded, so it should be possible to just "duplicate" it, right?
My idea is to do use the bitmapData property of a Bitmap and pass it to the constructor of a new Bitmap object. I have not tried the following in action, but I want to hear whether any of you did and if the following would not work, what would:
Code:
var original_bitmap: Bitmap;
var copy_of_original_bitmap: Bitmap = new Bitmap(original_bitmap.bitmapData);
LiveDocs mention that the BitmapData being passed to a Bitmap constructor is "being referenced", which to me might suggest it cannot be used twice? There is also the BitmapData::clone() method, which I am not sure is applicable here or not.I know this is a lot of talk instead of just trying this out, but I test so much Flash Player code daily just to see "what works" (which should be documented instead by Adobe),
View 4 Replies
Feb 22, 2011
If I have a BitmapData that's already been drawn onto a Sprite. Is there a way to redraw the BitmapData onto a Sprites Graphics object without having to invoke beginBitmapFill and passing in the same BitmapData?
View 1 Replies
Dec 29, 2010
I'm working on a game, and to keep performance good, instead of addChild'ing 50 new sprites to the stage every second, I decided to have each player draw to their own bitmap, and then to the 'master' bitmap. This introduces an issue though: the second player would override all data the first player has put into to bitmap...My basic debugging proof of concept:
Code:
// bitmap test
import flash.display.Bitmap;
import flash.display.Bitmap;[code]......
View 1 Replies
May 9, 2011
I have a bitmap which has several frames (packed along the horizontal axis). In order to render them I copy it to the backbuffer (larger bitmap) as follows:
Actionscript Code:
public override function copyToBackBuffer(db:BitmapData):void{ if (active) var drawRect:Rectangle = new Rectangle((currentFrame-1) * frameWidth, 0, frameWidth,
[code].....
View 5 Replies
Feb 17, 2012
In pure AS3, I have a pixelbender and a large bitmap. The pixelbender is configurable with a distance parameter to affect only a small area of the bitmap. The problem is that the pixelbender is executing over the whole bitmap. What would be the best way to update only the effected region of the bitmap? Given this config:
[Code]...
View 1 Replies
Oct 8, 2006
Is there a way to write a bitmap font right into the bitmap being desplayed? Mabey better worded: myBitmap.draw(image, t) draws a picture is there a way to draw text? I'm stuck even if its just a work around in some way I would like to know... (the current work around i have in my head is writing it in a movieclip turning that into bitmap data and drawing it... esentially creating a prototype answering my question... but a built in way would be easier probably).
View 2 Replies