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


Similar Posts:


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 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

Bring In An Image With Transparency In Flash CS4?

Oct 21, 2009

What's the best way to bring in an image with transparency in Flash CS4?I have a logo in Photoshop that looks great on a black background.  But when I bring it in as a GIF or PNG in Flash, the edges get really jagged.Is there a preferred way to import this so the edges are smooth?

View 2 Replies

ActionScript 3.0 :: Image Transparency And HitTestPoint?

Jun 26, 2011

I'm not sure this is even possible, but does anyone know how to get the hitTestPoint function to ignore transparency for a MC containing a png image?

View 1 Replies

Actionscript 3 :: Duplicating A PNG Image Causes Loss Of Transparency

Nov 10, 2011

I am using LoaderMax to load an external PNG and display it in many places so I use the following code to duplicate the image:

[Code]....

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 :: How To RotationY A Loaded Jpeg

May 17, 2011

I am trying to apply rotationY/X/Z to an externally loaded image. The problem is that when I rotate the image in '3D', it does not appear. When I apply normal rotation, the image does appear. I have verified that the jpg is loaded, just does not display after rotationY/X/Z. The code below are snippets of my attempts.

PHP Code:
//LOAD IMAGE
public function load_img():void

[code].....

View 1 Replies

Export Flash Image To Illustrator : Bad Colors And No Transparency?

May 15, 2008

I've tried to export my vector work from Flash to Illustrator. The result is bad : colors have faded and transparent colors became opaque. It is a shame that Flash doesn't provide a correct export function to
Illustrator now that Flash and Illustrator are both Adobe's softwares.

View 1 Replies

Flash :: Change MovieClip Transparency As A Single Image?

Aug 27, 2010

Here is my code:

var menu = new Menu ();
menu.x = 0;
menu.y = 0;[code]...........

This works, but transparency varies for each element MovieClip separately, but I would like that would have changed the whole MovieClip transparency as a single image.

Menu(); is generated from XML.

View 2 Replies

Loading External JPEG Files And Keep Them Loaded

May 19, 2009

I have a flash file that loads jpeg files and runs through each on the timeline. I have nav buttons to go back and forth. Here is the problem, all images load on frame 5 and I do this while another image is displayed so that they are loading in the background. I do this so that my initial file size is small, but I can load images in the background making the flash file appear to load quickly and loading other elements after it starts.

So all images load on frame 5, then I go frame by frame until I hit frame 11. If I click one of my nav buttons to go back to say, frame 7, the jpeg is gone and is no longer loaded. How to load jpeg files into the library, or at least, keep them loaded after they have loaded once? I have attached my fla file for reference. I had to rename the extension to eps, but it's a fla file, just rename the extension.

Attachments: hm-slideshow2.eps (1.1 MB)

View 2 Replies

ActionScript 3.0 :: Set Jpeg Quality On Loaded File?

May 9, 2011

way to set the quality of a loaded jpeg the way we're able to set the quality on library item? It's pretty neat to be able to set the smoothing, is there a similar way to set quality?? Is there an approach anyone would recommend for dynamically setting the quality on a loaded image? 
 
var loader:Loader = new Loader();
loader.load(new URLRequest("myImage.jpg"));
addChild(loader);

[Code].....

View 2 Replies

ActionScript 2.0 :: Resizing Externally Loaded Swf/xml/jpeg

Jan 24, 2009

I was wondering, after looking into loading external images via xml- how you would control the size of those images on resize and on first loading.

Do you define the size of the container mc?

Can you apply the same or similar onresize code as you would when applying it too images on the stage?

View 4 Replies

ActionScript 2.0 :: MovieClip Size Once Jpeg Loaded

Jun 16, 2005

I am creating an empty movieclip and loading a jpeg into it. The mc does not seem to resize to account for the jpeg's size, also the parent mc (thisClip) which is also created dynamically (with attachmovie), is set at 500 why:

thisClip.createEmptyMovieClip("theJpeg", 2);
thisClip.theJpeg.loadMovie(url);
thisClip.theJpeg.onEnterFrame = function(){

[Code]...

View 8 Replies

ActionScript 2.0 :: Getting Loaded JPEG To Fit Dimensions Of MovieClip

Nov 9, 2006

How can I get a jpeg that loads with the loadmovie command to fit to the dimensions of a movieclip that is being used as its "place holder"? Also if this image starts off initially at a much larger resolution than the place holder movieclip and therefore has to be shrunk down to start with, what happens when browser window is then resized to a larger window? (i.e the whole flash movie is enlarged). Will the image be stretched from the size it has been shrunk down to or will it still reference that external file? So if the image was larger than the site would ever need it to be would it look the best quality at all times?

View 6 Replies

ActionScript 3.0 :: Cannot Convert Loaded Jpeg To Bitmap?

Jan 6, 2010

why I cannot convert a loaded jpeg to a bitmap.I've found similar posts on this forum but the solutions provided are not working for me. I have a very simple example of what I'm trying to do below:

Code:
private function loadImage():void
{
var imageLoader:Loader = new Loader();[code]...

For whatever reason I get the error:

Code: TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::Bitmap@3a0926d1 to Function.at com.ncnmar.interphaz::People01/loadedImage()

View 1 Replies

ActionScript 2.0 :: Getting / Using _width / _height Of A Loaded Jpeg

Jul 7, 2004

I'm having trouble getting the _width & _height of a jpeg loaded using loadMovie. I'm trying to reposition it (pseudo-registration point) for rotation in a container movie clip. If I use hard-coded numbers, it works fine. However, if I try to position it based on its _width and _height properties, it's no go... in fact, it doesn't even show up on stage.

View 7 Replies

ActionScript 2.0 :: Dynamically Loaded JPEG For Tiled Background?

Oct 15, 2007

Is it possible to dynamically load a JPEG image and use it as a tiled background for a fullscreen flash movie?Everything I see online is for bitmaps already loaded in the library.

View 1 Replies

ActionScript 3.0 :: Force The Tint To Cover The Entire Image, Including The Transparency?

Oct 13, 2010

I am using TweenMax to animate a PNG with some transparency. With TweenMax, I add a tint to the animation.

When the tint is applied, it obviously only tints the non-transparent part of the bitmap.

Is there any way to force the tint to cover the entire image, including the transparency?

View 1 Replies

Start Up Image (.jpeg) For A (.flv)

Nov 3, 2009

Is there a way to have a nice start up image (.jpeg)  showing instead of the 1st frame of a .flv without creating a .swf . in Flash.
 
Looking to create it using html code- is this possible??

View 1 Replies

Professional :: Poor JPEG Quality When Loaded Externally In Flash Via .xml

Jul 26, 2011

I have a movie that loads images from an external source based on paths contained within an .xml. As far as I can see, there is no restriction to the size of the loaded image, which are are JPEGs, hence flash will not have these images resized. The images look fine when loaded in Photoshop or viewed separately, but the quality is just awful when loaded within the movie.
 
I've tried the usual hints like increasing JPEG quality in Publish Settings, but understand that since these images are not imporated into Flash CS5 before compiling, but are instead loaded when the .swf is run, these settings would not have any effect.

[Code]....

View 1 Replies

ActionScript 3.0 :: Poor JPEG Quality When Loaded Externally In Flash Via .xml?

Sep 25, 2011

Basically, my problem is that I have a movie that loads images from an external source based on paths contained within an .xml. As far as I can see, there is no restriction to the size of the loaded image, which are are JPEGs, hence flash will not have these images resized. The images look fine when loaded in Photoshop or viewed separately, but the quality is just awful when loaded within the movie.I've tried the usual hints like increasing JPEG quality in Publish Settings, but understand that since these images are not imporated into Flash CS5 before compiling, but are instead loaded when the .swf is run, these settings would not have any effect.Does anyon

Code:
stop();
var my_x:Number;

[code].....

View 3 Replies

ActionScript 2.0 :: Swapping The Jpeg Loaded Into A Movie Clip With The One In A Button?

Jul 10, 2005

I have three buttons, which when clicked load an external file into a movie clip called container. The first jpeg (1.jpg) is loaded into the container when the movie loads and the thumbnail buttons have the files t2.jpg, t3.jpg and t4.jpg loaded. When these are clicked they load 2,3 and 4.jpg respectively into the container. The problem is that I can only have 3 buttons but need to display 4 images. So I want the image that is loaded into the container to swap with the one that is in the button. I can't find any code, either on this forum or on the web, that retrieves the name of a file that is loaded into a movie clip.This is what I need.

Because all the images are named 1,2,3 or 4.jpg and the thumbnails for the buttons are t1,t2,t3 or t4.jpg I should be able to easily write the additional code to change what happens when the button is clicked, because when the picture on the button has changed to what was loaded into the container, the on(Release) code will need to change too.

View 2 Replies

Exporting An Image From Flash To Jpeg

May 17, 2010

Could somebody give a hand with this? I am trying to export a flash image to jpeg. I can do it but the image is cropped when I open it in photoshop. This is the original image (is is an screenshot and not exported with flash): And this is the image exported with flash (as you can see it is cropped on the right): [URL] Why is the second image cropped?

View 1 Replies

ActionScript 2.0 :: How To Save Image As JPEG / PNG

Feb 7, 2012

I'm trying to make a character creator application using flash actionscript 2. I'm quite done with the character's moveable parts, however my main concern is on how to save the image as jpeg/png. Is there any way that I can save an image without the use of php? I would like to save my characters image using a button, and save it directly to my pc.

View 1 Replies

ActionScript 3.0 :: JPEG Error 2124: Loaded File Is An Unknown Type

Jun 27, 2008

I'm trying to load images from [URL] but there are strange errors These 2 urls are giving errors...

[Code]....

is this because I can't read from that server ?? I can open the images in the browser...

View 9 Replies

JPEG Size And Image Losses In Flash CS3?

Jun 2, 2009

I am creating a website for a wedding and using the photos of the couple on the website.  I created designs in Photoshop CS3 with the following settings:Document Size: 6.25" x 8.25" or 1875p x 2475p @ 300pixels/inch To use the image in flash, I used "Save As" in photoshop to convert image into JPEG with "Quality 10 Maximum" setting.I created a Flash CS3 document with the following settings: Document Size: 6.25" x 8.25" or 494 x 550 pixels I imported the JPEG image from photoshop into flash and came in an image much larger than 6.25"x8.25".  I resized the image in flash with constrained dimensions to 494x550 pixels and it the text shadows and glow lost its clarity.
 
TRIAL 1Obviously something was wrong.  So, I went back to Photoshop and used the save for web/devices option and saved it as a high quality JPEG.  Same result.
 
TRIAL 2This time, I tried a different trick in Photoshop.  I went to Image->Image Size and changed the image resolution to 150pixels/inch and used "Save As" again.  I imported it again to Flash and now the image was too small.
 
How do I match the image "save as" from photoshop to the flash document size so that I dont lose resolution?  I used Zoomify in photoshop successfully without losses.  Why is it not possible to just import an image to look the same way a JPEG file appears?

View 2 Replies

ActionScript 3.0 :: Unload An External Jpeg Image?

Feb 19, 2010

how to unload an external jpeg image in an AS3 function script.

var picURL2:URLRequest = new URLRequest("images/Buying-A-Diamond_Wh.jpg");var picFrame2:Loader = new Loader();picFrame2.load(picURL2);
function onOpen2(e:Event):void { trace("loading has begun");}

[Code]....

View 3 Replies

ActionScript 3.0 :: How To Use Displacement Filter With JPEG Image

Mar 9, 2010

I'm trying to use the displacement filter with a jpeg image instead of a gradient map. My images are:
1) Background: men2.jpg
2) Map image: men2BN.jpg (same as above, but grayscale and blurred)
3) The image to be displaced: star5_mc

View 1 Replies

Flash :: Export A Full Image From Jpeg?

May 17, 2010

Could somebody give a  hand with this? I am trying to export a flash image to jpeg. I can do it but the image is cropped when I open it in photoshop. This is the original image (is is an screenshot and not exported with flash):

[Code]...

View 3 Replies







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