Actionscript 3 :: Libraries With A StartDrag() Equivalent That Has Non-rectangular Boundaries (ie: Circular)?

Jul 27, 2011

I'm just trying to avoid rolling my own dragging functionality - anyone know of any libraries out there that have a startDrag() equivalent where you can use, say, a circular radius for the drag bounds, rather than a rectangular box?

View 3 Replies


Similar Posts:


Actionscript 3 :: Circular Dependencies In Flex Libraries?

Sep 21, 2009

I have two Flex libraries that reference each other. Both use link type "External", and I manually load then with the Loader class.I'm getting the error "A cycle was detected in the build path of project: foo".

View 2 Replies

ActionScript 2.0 :: StartDrag And Setting Boundaries?

May 14, 2006

I have a movie clip that can only move to certain parts in the stage. For this I used another movie clip that supposedly should constitue the rectangle constraint. But this doesn't seem to work !startDrag(this,true,bounds._x,bounds._y,bounds._x+ bounds._width,bounds._y+bounds._height);

View 2 Replies

Flash :: Canvas Moved On StartDrag() Without Calling Set X / Y Or Move() - How Does StartDrag() Exactly Work In As3 / Flex

Feb 11, 2011

i have an .as class that extends mx.containers.Canvas (it's a draggable border of a resizable component), it becomes draggable on MOUSE_DOWN and stops being draggable on MOUSE_UP, MOUSE_OUT and ROLL_OUT. before calling startDrag() i create a Rectangle to define the drag area, i also have a _dragging: Boolean variable to control if it's draggable at the moment. the problem is that when i click this border it jumps to a negative coordinate without calling startDrag or switching _dragging to true.

i've overriden get x, set x, get y, set y and move() methods in order to solve it but the only thing i got was the fact that position changes without calling coords setters or move(), but at the moment it's changed a getter is called and returns new (negative) value so my question is what happens on startDrag() and how to filter unwanted incoming coords values?

View 3 Replies

Actionscript 3 :: Flash - StartDrag() Within StartDrag() On Child MovieClip

May 19, 2011

as you can see, I have a container MC which I have added to the stage. I set its drag constraints using a Rectangle(). I then add the 'cat' child movieclip to the container, and I want this to be dragable too. However, as soon as I click on my cat when testing the MC. It shoots to point x=0 y=0 on the stage and doesn't move.

The container MC can be moved without any trouble.

If I remove the rectangle bounds from the containers startdrag() function. both MC's can be dragged without any issue.

//panning ability
my_x = 800 - myImage.width;
my_y = 480 - myImage.height;

[Code]....

View 3 Replies

Button In A Different Shape Than Rectangular?

Aug 2, 2009

is it possible to make button in a different shape for example i have a figure that i cut from image on a transparent background an i was wonder if it is possible to make that person in to a button but just that person not the transparent background.

View 1 Replies

ActionScript 3.0 :: Non-Rectangular Buttons With Images?

Feb 11, 2009

is it possible to create a non-square "button" in flash cs4 programmatically using as3?

Using a xml document, i'm trying to be able to retrieve a png file with transparency, and have said transparent area's be not clickable.

Long story short, I'm creating a map with a bunch of clickable areas. These areas are non-rectangular and I need them to not obscure other area's which would be in their rectangle. I need this to be done programmatically since the area's are going to be dynamic as is the data attached to them.

fyi: I have a fairly good grasp of OOP, so don't be afraid to post up complex instructions.

View 8 Replies

ActionScript 3.0 :: Fit Bitmap To Non Rectangular MovieClip?

Nov 27, 2009

I'm loading bitmaps dynamically using AS3 and I'd like to fit/tile them within a movieclip. (like a texture but in 2D)

However, my movieclip is not rectangular and everything I tried resulted in the texture getting out of the boundaries of my movieclip and being displayed as a big rectangle.

View 5 Replies

ActionScript 2.0 :: Using A Non Rectangular Drag Boundary?

Jan 17, 2007

When you call startDrag on a Sprite/MovieClip/whatever, you can specify a rectangle which the object in question will stay within.

Eg... startDrag(false, rect1); where rect1 is of type :Rectangle

how you would go about constraining the dragging to an arbitrary shape, say a triangle or a circle rather than a rectangle?

I figure I could just have a Timer calling a function to check the whole time but that doesn't seem particularly nice.

View 1 Replies

ActionScript 3.0 :: Change Shape Of This Rectangular Bounding Box?

Feb 18, 2010

I have a movie clip which contains a circular image, and by default Flash CS4 gives it a rectangular bounding box. This is a problem however because I am using this movie clip as a button, so the rollover area includes the entire rectangular bounding box and not just the circular image. How can I change the shape of this rectangular bounding box?

View 2 Replies

ActionScript 1/2 :: HitTest For Rectangular MC Over Irregular Shape

Jan 15, 2010

In my app, a user must drag and release a rectangular mc object (rectx) over an irregular shape within another mc object (irregx). There are 13 rect/irreg pairs. Each obj shares an AS2 file that checks whether rectx is over irregx, and proceeds _only_ if the check is true. The script uses hitTest, on mouse release, to grab the number (x) of the rectx being dragged and checks whether it's over irregx. Right now, the check comes back true when rectx is _anywhere_ inside irregx's bounding box whether it's over the actual image or not.

I've noticed that, when the (unpressed) mouse rolls over any irregx, it's oblivious to irregx's rectangular bounding box. It only reacts when it reaches the edge of the irregular shape inside, toggling from arrow to hand at the image edges. Since the mouse knows where the irregx image boundary is, is there a simple way to tap the mouse's 'eyesight' to verify whether rectx is over the correct irregx shape (meaning not just within the bounding box, within the shape inside it)? This can't be that hard.

View 6 Replies

Flex :: Crop Image Using A Non-rectangular Shape?

Oct 30, 2009

I've been following this tutorial to crop images in flex: [URL]

At the heart of its cropping is using a method called "copyPixels". However, this method takes as one of its arguments a rectangular shape for its crop region. Are there other strategies I can use to crop it not using a rectangle.

I am going after letting the user specify the region that should be cropped using a series of points.

View 1 Replies

ActionScript 3.0 :: Specify Rectangular Region Zoom Into Video

Jul 3, 2009

If it's possible to zoom into a video? For example specify a rectangular region in the video and zoom in.

View 1 Replies

ActionScript 3.0 :: Getting The Average Pixel Value Of The Rectangular Area Behind A Mc?

Nov 28, 2009

I have a vector movie-clip of a cat. Behind it, there is a picture of a park. The picture of the park takes up the entire stage, but the cat is only 32x16. How could I use BitmapData to sample all pixels (of everything, not just the park) within the cat's bounding box (but not including the cat itself in the samples (so like the cat is invisible); also 4 pixels wider in each direction, so it would effectively be 40x24) and then return the RGB average (in hexidecimal) so that I can set a masked transparent mc in front of the cat to that value?

Basically, so it looks like the color of the cat's surroundings affect its tint, to crudely simulate global illumination in 2d.

View 1 Replies

Actionscript 3 :: Find Where A Line Collides With A Rectangular Object?

Nov 9, 2011

I am developing a game with Flixel as a base, and part of what I need is a way to check for collisions along a line (a line from point A to point B, specifically). Best way to explain this is I have a laser beam shooting from one ship to another object (or to a point in space if nothing is overlapping the line). I want the line to reach only until it hits an object. How can I determine mathematically / programatically where along a line the line is running into an object?

I could try measuring the length of the line and checking points for collision until one does, but that seems like way too much overhead to do every frame when I'm sure there is a mathematical way to determine it.

Edit: Before checking an object for collision with the line itself, I would first eliminate any objects not within the line's bounding box - defined by the x of the left-most point, the y of the top-most point, the x of the right-most point, and the y of the bottom-most point. This will limit line-collision checks to a few objects.

Edit again: My question seems to still not be fully clear, sorry. Some of the solutions would probably work, but I'm looking for a simple, preferably mathematical solution. And when I say "rectangle" I mean one whose sides are locked to the x and y axis, not a rotatable rectangle. So a line is not a rectangle of width 0 unless it's at 90 or -90 degrees (assuming 0 degrees points to the right of the screen).

View 4 Replies

ActionScript 3.0 :: Resize A Rectangular MovieClip At Run-time Dynamically?

Sep 22, 2009

I am trying to resize a rectangular MovieClip at run-time (dynamically). But, the problem is that it changes the width in both directions (left and right) from its transformation point. The same is the case with its height.

I want the width of the clip increase from left to right or decrease from right to left only.

View 6 Replies

ActionScript 3.0 :: Create Rectangular Box Object Through Pure Action Script.?

Jun 23, 2009

How to create rectangular Box object through pure action script ?

I think, it can be done through the libary of movie clip but I am not sure. I want to take suggestion to create rectangular box through AS script

View 6 Replies

Flex :: Determine If A Series Of Points (or Polygon) Is Within A Rectangular Region?

May 20, 2011

I have been looking at posts about determining if a point lies within a polygon or not and the answers are either too vague, abstract, or complex for me. So I am going to try to ask my question specific to what I need to do.I have a set of points that describe a non-straight line (sometimes a closed polygon). I have a rectangular "view" region. I need to determine as efficiently as possible whether any of the line segments (or polygon borders) pass through the view region.

I can't simply test each point to see if it lies within the view region. It is possible for a segment to pass through the region without any point actually inside the region (ie the line is drawn across the region).Here is an example of what I want to determine (red means the function should return true for the set of points, blue means it should return false, example uses straight lines and rectangles because I am not an artist).

Another condition I want to be able to account for (though the method/function may be a separate one), is to determine not just whether a polygon's border passes through the rectangular region, but whether the region is entirely encompassed by the polygon. The nuance here is that in the situation first described above, if I am only concerned with drawing borders, the method should return false. But in the situation described here, if I need to fill the polygon region then I need the function to return true. I currently do not need to worry about testing "donut" shaped polygons

Here is an example illustrating the nuance (the red rectangle does not have a single vertex or border segment passing through the on-screen region, but it should still be considered on-screen):For the "does any line segment or polygon border pass through or lie on screen?" problem I know I can come up with a solution (albeit perhaps not an efficient one). Even though it is more verbose, the conditions are clear to me. But the second "is polygon region on screen?"PS I have a function for determining line intersection, but it seems like overkill to use it to compare each segment to each side of the on-screen region because the on-screen region is ALWAYS a plain [0, 0, width, height] rectangle.

View 2 Replies

ActionScript 2.0 :: Restrict A Draggable Object To A Non-rectangular Shape (like Triangle)

Jun 23, 2007

whats the best way to restrict a draggable object to a non-rectangular shape (like triangle) I did it with hittest but i cant get it to go to the nearest point when the cursor is outside the shape...

View 5 Replies

ActionScript 3.0 :: Crop Image But With Use Of Rectangle Class Or In Rectangular Shape

Apr 17, 2009

I am having some problems regarding image crop.I am able to crop an image but with the use of rectangle class or in rectangular shape.But i would like to crop in circular shape(for example go to URL...).

View 8 Replies

Actionscript 3 :: Calculating Column And Row Number In An Isometric Rectangular Shaped Grid

Jul 1, 2011

I'm trying to extend an isometric Flash game based on as3isolib. The game does only support diamond shaped grids but I have to implement the possibility to have rectangular shaped grids, too.

[Code]...

View 1 Replies

ActionScript 2.0 :: Creating Bitmap Tile Pattern In Non Rectangular Movie Clip?

May 5, 2010

Is it possible to create a bitmap tile pattern in the non rectangular movie clip using actionscript 2.0. If possible how can i do it.

View 0 Replies

Flash - Why MX Libraries Are In SWF

Nov 24, 2011

I have a pure AS3 project. I use Ant to build it. Here is a part of my ant script:
<target name="mxmlc">
<exec executable="${flex.home}/${mxmlc}" failonerror="true">
<arg line="-compiler.include-libraries=${lib}"/>
<arg line="-compiler.incremental=false"/>
<arg line="-compiler.optimize=true"/>
[Code] .....

The problem is that my resulting SWF is really big. When I checked what is inside I saw that it has mx.* libs from Flex. Why it is like this? How to kick mx.* from my SWF? In my code I don't use anything from mx.* library.

View 1 Replies

ActionScript 3.0 :: How Are Circular Preloaders Done

Oct 23, 2009

I was wondering how are circular preloaders done? Not just a preloader with a circular animation but actually a circle that grows with the progress.

View 3 Replies

ActionScript 2.0 :: Trying To Do A Circular Scroll?

Sep 9, 2004

I am trying to do a circular scroll. attached gif for a mockup. I am not sure how to go about

View 9 Replies

IDE :: Text Wrapping In Circular Way?

Sep 7, 2009

Is there any tool, plugin or extension that can help me in text wrapping on a circular path in Flash CS4.

View 1 Replies

Flex Equivalent Of GWT - RPC?

May 23, 2009

Right now a lot of my applications use GWT-RPC for retrieving POJO's from a GWT RemoteService which in turn calls a Web Service (SOAP) to get the data. I am evaluating Flex and didn't really see anything truly analogous to this simple architecture.

View 4 Replies

Import Libraries Of Other .fla Files?

Jan 10, 2011

I know it's possible to import libraries of other .fla files. but is it also possible to import them in such a way, that if you make changes to that .fla library, all the other .fla files that have imported that library will also have those changes?

View 1 Replies

Loading Assets From Different Libraries

Sep 8, 2009

I currently have a "container SWF player" that loads SWFs externally and plays them.The sound file for the SWF is in the library of the container SWF player, because the player is using the duration of the sound file to determine how long the scrubber bar goes.The problem is, it sort of defeats the purpose of having a container SWF player if I have to create a different container SWF player file for each external SWF because there's a different sound for each external SWF.Is there a way to pull the sound file from the library of the externally loaded SWF into the container SWF player?So that depending on what external SWF is playing, it will pull the associated MP3 file from that SWF's library?

View 1 Replies

ActionScript :: Can't Load Its Libraries

Jun 26, 2011

I have been searching google, Apache Docs*, and FlashPunk forums looking for an answer to this: I cannot get Ant/Flex to find and compile a folder of ActionScript libraries (FlashPunk).[code]....

View 4 Replies







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