Given this grid (tinyurl.com/63dgoja --> This is a trapezium/trapezoid, not a square), how do you find the point clicked by the user? I.e. When the user clicks a point in the grid, it should return the coordinates like A1 or D5.
i'm triying to make a dinamic generated plane, that plane has a grid with lines in X and Y, by now i'm able to generate a grid clicking and dragging points to make 4 lines and i generated 2 lines between the midles of the opposites lines like this:
In Drug.as I have a button, the listener is in Main and I'm trying to find out which instance I have clicked so I can pick out the price of the drug and make a purchase.
I am creating something that randomly generates 'stars' on the stage, and these stars then randomly explode. When the explosion_mc is created, an eventlistener to click them is made, so when an explosion is clicked on, it will remove the child(explosion) from the stage.
It sort of works but will only remove the latest explosion made whatever explosion you click on. I need to somehow let flash know what child is being clicked on.
Quote:
var star_array:Array = new Array(); var explosion_mc:explosion; var explosion_array:Array = new Array();
I've created a video player using the flv component. I have images of cue points. The user should be able to click on an image and the video should skip or start at that cue point
I have a client who wants some things in Papervision that I'm not sure how to do, namely: when the user clicks somewhere on a model, zoom the camera into that point.
I would use a tween engine to tween the camera forward, but as moveForward is a method, I'm not sure how I'd enter this data into a tweening call.
i'm trying to zoom in on a picture at the specific spot where the mouse is clicked. ie if the mouse is clicked in the lower left corner, the pic gets bigger from there, not the center of the pic. the only way i can think of to do this is to reset the registration point to the clicked position. is this possible? is there another way to go the job done?
im having a bit of an issue with making a character walk to a position when the area is clicked (but i dont want them to move on the y scale, just the x). i dont want them to instantly move, i want them to (flip over if necessary) and play their walking animation as they walk to the clicked position.
I am dynamically creating 10 textinputs inside a vgroup . when user clicks a button, I want to fetch the text present on all textinputs. How to do this. My code looks like this
var vgroup:VGroup = new VGroup; for(var i:number=0;i<10;i++){ var textinput:TextInput=new TextInput(); vgroup.addElement(textinput): }
Am working on a website and just doing the final tests and evrything works apart from in internet explorer 7 when i click on the hyperlink( flash button) it says it can't find the url, which doen't make any sense as it works fine using mozilla.
i created dynamically checkbox on data grid how do i find out Which checkbox select/unselect and which checkbox contact is select/unselect ? Because we cant set dynamic id for each checkbox
I am currently looking at a way of visualising data and a part of the algorithm needs something 99% the same as A* Path Finding but I cannot wrap my head round it fully. I know it will be a fairly simple modification. (specific cost instead of least cost)
Basically I need to plot a path (2D Grid, no Diagonals) from point A to point B in X number of steps.
E.g. If the start and end points were right next to each other and I needed the path to be 3 steps it would have a tiny loop. (moves: up, right, down). Is there a known name for this algorithm or is the use of this so rare it's uncommon? I am currently looking at this AS3 Librbay for modification as it is apparently very fast and seems clean and simple to me:[URL]..
I once needed to pan a sprite full of movieClips (picture 1) which were draggable with no bounds so you could drag them up and left (higher than sprites registration point).
You could also drag them down and right and expand a sprite that way (as well) but that didnt matter.What did matter was how much is 'up' and 'left' from the sprite registration point so i can include that in my formula for panning.
This was easy to find, i just sorted my array of movieClips, sorted on x and sorted on y after each drag, and thats how i got my up and left points.
Now I am trying to do that same thing, exept my movieclips inside a sprite have a custom rotation (picture 2), so i also have an up and left point, except this time up and left are caused by rotations of movieClips inside a sprite... (and these are dragable as well with no bounds)
To make this easy, lets say I have a movie clip with a diagonal line in it (top left to bottom right).
I want to start my y position at 0, and place it in a loop and increase y by 5 every time. So we start at the top left of the clip, and move to the bottom of the clip.
Now since we have our y value (0, 5, 10, etc.) would you get the x position of the line? such as (x, y): 5, 10
How could I find the distance between a given point and a drawn line? I was thinking about using the point-slope formula to draw a perpendicular line between the point and the line and measuring it as the distance, but I'm not quite sure how to do this in as3.
I am looking for a way to find a vector if I know one point and 1 angle. Like I have A(x, y) and a vector starting from A(x, y) with an angle. I would like to know the position on a point X (x, y) that can be anywhere on that vector. I only know the coordinates of A and the angle. Possible?? I guess it has to be a function...
There is an Image control that when I click on it I need to zoom in (using the center/transform point where the mouse is clicked). I have the zoom transition working great, but when I set transformX & tranformY (with autoCenterTransform false) it doesn't zoom into that point.
Here is my code that only zooms in (not to a specific point) <fx:Script> <![CDATA[ protected function imgLogo_clickHandler(event:MouseEvent):void { transformer.play(); } ]]> [Code] .....
I would like to create a component(extending from spark Panel), which upon a buttonclick should show up next to the button(something like a bubble popping up or like the small box opening up when hovering up on profile links in facebook/twitter). I tried to create a component that implements mx.core.IToolTip and provided the methods required by the interface. And on the toolTipCreate event, set this component as the tooltip.
This works to an extent. When I bring the mouse over the button, the panel appears as the tooltip and goes away when i move the mouse away. What I need is, the panel should appear next to the button when click on it and should go away only when I click outside the panel or click the close button present inside the panel.
I have a number of boxes on screen - each box is a rectangular movieclip, and they fall to the bottom of the screen where they pile up to make a stack of boxes. I'm using box2d for the physics. Oh, and each box may be rotated. I need to find the highest point - ie the smallest y value, of the stack of boxes.
Obviously I can find the position of the highest box's registration point easily (which is the centre of each box) - but that may not be the highest point of the pile of boxes. The highest point may not even be the highest box - it could be a lower box that is rotated on end, for example.
I want to find out if the user is currently using more than one finger to draw on the screen.currently, the TouchEvent object doesn't have any property like touchCounts, which tells the number of touches on the screen. it just has a touchPointID, which helps to identify a particular touch.
do i need to handle this on my own ? for eg: in the TOUCH_BEGIN event handler i could see how many different unique touchPointID i have received and update the count myself.
I have two circles, an inner circle and an outter circle. I'm trying to find points that reside within the area between the edge of the inner circle and the edge of the outer circle.
I've got a grid of sprites.Now I would like to drag an image on a grid-element.Therefore I need to know which x/y of the grid-element is the closest point to the mouse-position.