ActionScript 2.0 :: MovieClip Cannot Get Back To Coords It Was Before

Feb 25, 2005

If you check my site I'm trying to make [URL] and click one of my buttons the menu/logo/music/.. will move to the coords..

Here's the script I used:
1st frame:
speed = 5;
Frame in which the action will take place:
MovieClip.prototype.move = function() {
[Code] ....

But if you try to click for example on the "contact" button and after "about" button you can see that my music button (right side) is closer to the main border... so why the mc's coords are little off if you had clicked different button before (or if the mc's coords are different than before)? [note that I need to use Math.floor and Math.round to make it look sharp and that the speed value is for all MC's number 5]. Also my MC location is set up to hole pixels..

View 14 Replies


Similar Posts:


ActionScript 2.0 :: Back To Basics - Tracking Mouse Coords Into An Array

Mar 9, 2004

I've been reading through all the various threads related to the drawing API and saving drawings. About a hundred times I've seen mention of "log mouse positions into an array" and stuff like that, but I can't find any clear and simple examples of how to do this.

Let's take a very simple use of the drawing object to do freeform drawing. What is the AS to capture the mouse XYs as the user draws and put that into an array. I can't figure out how to get Flash to keep updating things as I go, it invariably grabs the fist point and that's it. Could one of you AS gods just write out a super simple routine for this? I know I'm not the only one that needs this (as it seems to be asked every week) Let's use the most basic drawing example I can find:

[Code]...

View 14 Replies

Get 3D Coords On Some Plane For 2D Mouse Coords In Flash With Away3D?

Aug 1, 2011

Waht is the right way to get 3D coords from 2D mouse coords using Away3D. (version 3.6.0) It's ambigoius problem in general, so there is restriction that 3D point belongs to some fixed plane.

There are some examples with camera.unproject and plane.getIntersectionLineNumbers methods, but they don't work if camera is rotated or plane is not trivial.

View 1 Replies

Actionscript 3 :: Move Movieclip Position Opposite Of Mouse Coords On Other Movieclip

Jan 26, 2011

Okay I have a script in which I have added an image to the stage. It is absolute centered. I then have another with is on top but much bigger. I would like the big image to move opposite of my mouse position on the smaller image. ie: cursor is on bottom left corner the bottom left corner of the larger image is in the same spot. And the same thing for any other area.

I have tried many different ways but to no avail. I have done research but no one has been able to give me a solid answer. Anyone know of a way to accomplish this. Keep in mind this it needs to work regardless of the image size.

View 1 Replies

Flash :: Reset 3d Movieclip Back To 2d Movieclip

Aug 29, 2011

I used the 3d transform tool to rotate and move an mc in 3d.How do i make it to behave as a 2d movie again... Reset doesn't work... it only resets all to 0 but it's still 3d.The only way I found was to delete it and drag it back from the library but is there a more common solution?

View 1 Replies

ActionScript 2.0 :: MC Gets Deleted Before It Can Hit The Last Coords

Mar 8, 2005

I'm trying to save some CPU resorces here but donno how.. my MC script is deleted before it can reach the current point.. what should I do?..

[Code].....

View 3 Replies

ActionScript 2.0 :: MC Gets Deleted Before It Can Hit The Last Coords?

Mar 8, 2005

I'm trying to save some CPU resorces here but donno how.. my MC script is deleted before it can reach the current point.. what should I do?..

MovieClip.prototype.moveIt = function() {
this.onEnterFrame = function() {
menu._x = Math.round(border._x - ((border._width/2) + 68))+5;

[code].....

View 3 Replies

Determine The X/y Coords Of A Spot On The Stage?

Jun 23, 2009

Is there any way for me to move the mouse to a spot on the stage and determine what the x/y coords are? It's really hard writing some action script and just continually guessing what x/y coord i want until i get it close enough.

View 1 Replies

ActionScript 2.0 :: Mc To Zoom To Mouse X&y Coords

Jul 12, 2007

I have an mc that when I press a key it will either zoom in or out. Right now it zooms in/out, but it does with with the up-left corner as the point to zoom from. Can anyone direct me on how to zoom in/out where ever the mouse is relative to the mc? If the mouse is in the middle, then it zooms from the middle and so on.

View 5 Replies

Actionscript :: Strange Coords After RemoveChild Is Called

Jan 24, 2010

I create a few squared sprites and then remove the first one and display the coords.[code] The x coordinate is still 0, though width has changed,getBounds shows correct values.I would expect x to change as well.Because of the wrong value of x, globalToLocal and localToGlobal work incorrectly.If you click somewhere on the left side of the second (still visible) rectangle you get: 2 28 (x=2, y=28)which is good for nothing. The values in brackets should be in stage coords and they are not.[code]

View 1 Replies

Actionscript 3 :: Express Difference Between Two Xy Coords As A Number Between 0 And 1?

Nov 8, 2010

I've created a movieclip spawner class and animator class which animate movieclips along a set of x,y points.I've used Greensock's TweenMax to accomplish the animation and I have set the speed to be 1 second between each point. The issue is that when the distance between two points is small it looks too slow.

What I would like to do is somehow calculate the distance between the two points and output a speed in the range of 0 to 1 seconds so that the speed is to be correct for the shorter distances as well as the longer distances.

View 3 Replies

ActionScript 2.0 :: Locking Y Coords On Dynamic Scroller?

Feb 26, 2010

I have an image gallery that loads images/text through xml, but I'm having an issue with the scolling, I need to lock the ymouse coords right now it scrolls only on the xmouse, basically I need it to work in the scrolling area only, say 400width by 200height..

[Code]...

View 0 Replies

ActionScript 2.0 :: Tell The Target To Goto The Tellers Coords?

Jun 18, 2004

How do I tell the target to goto the tellers coords?

Code:
tellTarget("/Flame_" + (_global.numFlame-1) +"_mc"){
this._x = 100;
this._y = 100;
}

This is what I have and it tells the Fluid (the place where the above code is) to go to 100,100. that was kind of jumbled but I think I got it all in..

View 5 Replies

Flash :: Professional - CS5 - Position X / Y Coords Change By Themselves After Typing

Sep 20, 2010

I've been working in CS5, with an older FLA I originally built in CS3. On the timeline, I have different MCs and button symbols which need to stay in the same coordinate position. Usually if I notice some sort of 'wiggle', I will go and check the position coords by hand, updating the x/y position by typing numbers directly in the Properties panel.

However today, I repeatedly saw the coordinates change -by themselves- after I typed and hit Enter. For example, typing '165' in the Y field changed immediately to '164.95'. With one symbol, this behavior continued, no matter what I typed, with the number changing by 10 pixels sometimes, every time I just selected the symbol. Not only was I not able to keep the symbols at the same coords (I tried making  them all 164.95), the 'automatic decimal' numbers would actually change further, as I was trying to correct them. I was only able to resolve this by creating an entirely new MC symbol in the Library, and placing it on a new timeline layer.

I've noticed this sort of behavior before in CS3 and CS4 (the CS4 Alpha slider never wanting to go to 0 or 100%), but never to this extent, or as consistently. It's gone from an annoyance to a genuine problem in my workflow.

View 1 Replies

ActionScript 2.0 :: X And Y Coords Of A Movie Clip Declared In A Variable?

Nov 25, 2004

How come this PHP Code:

function drop (thumbClip, xCoord, yCoord) {
thumbClip._x = xCoord;
thumbClip._y = yCoord;
trace (thumbClip);
trace (xCoord);
trace(yCoord);


receives the variables (specified in a later function) and traces them all right, but refuses to deposit the variable thumbClip in the x and y coordinates being specified?

I replaced thumbClip with a specific movie clip, and the fucntion worked perfectly. Does this mean Flash cannot use variables to set the x and y coords to?

View 3 Replies

ActionScript 2.0 :: X And Y Coords Of A Movie Clip Declared In A Variable

Nov 25, 2004

How come this:

PHP Code:

function drop (thumbClip, xCoord, yCoord) {
thumbClip._x = xCoord;
thumbClip._y = yCoord;

[Code].....

receives the variables (specified in a later function) and traces them all right, but refuses to deposit the variable thumbClip in the x and y coordinates being specified?

I replaced thumbClip with a specific movie clip, and the fucntion worked perfectly. Does this mean Flash cannot use variables to set the x and y coords to?

View 3 Replies

Flex :: Converting Ordanance Survey Coordinates Into Valid Esri Coords

Sep 4, 2011

I've been searching extensively for a way of converting from ordanance survey coords to valid esri coordinates. I've found quite a few pages that convert to lat long (if a little off) but nothing to convert to esri (which I believe is utm.)This is for use in python or JavaScript / actionscript etc - I'm not too worried about syntax more an understanding of the maths involved.

View 2 Replies

Professional :: Movieclip Goes Back To Frame 1?

Aug 25, 2011

I have created an interactivity to simulate a product.  To do this my project has multiple frames.   Each frame contains an individual movie clip. The clips each contain buttons that change the display and go to and stop on specific frames based on which button was pressed.  My problem is, after the interaction a movie clip  may have been stopped on say  frame 12, the next time the frame containing the movieclip is opened on the main timeline I need the movieclip to open on frame 12 .  However, the movie clip opens back up at frame 1 each time not saving the interaction.

View 10 Replies

ActionScript 2.0 :: Send To Back A Movieclip?

Jun 28, 2010

i have searched on the web and i haven't found anything that works.

How can i send to back a movieclip by actionscript?

View 2 Replies

ActionScript 2.0 :: MovieClip Within Another One And Back To Thumbnail

Oct 11, 2011

The scenario (photo gallery): I have the stage. Then I have a movie clip with thumbnails on it. Click a thumbnail and it opens another movie clip that I have attempted to make look like a modal window-drk grey transparent, you can see through to the thumbnails it is sitting over, and the large pic appears on this. So click thumb, and go into movie clip with the rectangle background and large pic. User can scroll through large pics, and then click button on right that will "close" back to the thumbnails movie clip. The "close" button isn't working with or without the actionscript I have tried so far. And I don't know the correct actionscript that would close this movie clip back to the thumbnail movie clip.

View 7 Replies

ActionScript 2.0 :: Can't Send Movieclip To Back?

Aug 22, 2005

I've got some movieclips where everytime when you click on one, that movieclip has to be send to the back.Most logic solution is MovieClip.swapDepth(1), so you swap with the movie wich is at the lowest depth, but for one reason or another, this results in the movieclip jumping to the front.An examplefile is in attachment.this is my script:

mc1.onRelease = function() {
mc1.swapDepths(1);
};[code].....

View 7 Replies

ActionScript 2.0 :: Back Stepping A Movieclip

Dec 13, 2005

I have this code on a button that exist witin the movie clip that i want the action to take place.

onClipEvent (data) {
_root.goin.gotoAndPlay(12);
}

if I use (_root.this) it does not work either. how do I back track the function? like ../ or .. in a file directory?

View 4 Replies

Flash :: Calculate The X & Y Coords - Width And Height Of Specific Piece Of Text Inside A PDF Document

Oct 28, 2010

On my website, I display uploaded PDF files in a flash player for my users to read. I already use various tools to extract the text and produce a serious of high quality images from the file and the system works well. The last piece of the puzzle is to be able to highlight specific parts of the document to help users with accessibility issues.

However I cannot figure out how to calculate where the specific text is positioned on the page? Notes: The documents uploaded to the system are from 3rd parties, so fonts may be embedded. Meaning that I cannot be sure of the width of specific letters. The text to be highlighted may not be unique, the same text may be repeated How can I calculate the coordinates, height and width of a specific piece of text on a PDF, so that I can then draw a box around it?

View 1 Replies

ActionScript 2.0 :: Tween - Make A Button Trigger A Movie Clip That Targets Specific Coords?

Feb 22, 2005

how do i make a button trigger a movie clip that targets specific coords? I'm building a map and when a button is click it goes to a defined point. right now it jumps to the coords, but i'd much rather it smoothly move instead. the other thing is that i would like it to move from whatever point it is currently at.

View 11 Replies

Shortcut For Getting One Step Back Inside A MovieClip?

Aug 9, 2011

What is the shortcut for going ONE step back, when being inside a MovieClip. I get inside the MovieClip using "Edit in place" (CMD+Alt+E), but HOW DO I GET OUT using a shortcut?(In the old days i could just use the 'edit in place' shortcut again without having anything selected, but since CS4 or 5 upgrade, that option is gone.)

View 4 Replies

ActionScript 2.0 :: Create Movieclip At The Back Of A Layer?

Mar 22, 2012

I wanted to create a rain movieclip with the actionscript below, but i wanted the rain to appear at the back of a layer. How do i change the script?

//Creating an empty movieclip to attach the clip from library
_root.spring_mc.rain_mc.createEmptyMovieClip("hold er",this.getNextHighestDepth(0));
//settig variables

[code]......

View 1 Replies

Flex :: Rotating Movieclip Back To Square?

Jul 20, 2010

I have a movieclip that I am using greensocks transformManager with so the user can rotate, skew, and scale the clip. This works fine, but I am trying to add a crop tool. If the image is rotated, when I send the image to the crop tool it measures the height of the image by the bounds of the rotated image, not the actual height of the image if it were square (re: not rotated).

So, what I tried to do what, after sending it to the crop tool, rotate it back to 0 before getting the bounds using this code:

[Code]....

I don't understand the math here. Shouldn't it just rotate 3rads in the positive direction to equal it out? How would I return it to 0;

View 1 Replies

Professional :: Button That Goes Back To Main Timeline From Movieclip

Feb 11, 2010

I have a movie created that is broken down into sections on the timeline (home about contact etc) Each section has a movieclip I want to be able to be in the about movieclip and click a button that will bring you back to the main timeline contact section Heres is the actionscript I am using to navigate the main timeline for each section
stop();

//handle events for buttons...
index.addEventListener(MouseEvent.CLICK, clickSection);
about.addEventListener(MouseEvent.CLICK, clickSection);
wind.addEventListener(MouseEvent.CLICK, clickSection);

[Code].....

View 1 Replies

ActionScript 1/2 :: Button Within Movieclip Won't Go Back To Main Timeline

Dec 1, 2010

I have a btn within a Movieclip at a certain keyframe the user is asked if they want to go back to make another selection from a choice category (within the maintimeline)
 
As of now the code I have for the btn that jumps you back to the main timeline is:
 
on (press) {    gotoAndStop(_root.stop(24));}
  
Does _root.stop(24) need to be in quotes?
 
ie. "_root.stop(24)"

View 1 Replies

Professional :: Create New MovieClip With Front And Back Images?

Apr 4, 2011

how to create a two-sided movieclip and load a different image on each side.

View 1 Replies







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