Flex :: MouseEnabled Where Transparent Not Working As Expected
Feb 28, 2011
I just cannot understand why mouseEnabledWhereTransparent does not work on this skin. The Skin this creates is basically a Button with a transparent background and a little triangle to the left side, like so: >ButtonText But the empty space around the Triangle does not receive mouse events. I've tried wrapping another group around the triangle path and I've tried wrapping it into a Graphic Object, also without success. I could create a Rect with 0 alpha below everything, but isn't that exactly what mouseEnabledWhereTransparent should be doing?
I've created a simple drag and drop game,and when u drag and drop a particular movieClip,another movieClip inside of the current movieClip is played, eg- thats not correct or that correct, depending on weather the movieClip hits the right target, while this is happening,i want the the other movieClips to be disabled, i.e, they should not be able to listen for any event.I've also tried the following piece of code to disable the movieClips, but I guess somehow mouseEnabled = false; is not working.
var arrClips:Array = new Array (aa_mc, bb_mc, cc_mc); function setListen (element:*, index:int, array:Array) { element.addEventListener(MouseEvent.CLICK, setCurrent);[code]...........
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
I am developing a simple galaga clone for my site, its at [URL] . You will notice the controls work fine in firefox, opera, safari, chrome, etc. However, in IE, the controls are only triggered if the mouse cursor is hovering directly over the player ship.
The playership object is created in the main document class which passes a reference to the stage to the playership class.
private var ourShip:playerShip = new playerShip(stage, ourHUD);
Which is then added to the stage from within the document class (gameMain)
stage.addChild(ourShip);
The playership class then monitors the mouseX and reacts accordingly. The code for the ship controls which are linked to the enter_frame eventhandler is
Code: public function controlShip(e:Event):void { var a1 = stageRef.mouseY - e.target.y; var b1 = stageRef.mouseX - e.target.x; var radians1 = Math.atan2(a1,b1);
I have created a flash gallery using the in built template in Flash8, which works fine. The gallery forms part of my gallery page of a separate SWF flash site. I load the gallery using a loder component. Since the gallery navigation works by targeting the root folder, my site gets screwed up. The question is, how do i modify the ActionScript in the gallery.fla file (flash inbuilt template), so that once loaded into the main site, it doesnt target the root timeline, but targets its own timeline i.e.Please see below for the code in the Flash Gallery. PS: I didnt write the code - its inbuilt into the template:
function updateFrame (inc) { // send slides to new frame newFrame = _level1._currentFrame + inc; _level1.gotoAndStop(newFrame); updateStatus();
I've got some try/catch statements in an XML parser I've written that don't seem to be doing what I want them to be doing.
The code:
ActionScript Code: try {[code]........
The problems:
-In the case the type is analysis or info (with other tags being alright) the "Default Text" is staying blank, even without a text tag.
-If I purposely malform the option tag, no alert window shows up and none of the other properties in the catch block (optionText,selType, etc.) get set properly
In the following code, I create 12 buttons, label them, and control their onRollOver,onRollOut, and onRelease actions. Everything is working fine except for the line containing the "slideTo" method. Reading from the two arrays for the x and y values, it appears to be inserting the largest number in each array instead of stepping through all 12 values. Currently, clicking on any of the buttons moves the object (ralphMC) to x=100 and y=800. I am pretty stumped about this, as I've inserted quite a few various numbers into each array during testing. Can anyone tell me what I am doing wrong?slideTo is part of the mcTween package, in case anyone wanted to know. code follows:
Code: //Creates an array of numbers that will evenly space the buttons out vertically var mcPosY:Array = new Array();
I've followed this tutorial and made a functional photo gallery.
Now, I want to add that photo gallery on my site. I've created a flash button and assigned it this action:
Code: on (release) { _root.contents.loadMovie("Pictures.swf"); }
"contents" is the container movie clip, and "Pictures.swf" is photo gallery i've made. Now, when i click on button, Pictures.swf does load (arrows are being shown), but when i click on them, nothing happens.
I have a component that contains 4 layers: (in ascending depth order) bgImage:Sprite, dropZone:Sprite, dropMask:Sprite and line:Sprite. The bgImage is at 0,0, and the other objects are placed at various positive coordinates. dropMask is masking dropZone.At the point of bitmap capture I want to only draw from the dropZone and dropMask layers, so I'm trying this:
removeChild(bgImage); removeChild(line); var bmd:BitmapData = new BitmapData(dropMask.width,dropMask.height,true,0); bmd.draw(this,null,null,null,dropMask.getBounds(this));
Despite the dropMask being located at 50,60 the capture always starts from 0,0. I've also tried getting the boundary rectangle and forcing the x,y, but it makes no difference. should I just forget clipRect and use a matrix instead?
I'm new to AS3 and have been making a Snake game. I've come up with a problem with the code (Yes, I have magically created problems trying to program Snake...It's going to be a long day). My problem is, with removeChild...I'm getting strange errors being throw at me. Not only that, but my Movieclip (myFood) is not being removed entirely, only the visuals of it are.
That being said, here is, what I believe to be, the most important chunk of code for this problem, along with the error it gives me. Code: /* * Code for the Snake and whatnot extras. * Also, Snake and Food are classes. */ var myFood:Food = new Food(); stage.addChild(myFood); function snakeEatFood() { [Code] .....
I have an mxml panel in which I'm using a repeater. The panel can be resized horizontally and I would like for the repeated components to resize together with panel. Here is a simplified example of how things look like:
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" ...> <!-- scripts and some controls --> <mx:VBox width="100%">
I see the background while in design mode within FrontPage, but not in preview mode nor once it is published online.I have also tried adding the following code:
1. Add the following parameter to the OBJECT tag: <param name="wmode" value="transparent"> 2. Add the following parameter to the EMBED tag: wmode="transparent"
I hav a movie [instance name : myObject] clip with some pattern design in it. Now i hav converted it to Bitmap to use FloodFill method on Runtime. code in which The floodFill not working:
Code: var bitmapData:BitmapData = new BitmapData(350, 450, true, 0x00FF0000); bitmapData.draw(myObject); var con:Bitmap = new Bitmap(bitmapData);
[Code].....
i hav set the transparency to false, it Works. But i hav a object in background that i hav to keep visible to user.
I have a flash banner and css menu to use.I tried flash with wmode as transparent for flash banner which makes the css menu to come over the flash banner.but the button which is there in flash is not working in IE 7 and it's lower version.
Im working on a school project in flash, and I solved many problems by reading the forums. But there is one problem that I just don't know how to solve.
I have an object (objectB) which should be highlighted when the mouse drags anohter object (objectA) over objectB. ObjectB contains a rollout and rollover which tells the objectB timeline to go to a specified frame where the color of the object in movieclip objectB is different from the first frame.
Anyhow, this is my maincode in the maintimeline of the flashfile so far;
[Code]...
Now the reason why I use event.target is because I'm going to put in just too many objects that will do the same thing later on. So the problem is that the objectB won't be dropped, or stopped dragging. The rollover function on objectA works when I roll over it when I drag objectB. But why isn't the function dropObject ever executed?
Do someone have a clever and easy solution to this? I guess there is something obvious that I've missed.
It's an image scroller. It has an odd shortcoming that I can't seem to work around. My site is a simple portfolio site with 3 sets of images. I'm using 3 instances of this component, overlapped within the same visual space of the stage, and currently switch through the 3 sets (instances) with alpha tweens using the Activate Tween engine, which augments an object with an .alpha = 0, with .visibility = false; [URL] - to see the behavior I'm addressing. Takes a bit to load wish it were faster.
How do I make a DisplayObject3D have mouseEnabled = false. I have a Sprite behind the Papervision3D scene listening for mouse events and so i need to let it pick up those mouse events through some of the DisplayObject3D objects.
I've tried adding the DisplayObject3D to a separate ViewportLayer and setting thats mouseEnabled to false but that doesn't seem to work.
If I set the mouseEnabled property of a button to false, it automatically triggers the MOUSE_OUT (and ROLL_OUT) event.Is there a way of avoiding this? I don't want any events to be active after setting this property. I attached an FLA, also here is the code:
Am I correct in thinking I have to set mouseEnabled = false for the entire hierarchy of display objects that are above an interactive object, in order for me to be able to successfully interact with it?Diagrammatically, I've had to set all elements with an asterisk to mouseEnabled = false:
Can I shrink the textfield down to the width of the text without squeezing it? Code: public function Notification(Message:String) { notificationText.text = Message; notificationText.mouseEnabled = false; }}
I'm new to Flex and am using TileList bound to an ArrayCollection. The array collection is empty at load time, and then updates with the results from am HTTPService call. The problem is that the item renderers aren't being rendered as expected, I'm guessing because there was no data when they were first rendered at load time. Here's simplified example:
Even though mouseEnabled is set to false, still ROLL_OUT is cought. Its propably cause mouse GOES out of the object, but I dont think it should be like this.
I have several sprites nested in containers. Let's say, that there are six containers (each represented by a Sprite) nested. I use the mouseChildren = false property on the container at depth 3, so the containers that lie deeper cannot receive mouse events. But still, I want that the container at depth 6 can receive mouse events
Im going out of my mind trying to find a workaround to the supposedly well known ff bug [URL] regarding MouseScroll Events when wmode is set to transparent. I've spend a good part of a day googling for solutions, but nothing seems to work.
The majority of fixes are focused on the issue of being able to scroll down/up on the page, but im using the scroll to zoom in/out. An example can be seen here (its still a prototype so if anyone gets tempted to click on a box stay with nr 1 or 2 )[URL]
It works fine in IE (though im still working on making the zoom more elegant and smooth), but in FF, Chrome etc it wont work.
My embed code can be seen here
ActionScript Code: <script type="text/javascript"> var flashvars = {}; var params = {};