ActionScript 3.0 :: Set Area To Be Transparent?
Jul 8, 2009How do I set an area to be transparent in ActionScript 3.0?At the moment I'm creating a subtitles area to sit over the player and it has the following code:[code]
View 1 RepliesHow do I set an area to be transparent in ActionScript 3.0?At the moment I'm creating a subtitles area to sit over the player and it has the following code:[code]
View 1 RepliesI have this function:
public static function cloneDpObj(target:DisplayObject):Bitmap
{
var duplicate:Bitmap;
[code]....
to clone target displayObject (MovieClip or Sprite) and return Bitmap Object.
It can get bitmap from the target object, but it seem don't get all the area of the image.
By give the width and height of target object, but the target object in design was applied by Glow Effect, so my question can we get the all view of bitmapdata from a displayobject?
On the opening of the map where it shows a transparent red spreading would you create the growing red transparent area over the map in the Pacific with transparent shape tween. Also any tutorials on doing this.
View 2 RepliesOn the opening of the map where it shows a transparent red spreading would you create the growing red transparent area over the map in the Pacific with transparent shape tween. Also any tutorials on doing this.
View 6 RepliesI am importing some graphics on the fly, and want to be ableto drag them around the stage, which all works great. My issue isthat if I add a large element, like a border around the edge of thestage, this covers up all the other items so that clicking on themis not possible. I can see them, but when I click, the large itemgets the event, even though visually, it is transparent. There arethings I could do if I was doing all the development of thegraphics in the IDE, but these items load at runtime, so it has towork with bitmap
View 1 Repliesis there a way to make a Text Area transparent?, I'm using this code:
_level0.taDescription.depthChild0._alpha = 0;
and works, but then, I'm loading that SWF in another SWF and I loose the alpha property?
So I have a BitmapData object that's 400x400, and is mostly transparent with a small area (up to 50x50) of color somewhere inside. That's drawn to a bitmap, and now I somehow need to generate a Sprite that is only the dimensions of the small colored area, and sits in the same place on the screen.The size and position of the colored area is variable, and the operation to create the new Sprite must be near-instantaneous, so no lengthy pixel comparison exercises.
View 2 Repliesi am loading a background bitmap into a sprite. after that i make this sprite draggable. now i would like to have a copy of this sprite where just the area with the non-transparent parts of the bitmap react to the click.
i know that i can determine if a pixel is transparent with the getPixel32() method, but it seems to be overkill to anylyze every pixel... or is it not?
I want to put a transparent area on my stage. When the mouse enters that area I want to be notified (so that I can do stuff).I expect to use some code like"addEventListener(MouseEvent.MOUSE_OVER, mouseInRemote);" - but the qustion is "What do I add to my stage?"
View 8 RepliesI have a .jpg graphic in a movieclip on layer two (1024/768). This is used as a background.I have a .jpg scrolling movieclip on layer one. It is a very wide graphic used for displaying a panorama.I would like to be able to create, dynamically using actionscript, a transparent area on the layer two movieclip (create a window) to view the underlying movieclip.I believe this is possible using the Rectangle class in the flash.geom.rectangle but I can't figure out how to attach it to the layer two movieclip or how to make it transparent so shows the underlying scrolling graphic.
View 4 RepliesI'm trying to make a button symbol with a transparent hit area - surounded but a dynamically drawn border. Heres what I have. I have a simple AS script that uses goTo and lineTo (plus a randomizer to make sure the buttons are skewed and differnt everytime) to create a "sketchy box" as my button. My script resides in a movie clip withing the "over" state of a button symbol. Now the active hit area is ONLY the line elements. Question : How in the world, using only actionscript an I make a second, transparent area inside of the sketchy lines to make the whole button symble clickable?
View 5 RepliesI am making flash with mouse over its not working properly,
1) When mouse over the button not come the transperant area to entire pic
2) How can transparent area slowely to come mouse out
I have objects that the user can click&drag. They're PNGs, mainly rectangular, no problem till here.But I then had to put an L-shaped object (a PNG with a lot of transparency), so i've made a movieclip with an shape with the same L shape than the png, and use it as its hitArea:
shape.visible= false;
shape.mouseEnabled= false;
obj.addChild(shape);
obj.hitArea= shape;
This works PERFECT, the mouse events respond as expected, and I can click on objects that are below/above the transparent area of the png/object.All objects are inside a Sprite called playgroundLayer1. The issue comes when I take the L-shaped object and put it on another Sprite (playgroundLayer2), that is above the playgroundLayer1.I this case, I can click&drag on the L, but no object below the transparent area of the L receives mouse events.
Is there a way to make the transparent area from an png image not to register when I add with a mouse event to that image? What is happening is the rectangle around the symbol is effected by the mouse event.
View 2 RepliesI would like to make a flash movie with a picture, where when the user holds down the mouse button, part of another picture will emerge in that general area (like a magnifying glass looking into another dimension).
Technically, my idea was to make a flash file with two images, and then code the mouse to be able to make the top picture transparent in a circle-like area around the cursor, while the mouse button is down.
But how to do that? I am using Flash CS4, but I don't really care if the solution is in AS2, or AS3, as long as it works
I imported a video into flash and have a transparent photoshop layer to create an iPod skin. The video works fine, but I cannot get the "stage" to be transparent so that you do not see the flash background color behind the iPod skin.
I've read in the forums and have followed the instructions here from Adobe. If you look at my code, I have
[Code]...
I'm trying to draw PNGs onto BitmapData that is transparent.
I create my BitmapData like this (using ARGB for the color):
new BitmapData(width, height, true, 0x00000000);
And clean it by using the same ARGB value:
bitmapData.fillRect(bitmapData.rect, 0x00000000);
When I use copyPixels() to draw graphics onto the cleaned BitmapData, I get this result:
If I don't use ARGB for the BitmapData color, it works fine:
But I have to specify a solid fillColor, meaning I can't render what's behind the Bitmap.
How can I make my BitmapData transparent, but not have the above occur?
I am creating a map in flash cs4 with all the countries on it. I used photoshop for creating the map and separated countries. Now I imported all pngs in Flash and I want to give Mouse CLICK event and Mouse Hover on all pngs, but as the transparent pixels are overlapping the other states, it is getting difficult. So, I converted all pngs in movieclips and now then I broke up pngs. Now I want to delete all pixels having alpha 0 using eraser tool, as per the borders. And I have to do it manually for individual countries. So is there a way to remove transparent pixels from the bitmap data?
View 2 Repliesi have a drop down menu am working on and each button tab (although they are not button instances !) when clicked opens up the "drop down" section which you can mouse over to choose another specific button etc - if you mouse out of that drop down area then it pulls back up to the original tab state .. what do i change to the code below to decrease the area that you mouse out of to make the drop down area pull back .....at the moment it at least two inches on the screen below and to the right of boundaries of the drop down box before it pulls up - i want to it pull up as the mouse leaves the boundary box .... hope this makes sense .... there is some part of the actionscipt below that controls this but can work out which bit and how to change it !!! (am guessing the x mouse and y mouse bits - but how to change it ???)
[Code]...
I have a movie clip named circle_mc(see the image on the link below) and a mask object(movie clip) which determines visible area of the circle. User can change the portion which is visible (extend the red area and make it red+blue, gray area is invisible). I need to find proportion of visible area to invisible area (red+blue/gray) so that I can calculate angle.
View 1 RepliesI would like to first add the xml to my flash. Fine I can do this.But I have a number of buttons, where when I click say CW1, i get the information from the XML file with a node of CW1. I have all the xml set up fine.As I have about eight different postcode types.
ST, CW, CH, TF, WV, WS, DE, SK, SY, and each of these may have numbers that follow, i.e ST1, ST2, ST3 and so forth.
So I can only assume that the postal area could be the main nodes, and the numbers inside the child nodes, am I right thus far.o how can i load the area of the xml file into my text area on mouse click, pulling the information relating.
However I'd need to be able to draw *only* on the board area (a 450 x 350 pixels area) instead on the whole movie... how to "tweak it?" Here's the fla: [URL]
View 8 RepliesI have Particle animation like this this PHP Code:
[Code]...
But i want that Object moving in limited area or masked area. I add masked area like this PHP Code:
[Code]...
But it still not working. Any advice ?? or correction in my script code?
I'm programming a game for my Advanced Higher Computing class, and am doing a whack a mole style game. I am trying to program for the bit where when you click the moving movie clip, then the score is increased by 1.
if(mousedown){
if(movieClip contains mouseXCoOrd){
if(movieClip contains mouseYCoOrd) {
score ++
}
}
}
I just want to do not allow editing at some area of text area in flex. How it can be done?let suppose text length in text area is 50 characters, i want to allow editing if cursor position is less than 15, and if cursor position in text area is greater than 15 it should not allow user to add more text in text area.If user press any key it should not add any character in text area.[code]
View 1 RepliesI have two png's that kind of look like paint brush strokes. they have some transparency in them that lets the stage colour bleed through a bit.
I am adding two of these images to the stage in AS 3. One adds quite fine - looks as expected. The second one however doesn't have any transparency other than around its edges. What i mean is it looks more like GIF than a PNG. Rough around the edges, no transparency "inside" the image itself (where there should be)
i have tried re-creating the image (yes it IS a PNG) which did nothing. I ensured the library item is not being treated as a JPEG. I also even tried externally calling the PNG to see if that made a difference. Unfortunately it did not.
why this second PNG doesn't seem to have a transparency set?
I have made a movieclip and gave the frame this actionscript:
------------------------------------------------------------
var keyListener:Object = new Object();
keyListener.onKeyDown = function() {[code]........
it moves fine and stuff but i was wondering how can i restrict the area in which the movieclip can actually move ? my flash file is 550px X 400px and i want to make it so that it can only move in 300px X 200px of the file if you understand ?
there are few comments i hear from other people. some say the axis of the carousel crooked and the icons are pixelated when they are scaled down. i m trying to add a transparent video of myself in the center but when i mask the carousel the embeded swf files also get the mask so i was wondering if there was a way to make the icons have alpha 0 when they are back all the way.. here s the link for the regular website [URL] and below is my actionscript
[Code]....
is it possibel to make a transparent SWF, or not? i want to make a word glow but have no background you see?
View 2 RepliesId like to create a transparent stage for my site hosted here... [URL]so i can change the background in html to a pattern and it will look like the flash bit is sitting on top of it.
View 2 Replies