ActionScript 3.0 :: Get Top_left Of Shape?
Aug 15, 2010
I am trying to get the position of the top left corner of a shape. It is a shape of variable size and position, so the x and y won't necessarily be the top left corner. Is it possible to find the top left position of a shape if say the registration point is at the center?
View 1 Replies
Similar Posts:
Jun 28, 2010
Full-screen flash site has stagAlign.TOP_LEFT, works fine, yet when I add a new MC to the center of the stage and resize it (TweenMax scaleX, scaleY) it hits the top and left corner and is pushed from that point. How do I go about allowing the new MC to extend the stage align. Resize MC with disregard for the stage's top left corner. I can center and resize the new MC fine but it will always hit the top left, and I would like it to extend the visible stage.
View 1 Replies
Nov 30, 2009
ActionScript Code:
package {
import flash.display.MovieClip;
public class Base extends MovieClip {
public var baseHP:int = 50;
var newRect:Shape = new Shape();
1046: Type was not found or was not a compile-time constant: Shape. 1180: Call to a possibly undefined method Shape. What does it mean by "undefined method"? I am somewhat of a newby, so sorry if there are any stupid errors
View 1 Replies
Jun 22, 2010
Whenever I add shape hints to a shape tween the shape disappears in the between frames. I am using CS5 on Vista. I using files from [URL]to practice.
View 2 Replies
Oct 11, 2011
need to draw the shape of a existing movieclip which is irregular shape.
View 2 Replies
Oct 11, 2011
need to draw the shape of a existing movieclip which is irregular shape.
View 1 Replies
Jul 9, 2009
Id like to know if there is a way to do a shape hitTest.Not as the normal hitTest would do, but shape colliding another shape, not the rectangleof a movieclip.It can be in a movieclip.
View 23 Replies
Oct 19, 2010
using the shape tool you can draw basic shapesthen using the subselection tool you can re-shape them by relocating certain points
What i want to do is create a tween whereby one of the points is movedthe problem is you have to convert to a symbol first and after you have done that you cant change the shapes shape.so how do i go about using a motion tween to change the shape of a shape?
View 1 Replies
Mar 12, 2004
It has me perplexed. Okay, when you draw a shape in Flash, let's say a circle, it draws a 'fill' and adds an 'outline' automatically. Now let's say I deleted the 'outline' part of it, and am left with just the 'fill'. Is there a way to add the 'outline' part back to the shape afterwards? I have a non-standard shape that I need to add an outline to, but can't seem to figure out how to do it
View 2 Replies
May 4, 2009
when you draw a shape in Flash, let's say a circle, it draws a 'fill' and adds an 'outline' automatically. Now let's say I deleted the 'outline' part of it, and am left with just the 'fill'. Is there a way to add the 'outline' part back to the shape afterwards? I have a non-standard shape that I need to add an outline to, but can't seem to figure out how to do it...
View 4 Replies
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
Jun 30, 2010
I've a circle that I want to attach an image to. The trouble is I want to centre it right where I want on the shape. When I select type=bitmap and import the gif though it is 'wallpapered' over shape automatically like a pattern and obviously this doesn't line up with the image properly. How do I get the shape and image to align (both shape and image are identical in size) in cs3?
View 2 Replies
Aug 27, 2010
So I like the whole convert stroke to fill option in the Modify menu, but what if I want to apply a stroke to a fill?
In other words, if I created a circle, then delete the stroke, is there any way to the regenerate the stroke? I mean, if I press A I can see the contours of the fill - can I just turn that into a stroke? In the properties menu, if I click on stroke (which as its colour has the white box with a red diagonal line) it's all greyed out. Am I missing something obvious?
View 2 Replies
Jun 21, 2009
I'm trying to add a rectangle to the stage.I've imported the following.[code]
View 1 Replies
Feb 17, 2010
I am trying to follow the exercises in the "Classroom In A Book" for Flash CS4 and I am having problems already on exercise 2. the problem is that I can not close the shape, whilst using the pen tool and anchor points. I have tried to make the anchor points extend further than the stage and then clicking on the first anchor point as the book suggests, however, a new line is drawn through the stage, to the first and last anchor point. The problem is I can not add the fill colour.
View 1 Replies
Sep 4, 2010
I was wondering if there is anyway to shape tween two primitive shapes using actionscript. The shapes will be drawn using AS3 and then i need to tween them. no timeline should be involved.
View 1 Replies
Jul 30, 2010
I am completely in the woods here - i have a sprite with a shape drawn in there (there are two different sprites in the example.) At any given point, I need to get the x and y value of the topmost point of the shape. The sprite does rotate so it's going to change at any point as well. I don't even know where to begin here
View 2 Replies
Dec 5, 2010
I have a filled Shape, and a BitmapData that is the same width and height as the Shape's bounding box. I need to cut the Shape from the BitmapData (basically draw the BitmapData onto the shape...) [URL]I use the rather hackish method of:
public static function cutPoly(img:BitmapData, s:Shape, bounds:Bounds):BitmapData {
var temp:BitmapData = new BitmapData(bounds.width, bounds.height, true);
Main.inst.stageQuality("low"); //hack to kill anti-aliasing
[code]....
View 4 Replies
Aug 3, 2011
I can import FXG files as Sprites as follows[code]...
I don't always need the fancy things that come with Sprites. How can I import them to Shapes?
View 1 Replies
Jun 21, 2009
I'm trying to add a rectangle to the stage.
I've imported the following.[code]...
View 2 Replies
Jul 3, 2009
I have found many posts on how to draw shapes using the drawing API. However, I'm trying to figure out if it is possible to get the coordinates of points along an exisiting path on the stage and then tween these points to new random coordinates (distort the path).
View 5 Replies
Apr 28, 2003
how to shape tween with actionscript.
View 9 Replies
Feb 25, 2009
If I have a circle shape, or any else shape, what I should do to make a nice simple outline to that shape. Is there any way to make this simple. I tried to make this with the pen tool, bun it wasn't very precise. I want to use something else.
View 1 Replies
May 10, 2009
I'm trying to create a shape tween to take a line from a point to another point. I can get it to work if I leave the line short but if I try to take it to a point the shape tween doesn't work.
View 1 Replies
Jul 9, 2009
I'd like to know if there's a way to do a shape hitTest.Not as the normal hitTest would do, but shape colliding another shape, not the rectangle
of a movieclip.This shape can be in a movieclip, of course ).If there's this way, please make it in a way that our processors would thank you.
View 1 Replies
Aug 9, 2009
I am trying to shape tween from a simple vector object to a number of complex vector objects, but the same problem occurs when trying to go from one simple object to two.
Instead of slowly/smoothly splitting the initial object into two, it just copies them and they move apart from each until reaching the final two object forms. As if this wasn't bad enough, they are also connected by a random straight line. Ugly.
I guess I can understand why this happens, but is there no way to tell it to make the transition in another way? Shape hints tend to make the problem even worse.
View 2 Replies
Mar 22, 2010
I have a diagram with three buttons that when clicked, draws a line from that button to the corresponding movieclip on the stage. All this works fine but I'd like to build in a toggle button so I can turn each line off in any order. I'm having trouble understanding how to reference each shape that's been draw on the stage so I can remove it
Code:
var btnArray:Array = new Array(btn1, btn2, btn3);
var spotArray:Array = new Array(hotspot1, hotspot2, hotspot3);
[code].....
View 2 Replies
Sep 29, 2009
I've made a functions which creates rectangles:
function makeSquare(sgu:String,clo:uint):void {
var squ:Sprite = new Sprite();
addChild(squ);
[code]....
Now my problem is; that i'm from another function would like to make a call, that deletes a specific rectangle previously generated by the above function.
View 9 Replies
Jan 5, 2010
Is there any way to get the positions of points in a shape on stage at runtime? for instance a triangle, is there any way to get the positions of the 3 points that make the triangle?
View 2 Replies
Feb 25, 2010
I have a button with a menu, that unfolds on mouseover.How can I change the shape of the button via ActionScript,that the button as soon as the menu unfolds also covers the menu,but only covers the button itself as soon as the menu disappears again?
View 5 Replies