ActionScript 2.0 :: Find Center Of The Visible Area After Drag?

Jul 19, 2009

I have a AS2 movie clip that has a drag navigation. The movie clip is bigger then the visible area. How can I find the center xy of the current visible area when I stop the drag?

View 2 Replies


Similar Posts:


ActionScript 3.0 :: Find And Store Visible Area On Mouseover?

Oct 27, 2010

I'm working on a game where if the person puts there mouse over a card, it should pop out over the other cards, and when moved off, the card should go back to where it was, i can get the card to pop out no problem, and go back to it's location, the thing is, i don't want the card to go back when i move off the entire image, only when the mouse moves off of what was originally visible, and i'm not certain how to obtain a pre-visible area that i can use to test if the object should still be over all the other cards.

View 5 Replies

Flash :: Determining Visible Area/invisible Area Of A Masked Object?

Sep 29, 2011

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 Replies

ActionScript 3.0 :: Drag And Drop System Where The User Can Drag A Movie Clip Into An Area (Snap & Overwrite)

May 20, 2011

Im trying to do a drag and drop system where the user can drag a movie clip into an area. Although i would like to make it snap to a target instead of just sitting wherever it lands in the area. Problem Two:

The next thing i am trying to do is when the user has a movie clip on a target already, and trys to put another movie clip in that target area, it will replace the one thats in there and go back to its current position. Here is the script of what i have done so far:

[Code]...

View 14 Replies

ActionScript 3.0 :: Height / Width Of Bounding Box Of Visible Area?

Jun 23, 2008

In many cases the pieces have artifacts outside of their visible area. For example, a piece can have a picture of a dog's face, but one of the long ears is off to the side, outside the visible region of the piece. The path data is extremely detailed, so our designers didn't crop it off. They used a mask (at least I think it's a mask, I'm not a graphics guy and know little about that stuff) and this makes it invisible in Flash, when we turn them into movie clips. Also, in Flash when I look at the width and height of the piece, it does reflect only the visible area.However, in ActionScript when I try to get the width and height using, for example

Code:

pieceObject.width

I get the width of the piece including the part that is hidden, i.e. a larger width than the visible area.Is there a way in AS 3.0 to get the height / width of the bounding box of visible area only?

View 6 Replies

ActionScript 3.0 :: Create A Screenshot Of The Current Visible Area?

Nov 15, 2009

I'm making a first-person adventure game where I have the different frames in the root movie be the various locations that the user can interact with. I want to have fading transitions between the scenes and I was wondering if this was possible in flash. What I've tried for now is to create an array with all the current children then when the frame is changed I add those objects on top of the new frame and use a (alpha) Tween object to fade them out. This doesn't seem like a good idea and feels very hackish, so I had a few questions:
 
1. Is there an event that is called when a frame is changed (Event.FRAME_CHANGE doesn't exist ) since the way I'm doing it now is to have a local variable which I compare with this.currentFrame.
 
2. This may sound weird, but is there a way to create a screenshot of the current visible area and use that as one would any other visible object? This would allow me to Tween that one out instead of the array of children that I'm using now. I know it's possible in OpenGL, to render the current view scope to a texture array, but does Flash have this capacity?
 
PS: This is all done inside a separate class, in case that matters (I am very noobish).

View 5 Replies

ActionScript 1/2 :: Cursor Visible In Non Editable Text Area?

Oct 25, 2010

I would like to know how to have the cursor visible in non editable Text Area.

View 7 Replies

Actionscript 3 :: Make Flash Button Of PNG Visible Area?

Oct 15, 2010

I'm trying to know if there's a way in ActionScript 3 to load a PNG image and make some sort of button or sensible area applicable only for the visible area of that PNG??Maybe there's a simple way to define a polygonal area on execution time, I mean, dynamically and make it sensible to mouse events??

View 4 Replies

Flex :: Getting The Global Coordinates Of The Visible Area Of A Component?

Oct 19, 2010

I am trying to determine the global coordinates of the visible rectangle that is currently rendered on the stage.

Specifically, if a canvas has an explicit height and width and is a child of a panel that has a scrollbar, the scrollbar can "hide" a part of the canvas. ContentToGlobal(x,y) provides the global position of the content at the time, but content coordinates can scroll off the boundaries of the parent panel and continue to give x,y coordinates that are not visible.

Is there a way to determine the viewable rectangle that is not hidden by anything?

View 2 Replies

Flex :: Layout: Can Width Be 100% Of The *visible* Area Of A Larger Container?

Nov 30, 2010

I've got the following situation, where I have an outer Vbox that is set at a fixed width, and then inside it there is a header made from an HBox and a content area (Canvas) that is much wider than the enclosing VBox (and therefore requires scrollbars on the outer VBox to see it all).

I would like to set the width of the header to fill the entire width of the outer container, but only the visible part, and to remain fixed so that when I scroll to view the content, the header doesn't move.

[Code]...

View 3 Replies

Actionscript 3 :: Take Snapshot Of Display Object Visible Area In Flash?

Jul 28, 2011

I have camera input app in flash (AS3) and I draw some graphics over it. I want to take the image snapshot of the stage visible area but only the video an graphics I draw over video. I want to exclude controls from the image snapshot. My display object layout is in following relation:

-stage
--canvas (Sprite)
---video (Video)[code]..........

Stage size is fixed and I want to take a image snapshot of everything that is child of my canvas element (camera input video and overlayed graphics, but excluding controls). I am able to make this image snapshot when overlayed graphics are inside the bounds of stage size. I do it like this:

var bmpd:BitmapData = new BitmapData(canvas.width, canvas.height);
bmpd.draw(canvas, new Matrix(1, 0, 0, 1, canvas.x, canvas.y));

But this gives me unwanted result when graphics which I draw on top of video on canvas exceed the bounds of stage display area. How do I limit the image snapshot only in the bounds of visible area inside stage?

View 3 Replies

ActionScript 3.0 :: Bound MovieClip Not Draggable Outside Visible Stage Area

Jul 31, 2009

I have some movieClips on stage which are draggable and I don't want them to be draggable outside of a visible stage area. Problem is these movieClips are inside a sprite which is panable and then for whatever reason this bounds doesn't work anymore as I intend it to. How do I fix this bounds?

Code:
var arr:Array = [m1,m2,m3,m4,m5,m6,m7,m8,m9,m10];
var thumbSprite:Sprite = new Sprite();
addChild(thumbSprite);
for each (var item in arr) {
item.addEventListener(MouseEvent.MOUSE_DOWN, startDragCard, false, 0, true);
[Code] .....

View 3 Replies

ActionScript 3.0 :: Find Center Point Of Pie?

Aug 26, 2010

i am trying to find center point of my pie.

var myTween:Tween = new Tween(piechart,"............", Strong.easeOut,1200, 510, 1, true);

i want to animate from the center and it has a xml driven data file.

View 2 Replies

ActionScript 2.0 :: Find Center Of Movie?

Sep 26, 2003

How do you find the center of a movie that has has been loaded by loadMovie();

This is the method I was using, but now that it is in a .swf that has been loaded it's stoped working

[AS]
xcenter = box._x + ( box._width /2);
[/AS]

View 4 Replies

ActionScript 3.0 :: Find The Dimension Of A Container To Set All Children Visible?

Jun 17, 2010

I'm trying to avoid the scroll bar appearance on an UIComponent. Is there any way to obtain the computed width/height that my container component should have to have all children visible? I don't want to compute it myself. I would like to know if there is any variable computed by the component when it decides if it should draw the scroll bar or not.

View 0 Replies

Flex - Build Efficient Button Skins With Larger Hitareas Than Visible Area?

Aug 3, 2011

What I'm trying to do: build a super simple button skin (say a small circle when in up state, slightly larger circle when in over / down states) that has a larger mouse hit area than visible area. In other words, I'd like the button to look like a 5x5 circle when in up state, but transition to over state when the mouse is in a 15x15 pixel area around such circle - in order to make clicking on the button easier.

What I've done in the past is to use a transparent ellipse behind the the visible ellipse. This works nicely but seems like a waste of memory (not much, although if you start having a lot of these buttons it adds up) and rendering cycles (transparency). I thought I could avoid this by wrapping the ellipse in a group with a given size and listen to its mouse events, but somehow no mouse events seem to fire on such a group - not sure why.

I guess I'd love to know if anyone knows an efficient way to do this. Also would love to know why such a group won't fire mouse events, but I guess that's secondary. Simple code snippet below:

[Code]...

View 1 Replies

ActionScript 2.0 :: Find MC Center Relative To Edges?

Aug 31, 2010

I don't seem to be able to find the right wording to find my answer anywhere.How do I determine where an MC's center is relative to its edges?I'm developing a tool that a variety of noobs (as if I'm not still a noob) will be using, and I don't trust them to keep art with 0,0 being the top left corner.How do I figure out that the left edge is now at -111px, and the top at -52, and the right at 12, and the bottom at 334?

View 3 Replies

ActionScript 2.0 :: Find Distance Of Mouse To Center Of MC

Sep 17, 2007

I created a movie where I have a circle in the middle and a line drawing from the center out when the mouse moves. I want to calculate the distance from the mouse position to the middle of the circle. What I am going to do is have a sound playing from the center of the ball..The closer you get the louder the sound gets and the further away from the middle the quieter it gets. You can download my fla to see what I have so far.

View 1 Replies

Flex :: 4 - Move All TitleWindows Instances Within The Visible Area After Application Change It's Width / Height?

Jun 8, 2011

Is there a nice and not much processor consuming way to move all TitleWindow instances within the application visible area when the application been scaled - change it's width or height ?

View 1 Replies

ActionScript 2.0 :: If, Else Statements - When The Side Bar Opens - Find Out Which Photo Is Visible?

Mar 5, 2007

Basically there are 3 photos, 2 set to 0% alpha and 1 set to 100% and each have a mini page icon which changes the photo that is visible. i when the side bar opens i want it to find out which photo is visible and have the appropriate icon on rollover state (grow) so you always know which of the photos are visible.

View 4 Replies

ActionScript 3.0 :: Find Display Area Of IE Or Mozilla?

Mar 7, 2011

how do you find the display area and/or resolution of the screen in actionscript 3?

View 1 Replies

ActionScript 3.0 :: Find Out Different Circle's Center Point Of A Bitmap?

Dec 6, 2009

How to find out different circle's center point of a bitmap?

just like photo above, how can i locate the 2 center points of circles?

i only know using .getColorBoundsRect to get a point, but this only apply to one circle, in fact i wanna get different points according to the bitmap.

View 1 Replies

ActionScript 3.0 :: Find Center Point Of Mc With Dynamic Scale?

Dec 1, 2010

I'm trying to add some zooming functionality. The problem is that when you zoom in and out, it scales the MC up and down from where the registration point is. This means That when I'm far from the position of the registration point instead of zooming the in straight it also makes it appear as if you are travelling towards the registration point.

To offset this effect I want to calculate the amount of pixels I need to offset the Map by so that it appears as if you are zooming in directly.

So just as a test I've put a little ball inside the map(called "center") which I'm trying to keep in the center of the map.[code]...

View 1 Replies

Flex :: Find Point In Area Of Outer Circle?

Dec 23, 2010

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.

View 1 Replies

Actionscript 3 :: Bitmapdata - GetColorBoundsRect - Find The Rectangle Area Or Each Circle

Jun 20, 2011

I have a BitmapData with 2 red circles. I want to find the rectangle area or each circle. If i use [B]getColorBoundsRect[/B] I get the smallest area enclosed by the 2 circles. How can i go about this and get individual area of the circles?

View 1 Replies

ActionScript 3.0 :: Scale From Center After Drag?

May 21, 2010

I have an image inside a movie clip that a user can scale from its center using the slider....works great.However the use can also drag the movie clip.After the movie clip is dragged to a new location it and then scaled using the slider it jumps back to the center of the stage and then scales.I have tried modifying the x y of the movie clip but then the scale is no longer from the movie clip's center.

var clipNativeX = holder_mc.x;
var clipNativeY = holder_mc.y;
function scaleClip(val:int):void[code]......

View 2 Replies

ActionScript 3.0 :: Drag And Drop Labels Visible On Other Scenes?

Mar 21, 2012

have created a drag and drop game with targets. I have got this to work perfectly and im happy with how its runs. However i have created many other scene is one file named index with different activities and action script. I have created buttons that takes you from one scene (page) to the next. Once i have dragged a label to one of the targets and click to go to the next scene; the object remains visible on the sceneHere is the action script for one of the pages.

function gotoveins(event:MouseEvent):void
{
gotoAndPlay(1, "VeinsAndArteriesPage");

[code].....

View 0 Replies

ActionScript 3.0 :: Sprite Drag Area Is Too Big?

Jul 16, 2009

I've dynamically created sprites with graphics and added a text field dynamically to each sprite, displaying different text. These sprites (checkers in this case) are draggable. Without the text added to it, the drag area is very precise, dragging only when the circle is selected. However, when I dynamically add the text, there's a significant portion underneath and to the side of the sprite that is also draggable. This is really annoying when one sprite is placed above another because trying to move the sprite below causes the sprite with a lower y coordinate to move even though it shouldn't. When I tried to define a width and height for the text field to avoid this unnecessary space, it made the text much too small!

There must be some way to make it so only the graphics and text are draggable. I don't even mind if there is a square (like the old Flash 5 movie clip square) around the combined object, but there shouldn't be the white draggable space.

For reference, here is the code:

Code:

var i:int = 0;
var Rwidth:uint = 20;
var Rlength:uint = 20;

[code]....

View 1 Replies

ActionScript 2.0 :: Fencing In The Drag Area

Jul 8, 2003

So I want to fence off part of my stage for dragable MCs. I don't want them to be able to be dragged out of. Say withing 50 pixels of both the left top and right borders, and within 150 of the bottom border.

View 4 Replies

ActionScript 3.0 :: Scale From Object Center After Drag?

May 24, 2010

I have had some help but still not understanding this.

How can I scale an object from center after it is dragged by the user?

Currently I have this:
function onSliderChange(e:SliderEvent):void
{
scaleClip(slider.value);
}

[Code]...

With this code the movieclip jumps back to the center of the stage each time I call the scaleClip() (move the slider). I would like the object to scale from it's own center regardless of where it is on the stage.

View 2 Replies







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