ActionScript 3.0 :: Textfield.htmlText Link Doesn't Receive Mouse Events Underneath Sprite?
Oct 28, 2010TextFiled is not receiving mouseEvents, coz of the sprite on top:
[Code]...
TextFiled is not receiving mouseEvents, coz of the sprite on top:
[Code]...
I have a base ShapeContainer(UIComponent). I add a uicomponent which has mouse down listener to ShapeContainer. the listener works great. When I add a simple sprite(draw square) on the ShapeContainer, The listener does not work any more. In the code, if I comment below line, The event listener works fine.
[Code]....
I've got a movieclip on my stage that contains a scrollbar and a few buttons.I have a function that rotates the uses _mc.rotationX=10;After an interval the function uses _mc.rotationX=0;After the movieclip has be rotated back to its original position the scrollbar and buttons no longer receive mouse events.[code]
View 2 RepliesI am trying to fix this problem. My external text display fine and also the CSS. The problem is when I am using any tag in html like <a> doesn't work, doesn't try to open the link and also the mouse doesn't change to the default hand. I am attaching my code in AS3. If you see I am using a scroller and also a mask.[code]
View 11 RepliesIn a pure ActionScript 3 project, I have a sprite that overlaps another sprite. The lower sprite normally handles mouse clicks. The lower sprite no longer processes mouse events when it is overlapped by the higher sprite. I would like the lower sprite to handle mouse events when it is overlapped. (In my particular instance, the higher sprite is just a decorative piece; it has no normal mouse interactivity anyway.) Is this possible? Is there a way to route mouse events through the higher sprite?
View 3 RepliesEverytime I google this question I see confusing information about masks and blends, none of which seems to directly apply to what I think should be an easy thing... There are three Sprites involved here...the lowest layer sprite is pretty much a background. I want to overlay a translucent Sprite on top of the background and then I want the third, top-most Sprite to act as a hole, so that the area inside the third Sprite is completely transparent, so that the background sprite is completely visible. How would I go about doing this dynamically (i.e. dynamically drawing the masking sprite and hole using the Actionscript graphics calls)?
View 4 RepliesEssentially, the simplified problem is this: I have a parent sprite "PARENT" with two children: One child sprite "A" that contains a number of children which respond to mouseover/mouseout and rollover/rollout events, and a second child sprite "B" that is shown/hidden based on the events in "A".
The problem is that "B" appears over "A" on the stage and when the mouse enters "B", the children in "A" throw mouseout/rollout events. Ideally, I would be able to make "B" completely mouse transparent so that the hit testing in AS3 will "see through it" to the underlying "A" sprite, but this doesn't seem possible.
Note that "B" has mouseEnabled and mouseChildren set to false... but the problem seems to be that the AS3 hit testing engine won't look at siblings when determining mouse hit testing. (i.e. It sees "B" under the mouse, sees the mouseEnabled=false setting, and then moves on to "B"'s parent ("PARENT"), but never checks to see if "A" is under the mouse (which it is)).
I can't make "B" a child of "A", because "A" is clipped and "B" needs to extend beyond this clipping area.
At this point I'm thinking I'm going to have to do my own hit testing, which is far from ideal given that "A" contains a large number of children.
I'm making a puzzle game in Flash cs5/as3 which can have custom puzzle shapes. Basically, the user can draw basic protrusions of a puzzle. Then I create a black and white puzzle piece with a custom function like this var piece:PuzzlePiece= new PuzzlePiece(true,true,false,false); PuzzlePiece is a class that extends Sprite. The four arguments correspond to the four sides of a puzzle piece (up, down, left, right). If the argument is true, it means that protrusion should stick out of that side of puzzle piece. If it's false, it should have a hole on that side, so it fits the protrusion. I first attach the protrusions that stick out, then i flip the protrusions that stick in, attach them to a new sprite (in_part) and invert them with the following function:
[Code]...
i'm making a small "add news" movie for a site in actionscript. When I insert an image in my textField, I can only move the cursor with my keys and not with my mouse anymore. I put the image always in front. I also have to click one time in my textfield, otherwise my text appears under my image. When I click it aligns to the right.
[Code]...
i am trying to do a simple blackboard on mouse down, start drawing on mouse move, if drawing, draw line on mouse up, stop drawing i set the listeners on a simple clip with a rectangle. if i dont fill the rectangle, the mouse events wont fall into the rectangle, but if i fill the rectangle, it will paint behind the rectangle, so anyway i wont see any succesfull results. what i did was create another sprite and paint within it; something like
[Code]...
I am trying to capture mouse events in flash while the mouse is being held down. The intention is to keep reciving events as long as the mouse is pressed, even if the cursor leaves the flash element. That's the behavior I get on all browsers other than IE, which only fires events while the cursor is inside the stage.
I'm pretty sure I've seen such "well behaved" flash applets work in IE before.
i'm trying to make a scrollable box, when a mouse enters and STAYS on "wrapper"'s area, "pubsBox" moves 10 pixels to the left.
<mx:Canvas id="wrapper" height="80" width="750">
<mx:HBox id="pubsBox" horizontalGap="10" height="80" width="100%" />
</mx:Canvas>
My problem is that I'm not sure how to make the MouseEvent.MOUSE_OVER work, to recognize that the mouse is still ON the area and so pubsBox should continue to move 10 pixels to the left every second. I understand that i have to use a Timer, but what I'm concerned about is the fact that I can't get Flex to recognize that the mouse is still OVER "wrapper" and continue firing the event.
I have a movieClip that I use as a background which sits underneath two textFields that are dynamically generated... I have added MouseEvent.MOUSE_OVER and MouseEvent.MOUSE_OUT to that movieClip so that I can change the alpha value to fade in/out the background...
The problem is when you directly rollOver on top of the textField which prohibits the MouseEvent.MOUSE_OVER happening on the background movieClip...I tried to set the selectable to false on those textFields, but that did not have any effect...
I've got a sprite which I want to temporarily hide... But changing the .visible property doesn't do what I expect. The code looks roughly like this:
[Code]...
I want to build a simple web 2.0 collaborative website using asp.net MVC2 or Flash and I want to receive events from a web based interface to a desktop AIR application. For e.g, someone makes a comment on a blog post, I want that information to be passed on to a desktop air application showing that a new comment has been made. What would be a good technique to receive asynchronous events?
View 2 RepliesWhy an attached move clip doesn't keep button interactions from still engaging in the layers underneath i.e. navigation buttons, rollovers, etc.?
View 3 Replieslook at the code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:creationComplete>
[Code]....
As you see, I try to make my HorizontalList focused when application is loaded. And I actually receive Received focus message in console. But I expected that I would be able to navigate over list elements with arrow keys after setting focus. But that's not the case. They work only after clicking component with mouse. How to make list have focus and respond to arrow keys?
I'm considering using Adobe Air to write an application for the android marketplace.I was wondering if anyone could tell me what (if any) the limitations are with regard to getting / handling system events.For instance can you pause the app if the user receives a text message?Or detect if they have their music playing and mute your app's sounds?It would seem a real pity if Air cannot do this.
View 1 RepliesI'm triggering the appearance of a tooltip via MOUSE_OVER on a button and I'm finding it keeps getting triggered if I keep the mouse pointer over the tooltip. Both the tooltip and button are MovieClips
How can I prevent this?
Here's a snippet of my code:
for(var i:Number=0; i < MapContainer.numChildren; i++) {
var Country:MovieClip = MapContainer.getChildAt(i) as MovieClip;
if(Country){ // make sure its a movieclip
[Code]....
Right now all the sounds (78 of them) on my guitar play using the roll_over event but that doesn't give the user much control over what sound is played.
The actionscript im using to play my sounds is this;
for(var i:uint = 0; i < buttonArray.length; i++){
buttonArray[i].addEventListener(MouseEvent.ROLL_OVER, buttonRolledOver);
}
[Code]....
What i want to do is only play a sound with the roll_over event when the left click is held down.
I have AIR application and mx:Label with htmlText property [URL]. For some reason nothing happens when I click it. It works in not-AIR application, but does not in AIR one.
View 1 RepliesI'm using LoadVars and in my one variable I basically have a link <a href="contact.html">Contact Us</a>.Is there anyway that I could make this into AS to do something like gotoAndPlay()?Is there a better way to do this? This is a dynamic text field so I guess I could use a movie clip and put an action on that but I'm not sure where it would end so I'd have to put in the movie clip dynamically and then if I do that I'm not sure how to put the action on it.
View 1 RepliesI have a myarray Array declared and pupulated with the syntax as such:
Code:
myarray.push("<a href=" + '"' + "event:" + value1 + value2 + '"' + ">" + linkvalue +"</a>");
I want to sort the array on the "linkvalue." Is there a way to do this with Array sortOn or something similar. I prefer not to have to do this with a bunch of arrays and iterations.
below is a copy of my code:
Javascript (contained in an include file attached to my html page)
Code:
function open_glossary(id) {
if (!isNaN(id)) {
id = parseInt(id, 10);
[code]...
This is not opening the popup (glossary.html) and im not sure why.
PS: This javascript works perfectly fine when accessed by a regular html link on the web page.
I have got a performance problem about TextField.htmlText +=msg.And I know thatTextField.appendText(msg) works better than TextField.text +=msg.So I wonder if there's some method better than TextField.htmlText +=msg?
View 2 Repliesjust because i got no response i am putting this up once again.When i use htmlText in textFields, it does not render smooth. How can this be fixed ?Tried embedding fonts... but nothing seems to work.
View 4 Repliesi have a action script that read a xml file and put the content of this file in a htmltext box, but when come inside the xml file a code like this"<font color='#003399'>Test</font>" the box (htmltext) appears empty.
[Code]....
When i erase the tag <font color='#003399'></font> in xml the variable "myTextos" appears correctly in my htmltext box.
1. I need to put different font style in one single dynamic textfield. For example,the text is :"Welcome, Fred" and I want Fred to be bold and use "Vernada" as its font while others are left as "Arial"2. I am using embeded fonts and htmltext here, the strings are loaded from external xml files3. I found in the doc that the font tag could do this. So I set the embeded fonts to "Arial" for the dynamic textfield and add <FONT ACE="Vernada">Fred</FONT>in the xml files, but it will not show "Fred" at all4. Of course I added both "Arial" and "Vernada" into the library.5. The problem is when I change the embeded fonts into "Vernada" for the dynamic textfield and modify the xml like <FONT FACE="Vernada" SIZE="25">Fred</FONT>, it works this time. I mean the character size changed to 256. My conclusion is that the font tag only works when its font-family setting for its textfild is as the same that you want to set.
View 13 RepliesJust wanted to ask if there is any advantage for either using mouse click event or touch tap events, when writing apps for mobiles or tablets (for the iphone especially)?
I know that both of them should work fine, but in term of performance, is anyone better? Are there any things I should be aware of when choosing either?
By the way am using actionscript3 to implement the app.
I have an animation that I want to start when clicking on the flash window. However, I've also have some buttons on the stage. If I add an event listener for MouseEvent.CLICK on the stage, then it 'eats up' the events and the buttons don't work.
I've tried some tricks, by adding some invisible buttons on top of the real ones, and use the MOUSE_OVER event to selectively enable/disable the mouseEnabled flag for the stage, but didn't work because it complains that the property or method doesn't exist (which I find odd).