ActionScript 2.0 :: Dynamic Loaded Smooth Bitmaps Lose Transparency

May 26, 2009

I am loading some bitmaps(transparent pngs) that I want to scale and remain smooth. We all know the problems with flash player 8+ anti-aliasing the images and not allowing the images to be forced to be smoothed. I want the png to retain its transparency. I use flash8 actionscript 2.

Here is the PHP Code:
var mclis:Object = new Object();
//An object that listens for a callback notification from the MovieClip Loader event handlers.
mclis.onLoadInit = function(target_mc:MovieClip) {
thisHeightInit = target_mc._height;
thisWidthInit = target_mc._width;
[Code] .....

View 2 Replies


Similar Posts:


ActionScript 2.0 :: Fullscreen - Dynamically Loaded Multiple Smooth Bitmaps

Aug 3, 2007

I have played around with the Dynamically Loading Bitmaps With Smoothing from Tinic U ro as well as somme other advices from people on the kirupa forum. The code works great. I am trying to load different Bitmaps, fullscreen, on the click of a button (or any other event). The images load, but they just stack on top of each others and thus, they don't resize to the stage properly. Here is the code with the attached FLA: ( you'll need 3 jpg named bg1.jpg, bg2.jpg, bg3.jpg, all in the same folder as the fla)

[Code]...

View 3 Replies

ActionScript 3.0 :: Alpha Transparency Bitmaps?

Aug 28, 2009

I haven't worked with AS3 for a few months, and even when I did I never took the time to learn it to extensively ..

I'm creating an isometric map editor, the bitmap that I'm using to take the tiles from has a transparent background, but when I draw the tiles to the main bitmap it displays as white, so it messes up the overlapping (since they're isometric).. How can I make the background of it transparent?

[Code]...

View 7 Replies

ActionScript 3.0 :: Bitmaps Won't Smooth?

Nov 18, 2009

I'm loading some external images and trying to get them to smooth, but for some reason it's not happening. i've been trying everything i can find on the internet over the past 10 hours or so, and nothing's worked.The code on my movieclip (first frame) is:
 
[code]...

my images are very high-res, so i know it isn't a resolution issue. anyway, they look crappy when they're sized down too. also, i'm pretty sure smoothing is the issue, because i have a very similar image in the library (a detail from the same shot, and similar resolution, etc.), and it looks great when i allow smoothing in the bitmap properties panel.

View 3 Replies

ActionScript 2.0 :: Make A Function That Will Not Lose The Values Of The Variable Before Calling It And Will Not Lose Them After It Is Finished

Dec 2, 2004

how to make a function that will not lose the values of the variable before calling it and will not lose them after it is finished. example.

[Code]...

View 4 Replies

ActionScript 3.0 :: Dynamic Sprites With Perspective Lose Mouse Event Functionality?

Oct 20, 2009

I really don't need happening after spending a week figuring out why some code didn't work, only to rewrite it and have it suddenly start working. I guess it's the classic case of running into more, more serious problems right after making an extremely good breakthrough!.Anyways, my problem is that my dynamically drawn sprites with the PerspectiveProjection property set on each, all of which are contained in a movieclip (which is at stage-level), no longer have MouseEvent functionality - at this point, I think anything past regular Events no longer work, but my stack of important issues eats up all time I have to test.

Before I started having issues, I was using just a scale effect to simulate the 3D-ness of the movie. After figuring out why past attempts at using Z axis on these sprites failed, I decided to add the perspective part to the transforming of each of these sprites. Ever since then, Mouse functionality just simply does not work. No errors are thrown, no runtime errors are displayed, yet the trace function does NOT work within the functions (meaning it isn't the content of the function not working) - simply does not want to do anything!Other animations and such work perfectly fine - i.e. tweening the X, and Y values, etc

View 1 Replies

ActionScript 3.0 :: Transparency In A Loaded JPEG Image?

Oct 10, 2008

Im quite new to the ActionScript scene so apologies if thisquestion has already been answered elsewhere. I am creating a 2dshooting game, and Im loading multiple images of various enemiesfrom several jpg files, but when I display these on screen heimages have a big black square round them. Now when I amprogramming in another language such as OpenGL, if I wanted to getrid of this I would enable an alpha blending function and set 100%transparency for the black colour which I want to hide. So I loadthe jpeg file and store it in a BitmapData variable, and then Icopy this into a new BitmapData variable with transparency enabledand set to 0x00000000 (fully transparent black). I thought thiswould solve my problem butt no joy. My code is shown below:public class GraphicsLoader extends Sprite {

public var loader:Loader; // The bitmap loader
public var bmp1:Bitmap;
public function GraphicsLoader(path:String)

[code].....

View 4 Replies

Professional :: Control Transparency Of Loaded Movie?

Jun 6, 2011

I have used a loader to play a swf, and I've managed to scale it like I want it - now I would like for it to fade in and out. How do i do that? Below is the as3 script I am using:

var loader:Loader=new Loader();loader.contentLoaderInfo.addEventListener(Event.COMPLETE,f);loader.load(new URLRequest("BldgBanner_r3an.swf"));addChild(loader); function f(e:Event):void{loader.scaleX=.80;loader.scaleY=.80;}

View 1 Replies

ActionScript 3.0 :: Smoothing On All Dynamically Loaded Bitmaps?

Jan 6, 2011

I want somehow to apply smoothing for all dynamically loaded PNGs in my flash file. I have flash file that loads a lot of different images, and there are a lot of flash files like that, so I don't have an option to set smoothing on every bitmap by hand.

I was wondering, if there's perhaps some way to change smoothing to all instances of Bitmap class.

View 4 Replies

ActionScript 2.0 :: Using Image's Bitmaps That Was Loaded From Another Domain?

Aug 6, 2009

I'm loading image from another domain and all is before i try to use it for pattern:

Code:
var pattern = new flash.display.BitmapData(loaded_mc._width, loaded_mc._height,true,0);
pattern.draw(loaded_mc);[code]....

i don't know why but if i'm load XML from the same domain as image before i load image all works fine. i don't know why.

View 6 Replies

ActionScript 2.0 :: [MX] Dynamic Text Transparency?

May 25, 2003

ok i searched to forums and found the following thread:in which Iammontoya says:"to make Dynamic text fade, it must be part on an mc and you MUST embed the font outlinesthen, it will work all day, and twice on Sunday. " and it does seem to work for the posteri tried this by just setting the movieclip (with the dynamic text in it) to an alpha value of 30% but when i output the movie, nothing shows up..ONLY when i slect "No Characters" in the character options of the dynamic text dialog (which is the default setting anyway) then text shows up but always 100% opague, when i select any of the other options to include characters, strangely nothing shows up.

View 3 Replies

Actionscript 3.0 :: Bitmaps Loaded Into A MovieClip Container Are Blurry?

Sep 2, 2009

Running into an issue where the if I add a Bitmap image into a movieclip the bitmap will appear slightly Blurry.When I add the Bitmap directly to the scene it appears normal. Is their a property for a movieclip that would explain this behavior? or is their some other solution to keep bitmaps from becoming blurred?

View 2 Replies

Data Integration :: Loaded External SWF Gets Blurry Fonts/bitmaps

Jun 1, 2006

When i load an external swf file it looses quality and renders blurry. But the swf itself (the external one) looks perfectly fine standalone. Now i ask myself, is this really a flashbug or what the heck is it?

Because i wrote an elearning player wich references hundreds of this files, its not very funny to see the quality dropping. To get some meat for you, i created a small site, wich should make the problem much clearer:

Click here and explore the strange bug

View 4 Replies

ActionScript 3.0 :: Cache / Copy Bitmaps Loaded From External Source?

Feb 15, 2010

I'm working on a chat application that retreives user profile icons from remote sources (e.g. Blogger, Yahoo, Gravatar, etc). Easy to get the images in a Loader and display them. The problem is that a single thread could have hundreds of records, but probably only 10-20 active commenters. In a standard browser, each <img...> link after the first one is cached, so you only hit the source site once. Is there any way to cache/store/copy those images within Flash to avoid requesting the same image over and over?

I can do it in the Local sandbox by accessing the BitmapData of the loader content and cloning a new bitmap for subsequent instances of the same request URL, but of course once the application moves to the Internet the security system requires a Policy file allowing bitmap access. I don't need to manipulate the bitmap at all, just copy it. Or reference it as content from multiple Sprites, or something along that line. Once I've downloaded the image once, I don't see why the security system would prevent me from displaying it unchanged as many times on the page as needed.

View 2 Replies

ActionScript 3.0 :: Grab The Transparency (or Alpha Value) Of Individual Pixels In An Embedded Or Loaded Video?

Jun 27, 2010

how to grab the transparency (or alpha value) of individual pixels in an embedded or loaded video? We tried copying over a frame of video into a bitmapdata object with transparency enabled. However, even though we can "see through" the video at certain spots (indicating alpha = 0 there), the alpha value comes back as 0xFF for every single pixel in the BitmapData object.Obviously alpha data is being stored inside the embedded video, but how can I actually get that value?

View 0 Replies

ActionScript 3.0 :: Comparing And Matching Bitmaps Against An Array Of Saved Bitmaps

Jul 31, 2009

I'm trying to figure out the best way to compare a single bitmap against perhaps an array of saved bitmaps to see how close of a match it may be to any one of the bitmaps stored in the array. Right now I'm running a for loop that uses the bitmapData.compare() method to try to compare to see how much of a variance there is but... to be honest I'm at a loss as to how to use the resulting data to do so. Does anyone know of any good method to accomplish what I am trying to do? Forget looking at my code it's a waste of time because simply, it's not working.

View 4 Replies

ActionScript 3.0 :: Adding Event Listeners To Dynamic Bitmaps?

Sep 24, 2009

I've created this code to loop through an array of image names and load them to the stage. Currently I'm just stepping them down 175 pixels each, which eventually I'll want to offset by the height of each of them (but I'm having an issue with that too  lol ). Anyway...my question is, I've seen code to add event listners to each movie clip dynamically, but that code was working on static movie clips. I want to add the listners to my dynamic images and I'm not sure what that should look like.

[Code]....

I know this isn't correct, specifically in the captureAllClicks function...but I'm not sure how else to reference the current item since it was dynamically generated.

View 14 Replies

ActionScript 1/2 :: Smooth Dynamically Loaded Jpgs?

May 12, 2009

I'm setting up an online picture gallery. I'm trying to make it easy for the client to insert specific images, dynamically loaded, have them appear at 63 percent. If the user clicks on one, it enlarges to 100 percent. Trouble is, when the image is at 63 percent, it is not smooth and looks terrible,All the BitmapData class solutions posted online work for individual images. But I can't figure out how to automate the process in a for loop. At this point I'm not even worrying about the enlarging. I just want the images to load at 63 percent and look smooth.Below is the code for two images. Later I'll increase this to 25.

On the stage are two colored rectangle movie clips: toon1 and toon2. I want the dynamically loaded jpegs to load inside them. The client will manually edit the last lines whenever she feels like it, to choose which images to load.What I need is an elegant AS2 solution in which any dynamically loaded jpeg will be smoothed.

for (i=1; i<=2; i++) {  this["toon"+i].createEmptyMovieClip("cartoon",this.getNextHighestDept h());  this["toon"+i].cartoon._xscale = this["toon"+i].cartoon._yscale=63; 

[code].....

View 5 Replies

ActionScript 3.0 :: Make Smooth/antialias Loaded Swf?

Jun 20, 2011

As far as I know, smoothing of loaded swf file is not possible?To make loaded bitmap smooth/antialias I use:

ActionScript Code:
_bmp = _adImage.content as Bitmap;
_bitmapNew = new Bitmap(_bmp.bitmapData, "auto", true);
_image.unit.addChild(_bitmapNew);

That of course, works fine.But is there a way to the the similar for loaded swf file?

View 5 Replies

ActionScript 3.0 :: Tween With Dynamic Bitmaps Jiggles In Internet Browser

Oct 6, 2010

i have a problem with tweening dynamic bitmaps:

-I have several .jpgs loaded dynamically (with listener for event.complete and dimensions of the original divisible trough 2)

-then I turn the content of the loader into bitmap (casheAsBitmap = false, pixelSnapping.NEVER, smoothing= true)

-scale the bitmaps (scaleX = ScaleY = 0.60) and put them on a container_mc (casheAsBitmap = true; AntiAlias.ADVANCED, PixelSnapping.NEVER)

- then I tween the container_mc using TweenMax from right to left on the x-axis.

View 1 Replies

ActionScript 3.0 :: Smooth A Dynamically Loaded Bitmap From Another Domain

Oct 14, 2009

I've tried a bunch of options but can't seem to smooth a dynamically loaded bitmap from another domain. I've come to believe this is impossible without a cross domain file. Is it possible or not possible?

I keep getting:

SecurityError: Error #2123: Security sandbox violation: LoaderInfo.content: http://....swf cannot access http://...png. No policy files granted access.
at flash.display::LoaderInfo/get content()
at Main/showLogo()

So outside of putting a crossdomain.xml file out there, any options?

View 2 Replies

ActionScript 2.0 :: Scale And Smooth Dynamically Loaded Images

Jun 22, 2009

I've got a nifty bit of script that loads some images from an XML file into flash. It loads the pictures into specified movieclips:

ActionScript Code:
xmlImages.reset();
xmlImages = new XML();
xmlImages.ignoreWhite = true;
xmlImages.onLoad = loadImages;
xmlImages.load("[URL]");
function loadImages(loaded) {
[Code] .....

Each instance of the movieclips are called picture_mc1, picture_mc2 etc. On the frame where these picture_mc's sit, I've got this code:
ActionScript Code:
function randomImage() {
if (loaded == filesize) {
image = (imageFileName[0]);
picture_mc1.loadMovie(imageFileName[0], 1);
picture_mc1._xscale=23;
picture_mc1._yscale=23;
[Code] .....

Everything works fine, but my image scaling is making my picture_mc's look really pixilated. I've seen references to bitmap image smoothing, but i'm not sure the best way to approach this. It seems that each time I try and smooth my images, the code is smoothing the image placeholder, rather than the jpg that's being loaded into it.

View 0 Replies

ActionScript 2.0 :: Wanting A Smooth Transition Between Loaded Movie Clips?

Jun 1, 2006

I have approximately five external movies I am loading into one main movie. I load the movies using various buttons in the main movie.

My issue is this...I press a button and the first movie loads and then runs to the end of the timeline. Works great.When a push a second button the second movie loads and runs to the end of the timeline. Works great also.but I hate how there is a blank space between the movies.

All the movies start with a white stage and end with full graphics. When I press a second button, the movie on the stage disappears immediately and I am left with a white stage for a few seconds while the loading movie animates onto the stage.

I want there to be a cross-fade or some effect that allows the loaded movie to remain on the stage while the second movie is loading. Is there a way to make this happen?

I'm including the code I have for loading movies so you can see what I am working with thus far.

Here is the code:

designingbutton.onPress=function(){
loadMovie ("Quest Wall Animation.swf", "_root.content");
}
specifyingbutton.onPress=function(){

[code]....

View 2 Replies

ActionScript 3.0 :: Smooth Scrolling Dynamic Text Box?

Aug 24, 2010

I am trying to adjust the speed of the scroll box. It is a little too quick. I am not sure where to start.....I tried adjusting the button (_root.TextBox.scroll -= 1;) but it won't accept any smaller numbers. Can someone point me in the right direction?

View 1 Replies

ActionScript 2.0 :: Smooth Scroll Dynamic Text?

Mar 12, 2004

I have a textbox that dynamically loads from a txt file. I'm trying to have the text scroll on its own... kindof like movie credits. The problem that I'm running into is that it appears choppy when it scrolls line by line. How would I make it smooth scroll without any user interaction?

View 4 Replies

ActionScript 3.0 :: Smooth, Slow Dynamic Text Animation?

Dec 22, 2009

I have dynamic text that needs to animate slowly across the screen but right now it jerks in 1 pixel increments as compared to the vector graphics accompanying it.

I've increased the frame rate, converted it to a bitmap, applied GridFitType, etc., none of which (or my implementation) seemed to work.

Is there a way to achieve smooth animation with dynamic text at slow animation speeds?

View 2 Replies

ActionScript 2.0 :: Making A Functional Smooth Dynamic Content Scroller

Mar 5, 2006

Can someone point me in the right direction to making a functional Smooth Dynamic Scroller just like [URL] (Under Portfolio). I'm not saying "The Same" - I mean like, be able to have two icons that I create (One Up and One Down) then have them function the same as the 2Advanced website. Click and hold, it smoothly rolls down/up, release it stops. Also for it to only scroll as far as the content does.

View 5 Replies

ActionScript 2.0 :: Smooth Resize Onclick And Animation To Be Smooth?

Feb 9, 2004

I have a movieclip that I want to be resized when a button is clicked. I want the animation to be smooth as if it had weight though. I read the tutorial on this but I need something slightly different, I would rather it where I can just refer to a function that is set in another movieclip. That way I could easily refer to it again and just set the height, width, and if possible, x, and y.

And my second question, is how to keep the border of my movieclip that is going to be resized the same thickness. I want the inside to be resized but the sides to stay the same width but move to stay on the edge.

View 8 Replies

Lose My Stops In My SWF

Sep 18, 2009

I have made a preloader, yet when i bring my SWF in that i want to load, it loses all the stops that have been put int it? So it just plays all the way through?

View 1 Replies

Professional :: How Much Lose Saving CS5 File As CS4

Apr 4, 2011

I have a presentation to do using Flash on Wednesday and have been warned by my university that files MUST be in CS4 format. So, having used CS5 to create the whole site/presentation how much will I lose back-saving it to CS4? I'm worried I'm going to have to do a lot of the same work twice.

View 2 Replies







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