ActionScript 2.0 :: Change Anchor Point Of Empty MovieClip?
Aug 1, 2009Is there any way to change the anchor point of an empty MovieClip that was created dynamically.
View 2 RepliesIs there any way to change the anchor point of an empty MovieClip that was created dynamically.
View 2 Repliesi'm a novice to ActionScript but from failed Google function searches, i think i've choosen an advanced i hope possible task: how to read then apply bezier, anchor point and handle positions to different anchor points. What i need to do is precisely align a rectangular closed bezier path with a randomly shaped closed bezier path, both with the same number of anchor points.
View 9 RepliesI know some basic trig. but how do i find an angle from an anchor point and a moving point?
adjecent = _root.anchor._x-_root._xmouse;
opposite = _root.anchor._y-_root._ymouse;
hypotenuse = ((adjacent ^ 2)+(opposite ^ 2)) ^ 0.5;
Is there a better way to have a symbol's anchor point default to the size of the stage? I'm having Huge problems because if two symbols are different sizes then I can't tell two objects to be in the same location.The workaround seems terrible. I have a guide layer for stage bounds. I'd have to duplicate that, add that to the objects that I'm going to want to convert to a symbol first, then remove it after it's converted. Is there anyway to automate any of that? That just seems like a terrible task to repeat over and over. I suppose one option is to have a blank symbol that is the correct size already, duplicate that in the library, rename it, put that on the stage, then put your objects in there. Wow, I'm not sure if that's better or worse!
View 1 RepliesFlash knows where the anchor point is in 3D space in order for the symbol to rotate around it, but I can't seem to figure out how to see the coordinates of the anchor point or type in new ones. Please tell me how to do this. I am already very annoyed that Lynda, a pay service, doesn't think this is vital information. Apparently they think we would never want to do anything more visually stimulating than one simple spinning logo! But I digress...
Just to be clear, I know how to move the anchor point visually on the stage, but I want accuracy. I want to be able to give two symbols the exact same coordinates to rotate around.
I have a dynamic image loading into a movie clip and i dynamically created a transform box around it. However the anchor point of that transform box is coming on the left top instead of in the center, which is not letting the image transform properly. how to dynamically put the anchor point to center through AS2?
View 1 RepliesThe following is a link to an online floor planner:[URL]..Does anyone know how to achieve the anchor point function? If you click on a "wall" it adds an anchor point.
View 0 RepliesI've been playing around with Flash's native 3D in pure AS3 (in FlashDevelop, not the Flash IDE) and am having a heck of a time finding documentation on how to set the 3D "anchor point". (Perhaps it goes by a different name?)
Can anyone tell me the API, Class, or command(s) needed to move the anchor for a given Sprite or Stage?
I'm trying to Resize a panel using a Resize Effect using its center as the anchor point. I've been googling for some information and the only thing I have found is to set the horizontalCenter and verticalCenter to 0, but this is not working for me. The panel keeps resizing from top/left corner.
View 1 RepliesI am generating sprites programatically like this:
this.food = new Sprite();
this.food.graphics.beginFill(0xFFFFFF);
this.food.graphics.drawRect(0, 0, 10, 10);
this.food.filters = [new GlowFilter(0xFF6699, .80, 5, 5, 2, 2, false, false)];
this.food.graphics.endFill();
[Code]...
I basically want the food sprite to spin slowly about its center, not its x and y value which is the top left corner of the sprite. How can I make the anchor the center of the sprite?
Here we have some great flash websites: [URL]
See how the URL is changing depending on how you are going inside the website sections? This is actually great because you can use the <BACK button of the browser in a flash app.
How can this, URL thing, be done? I hope the technique does not involve creating 8 different SWFs for the 8 sections of a site because that will not be actually a trick... It's defenitely something else looking at that "#" thing.
The website I am designing is a single-page site which scrolls using jquery to anchor points on the page (instead of having separate html pages for each section) The intro section has a flash banner which alternates images of different sections of the site. I have used the following code to get these images to link to the relevant page section
name_btn.onRelease = function() {
getURL("#anchorname");
};
This however just jumps to the named anchor point - I need to make this scroll to the anchor instead to keep it consistent with the rest of the site.
The website I am designing is a single-page site which scrolls using jquery to anchor points on the page (instead of having separate html pages for each section)The intro section has a flash banner which alternates images of different sections of the site. I have used the following code to get these images to link to the relevant page section
name_btn.onRelease = function() {
getURL("#anchorname");
};
This however just jumps to the named anchor point - I need to make this scroll to the anchor instead to keep it consistent with the rest of the site
I'm importing an external image, but by default the anchor point (coordinates 0,0) for the movieclip it loads into is the top left,this is obviously an issue if I want to rotate, as I need coordinates (0,0) to be the centre of the image, not the top left?
View 2 RepliesIs there a way to change the registration point of a movie clip after you've made the movie clip?
View 5 RepliesSay you draw a simple MC (a square for the mathematically challeneged):
Code:
with (path.createEmptyMovieClip("mask", 2)) {
beginFill(0x0000FF, 100);
moveTo(0, 0);
lineTo(100, 0);
lineTo(100, 100);
lineTo(0, 100);
lineTo(0, 0);
endFill();
}
The current focal point is in the top left corner, how could I change the focal point? Is this possible?
Is there any way, using Flash CS4, to change the vanishing point (ie projectionCenter) of a MovieClip? Or can Flash CS4 only adjust the stage's vanishing point? It seems that when I change it from inside a MovieClip it changes it on a global level, which is not what I want.
I've found I can use AS3 with PerspectiveProjection to change it at runtime, but I can't see the affect in Flash CS4 which makes doing the actual animation incredibly cumbersome.
Is there a way to extend only the bottom part of a dynamic Movieclip? I tried to change the height or to scale my mc but it always makes the change relativity to the center of the Movieclip. I guess I should define a registration point and change the height according to it but i'm not sure of how to do it
View 2 RepliesThe code below does the following - when you click on next it goes to step 2 which replaces step 1. This works but the problem I have is when I add the anchor like "2" on a flash button it goes to an empty page. What I want to know is how can I add this JS code into my Flash AS3 file so when I click on the flash button next it goes to step 2 instead of an empty page?
Code:
<script src="js/jquery.js" type="text/javascript"></script>
<script type="text/javascript">
function loadnext(divout,divin){[code].....
URLRequest thinks 2 is a new page but it should just go to the jQuery anchor "2".I have tried adding an anchor like <a name="2"> but for some reason it still couldn't find it..
I have a MC in an AS3 animation and I want to increase its height from bottom to top which would mean that the registration point should be bottom of the MC and center of width (horizontal center).
View 2 Repliesi have the follow issue :
I have a point which is setted at the border on a component, with changed transform point to the center of a component in order to match the component rotation.
the important part is when i try to get the point XY after rotation - they remains the same as before rotation.
how to get XY, after rotation ( changeing point.rotation property to specific degrees of rotaion )
I have an empty movie where I load some content (images), but i need the reference to be on bottom right of the content, while flash load the content with reference point at top left. I think that it is possible to change reference point with as2. Working with as2 and flash player ver. 9 on flash cs3.
View 3 RepliesIt's been a long time since I've done any work with actionscript, and alas I've forgotten nearly everything. I've tried to look for a tutorial that would explain basic animation with actionscript, but the one that I found on Kirupa was no longer there.
Basically I'd like to do this:On the stage I have a movieclip and I'd like the movieclip to move along the x-axis to a certain point and then back to the starting point again. The moving speed of the movieclip should also be adjustable.
know how I can resize the stage to match the size of an external graphic/movieclip which is loaded into an empty movieclip,
View 3 RepliesI am loading an external swf into an empty movie clip by use of a button.The movieclip is a sort of menu that begins with an animation of the menu opening, there are multiple different movieclips I am using with this format.What I am trying to accomplish is this.When another button is pressed, I want the movieclip (regardless of which one is loaded) to either:Go to a specific frame and play a closing animation within the movieclip, BEFORE a new movieclip is loaded. OR reverse the animation BEFORE loading new movieclip.Since there are 4 or 5 buttons all loading different clips, I need all the buttons to work this way regardless of which movieclip is loaded.
View 3 RepliesIn the documentation for DisplayObject, it states that the width and height of the DisplayObject can not be changed if it is empty. Why is this restriction necessary? In every other framework I have used, you can resize containers that are empty.
View 2 RepliesI have a horizontal scrolling movieclip that scrolls when the mouse is left or right of a certain point of that movieclip. However, it only moves slightly then stops when the cursor goes over it, it doesnt actually scroll normally...
[Code]...
i have 2 intersecting movieclips.
is there a way to hit test point NOT detecting a bottom movieclip if the mouse is over the top movieclip?
I tried "attaching" a custom context menu on the 'picture' movieclip (empty movieclip that holds externally loaded pics) but with no luck.
View 1 RepliesIs there any way to dynamically change the Transformation or registration point of a MC with AS3? I'm trying to dynamically create shadows behind clips that skew to follow the sun.
View 3 Replies