ActionScript 3.0 :: Click "through" A Transparent Part Of An Image?

May 9, 2008

I'm programming the engine of a Point and Click Adventure in AS3 atm. and now i have following problem. I want to load a png as foreground which is partially transparent. Behind this Image are my Game Elements which should react to the onClick event. But this won't work. the transparent parts of the image are, well, transparent, but when you click on the element the onclick event is only triggered on the foreground even if you click on the transparent parts. The Game Elements behind this transparent parts don't trigger the event. (When i remove the foreground the event is properly triggered on the game elements)

So is there a way to click "through" the transparent parts of the image?

View 3 Replies


Similar Posts:


ActionScript 3.0 :: Detecting If Point On Image Is Opaque Or Transparent Part?

Dec 20, 2010

I am trying to detect if a point on an image is on the opaque part of the image or the transparent part. I have a image in a 48X48 area. half the image has transparent pixels. I seem to detect a hit on every part of the image like a bounding box test but I don't want that. For example . I place a 48X48 size image on stage at 0,0. At point 40,20 on the stage the image has transparent pixels but I get it detects a hit?
mm.img.hitTestPoint(40,20,true); //it should give me false

View 1 Replies

Actionscript 3 :: Possible To Trigger Click Event Only / When Mouse Is Clicked On Image Part?

Mar 3, 2012

I have a problem and I have potential solution. But I wanted to confirm if there is an easy and simple way to solve my problem.App type:Isometric Game.Problem statement:I am loading images in my flash app and have mouse events attached to them.The images I load are prop images like vehicles, trees, buildings etc., and all of them are transparent.Example: Red ball asset (please ignore the yellow background which I applied to describe the problem)If I click on the actual image area (colored in red), then every thing works perfect.I don't want to trigger mouseevent when I click on empty image part (or transparent area, which I have shown in yellow color)There is one way I know by creating masks in flash. I don't want to do it unless that is the final option left because I load image assets instead of flash assets and I don't want to create a new mask asset for all the assets.There is another method I was going to adopt by using getPixel method of Bitmap.

But there is another problem with this method.I might be able to ignore the click event when I click on the empty part of the asset but if there is some other asset is behind the image in the same location, then I need to process the click event for the occluded image.Well, thinking of solution to this problem takes me to the getObjectsUnderPoint where I can scan the occluded assets

View 2 Replies

ActionScript 3.0 :: How To Remove Transparent Part Of PNG

Apr 28, 2011

The background of the png images is transparent but is not actually transparent if I load the png with transparent background and add into a sprite. The transparent part also can receive the mouse event so I wanna know how can I remove these pixels?

View 5 Replies

ActionScript 3.0 :: Part Of The Pixels Are Transparent - Don't Be Clickable

Sep 13, 2009

I want to create a SimpleButton that has some  PNG/GIF graphics as the down/up states. Part of the pixels are transparent and I don't want them to be clickable, is that doable?

View 9 Replies

ActionScript 3.0 :: Avoid Transparent Part Of Bitmap To React With Mouse Events?

Dec 20, 2011

What I have is a bitmap as render cache for a sprite, and there're many of them present on the stage. I expected that they would react like sprites with mouse-click event, but they didn't. They're like rectangles all around, matter what the original sprite look like, And I tried put bitmap cache into sprite container and use sprite's hitArea property like [code]...

View 1 Replies

ActionScript 2.0 :: Image Part To Scale To Fit Each Image Dynamically?

Mar 8, 2004

I would like to make a very simple (well, looks simple anyway) image gallery, like Ilyas da Pom's at [URL]..

I want the image part to scale to fit each image dynamically. I'm a brand-spanking new Flash novice, and any guidance would help really; this is just a tiny little personal project, not to be used anywhere commercially.

View 3 Replies

IDE :: Make The Transparent Area From An Png Image Not To Register When I Add With A Mouse Event To That Image?

Apr 11, 2009

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 Replies

Convert The PNG To A Button Then Even The Transparent Part Becomes A Button

Mar 10, 2010

I would like to find out, how can i make that only a selection is made a button, for example I have a picture (.PNG format) with a transparent background, and the image in the PNG is what i want to be a button, but when i convert the PNG to a button then even the transparent part becomes a button. how can I have only the pic as a button.

View 2 Replies

Part Of The Animation To Be Skipped When I Click One Specific Button?

Jun 29, 2009

I have a swf file "home" that has a series of animations that are button controled.I want part of the animation to be skipped when I click one specific button, for instance.Most of the time I want frame label:"1 out" to play all the way through to the last frame (20) and on frame (20) there is an action sending it back to frame 1and stopping, but I need to have a button that when hit plays frame label 1: "1 out" and continues to frame (19) and does not utilize the action on frame (20) sending it back to frame (1), or in other words playing through "1 out" and then playing "2 out" which occurs on frame 21 without returning to frame (1).

View 6 Replies

Transparent Nav Looks Correct / But Can't Click Links

Jun 18, 2009

What I have is an "expandable" navbar swf. The swf expands over the page content, so I have set the swf's "wmode" to "transparent" (z-index is also set so the swf is above page content, in case that matters).Everything looks great, but I cannot click any of the links on the page below the navbar swf. I can see them, but I can't click them.

View 6 Replies

ActionScript 3.0 :: Mouse Click Event On Invisible Part Of MovieClip?

Feb 20, 2009

I have a MovieClip of an bicycle, and I've attached and event listener for mouse clicks on that movieclip. The mouse clicks events are raised when I click on the bike, but I really want to be able to click somewhere in the entire region of the movieclip's rect (to make it easier for the audience this is for to be able to click).

View 1 Replies

Flex :: Datagrid Sorting Only On Click Of Specific Part In HeaderRenderer

Jun 21, 2011

I have a custom FilterColumnHeaderRenderer with an HBox, inside a Label for the Column Header, a Textinput for the filter text and Label to clear the filter. Now I want that the column sorting only takes place on clicking the title.Currently the I use the sortCompareFunction on HeaderRelease for the whole columnHeader.[code]

View 2 Replies

ActionScript 3.0 :: Click Through A Transparent Area Of A Bitmap?

Sep 18, 2008

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

Click Through Transparent Parts Of A Movie Clip?

Nov 13, 2009

I found an old post from January that suggested saving the original image as an SWF via Illustrator.  I tried it, but my clip is still registering clicks in transparent areas.

Here's a link.  [URL]
 
All I'm trying to do is allow the drawing to be dragged around the screen, but I don't want it to be clickable in the transparent areas where the green background shows through.
 
how to eliminate the pale cast that the transparent areas are making?  The background to the drawing shows totally transparent in Photoshop, but the boundaries of the movie are visible because the supposedly transparent areas of the movie are slightly masking the background.

View 7 Replies

Professional :: Can't Click Hyperlinks Under Transparent Flash Layer

Sep 3, 2010

is there any solution available??

View 7 Replies

Html :: Click Doesn't Fire When WMODE=TRANSPARENT In SWFUpload Button

Jan 1, 2010

I have a Flash-based SWFUpload upload button in a HTML page. I am trying to style that button. SWFUpload provides a Javascript setup interface to the Flash button's settings. I don't have Flash myself, so I have to work with the pre-compiled SWF file.

[Code]...

View 2 Replies

Animating A Part Of An Image?

Oct 21, 2010

I have the attached image of a bioreactor. I want to animate the area marked with the red outline (and a cross) to be filled with a bluish transparent liquid. I am trying to create an animation for students to show how the residue in the bioreactor behaves and I have to show the animation in a real picture (cant draw).

View 9 Replies

ActionScript 3.0 :: Click&drag On The L - No Object The Transparent Area Of The L Receives Mouse Events?

Aug 25, 2009

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.

View 8 Replies

Professional :: Tint Part Of An Image?

Apr 20, 2011

I have imported an image into Flash, turned it into a symbol, inserted a frame, then a tween, and can animate the image with tint. It works fine, but the tint is applied to the entire image. What I was hoping to do, is have a sort of 'rolling tint', where the tint starts on the left side of the image, and gradually works it's way over to the right.

View 5 Replies

ActionScript 3.0 :: Load Part Of An Image?

Aug 2, 2009

okay i have a problem...i wanna load an image dynamically.....like through XML Is it possible to only load a part of the image....or like only assign the top part of the bitmap to one MC and the bottom to another MC when i load it Eg. 200x200 image pixels 0 to 100 heightwise and 0 to 200 widthwise in one MC1 pixels 100 to 200 heightwise and 0 to 200 widthwise in one MC2

View 3 Replies

ActionScript 2.0 :: Zoom In Part Of An Image?

Jun 18, 2008

How do i zoom in to a part of an image?? At the moment i have this

[Code].....

View 8 Replies

ActionScript 3.0 :: Copy A Part Of An Image?

Jun 23, 2011

Do any one have idea of copying only a small portion of a image, further it could be made as mc. Or any other method to do this in as3? Not manually breaking the image and convert as mc.

View 1 Replies

Part Of Image In Flash To Change Pic On Every Load?

Mar 12, 2010

I'm using Flash CS4, and a template that I got from a friend to create a website.The template I have uses this "man figure" on the right side of the file. I want to make it so that this pictures loads a different picture each time the page refreshes. The picture can be randomly rotated to a different picture.I'm wondering if there is a possibility to do this, and if so, how should I go about it.My knowledge of Flash is very poor..Here is the template and swf file of the original file I have uploaded to a downlaodable website. The link is only available for 7 days from today

View 8 Replies

ActionScript 2.0 :: Load In Only Part Of An Image In Flash?

Oct 24, 2010

Does anyone know how to load in only part of an image in Flash? The image is loaded in dynamically by the user, so I can't just crop it myself.

View 4 Replies

ActionScript 1/2 :: Not Showing Part Of A Panoramic Image?

Sep 6, 2009

When I try to scroll it using my custom buttons, it will only show up to a certain point (my guess is around 4000 or so), and then the canvas goes black (the background color set for the stage).My guess is that there is a limitation on the size of the objects (in this case an image) that we can use on flash, but I can't believe that there is no workaround other than breaking the image into a bunch of smaller images and loading them as one scrolls.I'm even repositioning the MC that holds the image before it is loaded, so that the image is centered, so that I'm not forcing one side of the workarea to handle most of the image, but only near half of it. After trying this, the image is not showing at all.

View 4 Replies

Flex :: Include Image As Part Of The Application?

Oct 1, 2010

I created flex application that loads a image. I compiled this app and ran in the computer where it was created. it works. when i try in a different system, the image does not load. I think it's chekcing for the image path.how to include image as part of the application

View 2 Replies

Actionscript 3 :: Changing The Color Of The Particular Part Of An Image?

Sep 7, 2011

I have to change the color of the particular part of an image dynamically without affecting the image design.

I want to change the color like this

[URL]

View 1 Replies

ActionScript 2.0 :: [FlashMX] Copy Part Of An Image?

Mar 19, 2006

I'm looking for a way to select an arbitrary rectangle from a Graphic Symbol (or Movie Clip) in an arbitrary layer and to copy and paste it somewhere else.

View 1 Replies

ActionScript 2.0 :: Click To Move + When Click Image - Go To Frame In A Movie Clip?

Aug 28, 2010

I would like to know how to make it so when you click a button, it goes to a different frame within a MOVIE CLIP. Kind of like gotoAndPlay but not a frame in the timeline. I would like it to move to a different frame in a movie clip.

View 1 Replies







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