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
Similar Posts:
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
Sep 14, 2009
I'm using AS2 with Flash CS4. How can I change the alpha of a ComboBox? I tried:
MyCombo._alpha = 25;
// and
MyCombo.alpha = 25;
But both have no effect on my ComboBox, it just appears to have the alpha set to 100.
View 1 Replies
Nov 11, 2009
I have a movieclip and I am loading on it an external swf. The mc is just a square box basically...it is set to 69% alpha/transparent in the "Color effect: style: alpha" settings.The problem is, when I load the swf now the swf is also transparent (seems like 69%)...I basically want the mc to be transparent, but the swfs that load w/in it should not be transparent.
example code:
mc.createEmptyMovieClip("newClip", this.getNextHighestDepth());
mc.newClip.loadMovie("some.swf");
View 4 Replies
Oct 25, 2011
I have a .PNG image with almost 50% of the image as transparent pixels.I am using this image for a Mouse_Over event but the problem is the Mouse_Over event works even on the transparent area.
View 3 Replies
Jun 17, 2011
I'm currently constructing a scrollbar as part of a website using as3 and png images. I've got loaders for each image inside of an array, and when loading on each image finishes, it's added as a child to a sprite on the stage. I've got a background image with no transparency, which loads fine. On top of that, I've got the actual slider, which loads the RGB data, and appears to be using the alpha as a 1-bit mask. So anywhere that I have partial transparency, it just shows up as black, where it should be showing the background underneath. I can't find any attribute that will change the way loaded images process alpha transparency.
View 2 Replies
Sep 10, 2011
I have a game and the user clicks on a button (a_btn), they are brought to frame 2 and they have to answer a question. If they get the question correct the alpha transparency of the a_btn is set to zero.
What I would like to be able to do is see if a number of buttons have zero alpha transparency then the user gets a complete message. This is what I have so far:
ActionScript Code:
if (c_btn.alpha=0 && h_btn.alpha=0){
infoComplete.text = "WELL DONE, GAME COMPLETE";
}
View 9 Replies
Jan 9, 2010
mc1.mask = mc2
mc2 is a movie clip that is 50% alpha. How can I mask mc1 and keep the alpha transparency? That's about it.
View 3 Replies
Jun 14, 2010
I have embedded a font type in my application. Its working fine inside a text area. Now i need to add 60% transparency to it. In fact I need multiple transparency levels. Like -
60 % transparency for TextARea
70% for WindowShade Header etc.
How do I add alpha values to it?
View 1 Replies
Sep 21, 2010
What is the best way to create a video with an alpha channel, suitable for flex/flash? Does it need to be FLV, or can it be MP4/MOV as well?
View 1 Replies
Jun 14, 2010
I have embedded a font type in my application. Its working fine inside a text area. Now i need to add 60% transparency to it. In fact I need multiple transparency levels.
-60 % transparency for TextARea
-70% for WindowShade Header etc.
View 2 Replies
Mar 7, 2005
how to create the proper Actionscript code that will control the Alpha Transparency of a MC I want as a preloader. I want the MC to start of at 100% alpha-transparency, and then decrease to 0% alpha-transparency when the whole Scene is loaded. Also, it should show the precentage of the Scene loaded. I have the code that I thought would work to control the alpha transparency of the mc and loading it. But, I get confused with the perloader code to incorporate into the alpha transparency code? Does this make sense; is it possible?In Leaman's Terms, As the scene loads, the mc goes from invisible to visible at completion of the scene load.
Here is the code:
Code:
onClipEvent (enterFrame) {
loading = _parent.getBytesLoaded();
total = _parent.getBytesTotal();
[code]....
Now, I have no idea if and where you'd include the poper code to control the mc's alpha transparency based on the percentage of the scene loaded? Can someome maybe rework the code to make this work. And use a working example, that way I see it working to fully understand the concept? The mc's instance name is "sm_logo". Where would I use the instance name in this code, or better yet the proper code alltogether?
View 2 Replies
Sep 22, 2007
i have a timeline animation inside a movieclip.it contains bitmaps. when i set the movieclip's alpha 50 etc, i cant see the alpha effect on the bitmaps except for bottom layer.that simple animation seems like these and i cant understand this situation
View 7 Replies
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
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
Oct 23, 2010
[URL] i want the object to fade out but in the object there's a lot of overlapping pictures and each becomes half transparent. how to make the movieclip to change the alpha as it was without objects?
[Code]....
View 2 Replies
Dec 15, 2011
just spotted this curious trick. If you want to flip something to go invisible on a click, and then reappear on another click (etc etc), try this:
create the sprite, setting alpha to either to 1 OR -1
mySprite.alpha=1; //OR
mySprite.aplha=-1;
[code]....
View 9 Replies
Jun 27, 2003
using AS, on loading a movie a solid shape is there with alpha at 100% then over a period of 5 secs its alpha is reduced to 0.
i'm new to this......please help if you want to if you don't have a good weekend but think of me struggling onwards and upwards...
View 14 Replies
Aug 2, 2011
I want to do aplpha = .5 for the whole app, but then have a MC display at full alpha, is there any way to do this?
View 6 Replies
Oct 31, 2009
I'm creating a DressUp kind of game using only external .png files for items (such as dresses, hair styles, bags etc).Some of my image files have transparent space left/right of the drawing itself. What I want to do, is set the hitArea of that certain movieclip (which contains the .png file) only to the visible area (to the actual drawing). This would be a fairly easy job if all the items had have the same size, but sizes are different from item to another.Taking the attached image, the grey area should not respond to mouse events.
View 1 Replies
Mar 6, 2009
s there any way to make PNG 24Bit transparent Image from MovieClip? I tried google a lot, but didn't found any transparent Method.
View 6 Replies
Jul 17, 2009
I created an image in Photoshop that included a gradient layer fading from transparency to a foreground color (in this case, black). I saved this image as a PNG file and imported the file onto my Flash stage. The gradient appears on the image as expected when viewing the stage in the Flash editor, however, when I test the movie, the gradient no longer appears.
View 2 Replies
Aug 15, 2009
I have created a swf for the header of my website. On the top layer I have an image that stays static while the rest of the header changes images. I am trying to get the static image to be fairly transparent but am not having much luck. I created the image in PS I saved it with transparency but it doesn't look right in the swf.
View 2 Replies
Apr 11, 2011
For anyway having that problem in Actionscript 3 clicking through the transparent parts of a PNG file. I finally figured it out:
var hitTestPoint1:Boolean = false;
var myHitTest1:Boolean = false;
var objects:Array;
clip.addEventListener(MouseEvent.MOUSE_DOWN, doHitTest);
clip.addEventListener(MouseEvent.MOUSE_UP, stopDragging);
clip.buttonMode = true;
[Code]...
View 1 Replies
May 30, 2010
URL..they rocky frame you see is a PNG and it's converted in MovieClip to be able to change it's index so it's always in front of the other objects.Problem: once I get what I want (MC+png is in front of everything) I'm not able to interact with anything under the MC anymore.I know the problem it's that the png extends for all the MC space but I really need to make those object under the frame interactable.
View 2 Replies
Feb 8, 2011
im using the pngEncoder from adobe, its working great. But all my .PNG's are saved with a whit bg, how to export with transparent?
ActionScript Code:
function eventPostPictureToServer(e:TimerEvent):void
{
var urlLoader:URLLoader = new URLLoader();
[code]....
View 1 Replies
Apr 4, 2006
I have a PSD with about 30 layered transparencies. I exported each individual layer as a PNG 24 with the transparent background in tact. I then made identical layers in Flash just like I had in Photoshop, and imported each PNG to it's corresponding layer at which point I converted the graphic to a movie clip for future scripting animations. Once I got to the 24th layer Flash quit recognizing my transparencies and my first Flash layer masked anything else I brought in from layer 24 on....but the layers above remained OK!! I checked and double checked my Photoshop exports and had several Flash "gurus" check my work. Nobody can figure out what is wrong! Is there a limit to the number of PNG tranparencies allowed on seperate layers in a Flash document?
View 7 Replies
Dec 22, 2008
I'm working on a project where I want to use a transparent png, and when authoring in Flash CS3 (using actionscript 2.0) the png image appears transparent just as it should. However when I test it the .swf file loses the transparency entirely. The png image was saved for web from photoshop as png-24.
View 1 Replies
Jan 18, 2009
I found FlashObject script easy to understand and apply ... in part due to good instructions and the handy 'Generator.'
It validated W3C too!
One problem. My background color turned to white. How do I specify a background color, or transparency?
View 1 Replies
Jan 30, 2009
With CS3, when I entered a movieclip, I could see the other movieclips/stage in the background. But now when I enter a movieclip with CS4, I get the stage color as the background. If I try to test that "scene", the objects are in the top left corner.
It makes positioning from within a movieclip very very difficult.
View 1 Replies