ActionScript 3.0 :: Get Movie Clip To Save Coordinates?

Nov 28, 2009

what i am trying to do is create a game that works on the same bases as battle ships but the difference is that its just at a single grid size scale so basically you only have to hit 5 squares in the 8x8 square grid. The trouble i am having is that i have set it up as a movieclip and i cant seem to get it to same the positions on the side that i select on (named the players side) it works fine for the otherside and will hit the 'enemy squares' and you can win the game but never loose the game that the problem.

View 0 Replies


Similar Posts:


ActionScript 2.0 :: Get A Movie Clip To Slowly Move To The Coordinates Of Another Existing Movie Clip

Oct 23, 2010

it seems simple enough but i have no idea on how i could get a movie clip to slowly move to the coordinates of another existing movie clip

View 5 Replies

ActionScript 2.0 :: Find The X-y Coordinates Of The Attached Movie Clip Within The Created Movie Clip?

Mar 26, 2006

Q1) The registration point of a created clip is top left - my question is how can I dynamically change it's registration point - say to center center?

(I am trying to attach a movie clip to a created clip and I wanted it to be centered inside the container - a related sub-question, how can I find the x-y coordinates of the attached movie clip within the created movie clip?)

Q2)When I tried to create two different movie clips, I found I had to create them at different depths, else the first would load and the second would not. Why would that be so? I'm on MX 2004 Pro.

View 4 Replies

ActionScript 2.0 :: Save/Load Flash Based On X Y Coordinates Of Movie Clips?

Mar 12, 2010

I am developing a tool for analysis where you drag specific events onto a special wheel to analyze events based on time of day etc. I had a few users testing it and they asked for a save and load feature. I have done as much as I can at this point and am just growing confused. Can one of you experts take a look at my .fla and see what can be done...I think I am close but just can't figure it out. Also, if you can provide comments on cleaning up my code would be nice too.

View 4 Replies

Actionscript 3 :: Fitting Movie Clip To 4 Coordinates?

Apr 4, 2012

i've got 4 coodinates an need to fit a fit movie clip to them, so each corner of the movieclips is on one coordinate.The only thing i could find it tranforming it with a matrix and angles (see example), but these cant be the best solution for my problem to calculate all the angles etc.

var degX:Number = 0;
var degY:Number = 0.3;
//Get the transform matrix for the object to skew
var m:Matrix = bild.transform.matrix;

[code]....

View 1 Replies

ActionScript 2.0 :: Drawing Lines In Movie Clip And Coordinates?

Apr 20, 2004

I am drawing a set of connected lines in a MC that is created using createEmptyMovieClip. The lines start at (0,0) within the MC and move into the negative x values when the lines move left. The problem I am having is when repositioning the MC. When I tell the MC to move to _x=0 and _y=0, it doesn't move to the stage's (0,0), it still hangs off the left side of the stage. The following image shows the MC positioned to (0,0) (note: the green is the stage):shouldn't the MC containing the drawn lines use its left-most point when being repositioned so that it doesn't hang off the left side of the stage?

View 5 Replies

ActionScript 2.0 :: Get The Movie Clip To Be Attached Once In The Designated X,y Coordinates?

Jan 2, 2010

Basically its an onPress event handler on a movie clip that attaches another movie to it when pressed.The problem is, I only want the movie clip to be attached once in the designated x,y coordinates, no matter how many times the main object is pressed. I'm essentially trying to write my own FreeTransform script, that allows users to resize the object.

Below is the my source code:

ActionScript Code:
chair_mc.onPress = function() {
var bounds:Object = chair_mc.getBounds(this);
//

[code]...

View 5 Replies

ActionScript 2.0 :: Attaching MovieClip And Assigning It Coordinates Of Another Movie Clip

Sep 16, 2010

I'm making a game where an airplane loads using attachMovie, with a randomly assigned y coordinate and a constant x. The airplane then moves across the screen. You hit another button, and a parachutist is loaded using attachMovie, with the coordinates being set equal to the current coordinates of the airplane. The parachutist loads but he doesn't load to the coordinates of the airplane. If I feed the parachutist numerical coordinates, he loads to those coordinates, but for some reason Flash seems to be completely ignoring my attempts to feed the plane's coordinates to the parachutist. Here's the relevant code, which is of course nested in an onEnterFrame function:

if (Key.isDown(Key.DELETEKEY)){
if (jumped == false){
attachMovie("jumperWhole", "jumper", 0);

[Code].....

As I've said, the jumper loads, he just loads in the upper corner of the game, as if the plane's coordinates are ignored and Flash attaches jumper to the default coordinates of the program. If I try to attach the jumper to the using the coordinates of something that's not in motion, it works, so I'm wondering if this has something to do with the motion of the plane.

View 1 Replies

ActionScript 3.0 :: Determine Absolute (stage) Coordinates Of A Movie Clip

Apr 1, 2011

Is there a method to determine the stage coordinates of a movie clip?

I don't mean something like this:
stageX = mc.x + mc.parent.x + mc.parent.parent.x + ....

I would like to be able to determine the movie clip stage coordinates without knowing what are its parents and grandparents etc. The goal is to be able to place the movie clip on exact place on a stage, no matter what is the nesting structure.

View 1 Replies

ActionScript 2.0 :: Changing Behavior Based On Y, X Coordinates Over A Movie Clip With OnMouseMove

Sep 22, 2009

I was thinking that it will be an easy task but something is not right. Here is what I am trying to do. I want to be able to run a function if the mouse is moved over certain areas of the movie clip on stage. Based on which area of the movie clip the mouse is moved I'd like to be able to trigger different behaviour. Below is the code which I was thinking shoud do it:

Code:
var posY:Number;
var mouseListener:Object = new Object();
mouseListener.onMouseMove = function() {

[Code].....

For some reason, the trace statement is ran always when the mouse moves regardless if it is over the movie clip or not. It also only shows the first trace statement. It is never chaged even if the mouse is in the different areas of the movie clip.

View 5 Replies

ActionScript 2.0 :: Changing Behavior Based On Y, X Coordinates Over A Movie Clip With OnMouseMove?

Sep 23, 2009

I was thinking that it will be an easy task but something is not right. Here is what I am trying to do. I want to be able to run a function if the mouse is moved over certain areas of the movie clip on stage. Based on which area of the movie clip the mouse is moved I'd like to be able to trigger different behaviour. Below is the code which I was thinking shoud do it:

ActionScript Code:
var posY:Number;
var mouseListener:Object = new Object();

[code]......

View 0 Replies

ActionScript 2.0 :: Save A Movie(whole Or Particular Movie Clip) As A Image Formate?

Apr 27, 2007

Is it possible to save a movie(whole or particular movie clip) as a image formate(.jpg or some other) by clicking a button which is available in the same movie, at a "Runtime" through "Flash 8 Actionscript 2".

if it is possible, please explain me how to do.

View 2 Replies

ActionScript 2.0 :: Save A Movie Clip As A Jpg?

Jul 18, 2007

Is it possible to save a movie clip as a jpg. If so how?

I know that the MC can be printed but can it be saved or automatically attached to a flash contact form...

View 7 Replies

ActionScript 3.0 :: Flash To 'Print' And 'Save' Movie Clip?

Oct 20, 2009

I have Flash file that will reside on a CD or thumb drive. I have a requirement to add a 'Print' and 'Save' button.The 'Print' button should only print the content in the movie clip and the 'Save' should prompt the user to save a file (PDF would be ideal) to their computer.Since the file is on a CD or thumb drive I don't have access to server side scripts etc...

View 0 Replies

ActionScript 3.0 :: Save A Movie Clip As A Bitmap On Harddrive In AIR?

Nov 10, 2009

How one would go about saving a bitmap image of movie clips to the hard drive?

View 3 Replies

AS3 :: Flash - Save XY Coordinates?

Jul 21, 2010

I have a widget that looks like an equalizer, the scrubbing on the slider is working. When I relaunch the swf file everything resets.

What can I do to save the setting.

View 1 Replies

ActionScript 3.0 :: Save The Mouse Coordinates Upon MouseClick?

May 20, 2011

I am making a game where when I click a movie clip on stage and the man will walk to that area. The man only moves one space when click, so it works if you continualy click the mouse. I just want to click the mouse 1 time and the character walks to that spot. Here is my code,

clickObject.addEventListener(MouseEvent.MOUSE_DOWN ,record_Mouse);
function record_Mouse(event:MouseEvent):void {
var record_MouseX:Number= mouseX;[code]........

/*I tried a loop for these last two lines, but it did not work, maybe I am doing it wrong, or maybe there is another solution? I also tried to return the value of man.x and man.y into a ENTER_FRAME event which does not seem possible with AS3*/

man.x+=vx;
man.y+=vy;
}

View 2 Replies

ActionScript 2.0 :: Having Clip Appear At Specific X,y Coordinates?

Jul 16, 2007

I have a sinlge movie clip that I need to have appear at specific x,y coordinates during the course of the entire movie. I could do this the hard way with the timeline but I was wondering if there was an action script methid of doing this.

View 3 Replies

ActionScript 1/2 :: Targeting A Movie Clip Inside A Movie Clip Inside Another Movie Clip With A Twist?

May 9, 2010

Im able to link to a movieclip inside a movieclipUnfortunately one of the movieclips now are a scrollbar and scroll. Now the actionscript isnt working?cal.onPress = function() {gotoAndPlay(2);message1.contentMain.message.total = unit1;

View 17 Replies

ActionScript 3.0 :: Flash - Movie Clip To Play Unless The Person's Mouse Curser Is On The Movie Clip For More Than A Second

Jun 24, 2010

I am pretty new to ActionScript 3 and Flash. I don't want my movie clip to play unless the person's mouse curser is on the movie clip for more than a second. If the person just runs their curser over the movie clips really quickly, then it should do nothing. It must be more than a second. How do I code that?

[Code]...

View 17 Replies

ActionScript 2.0 :: DropTest - Check And See If The Dragged Movie Clip Is Completely Within The Bounds Of Another Movie Clip

Jan 11, 2010

I'm creating a small drag & drop activity, and I want to be able to check and see if the dragged movie clip is completely within the bounds of another movie clip (or at least in the bounds of a certain x/y zone on the main stage. I can't use dropTest because it returns true if any tiny bit of the movie clip overlaps with the dropTest movie clip.

I also thought of something that just checks the x/y coordinates of the dragged movie clip, but I'd need this to reflect a range of values rather than one coordinate. For instance, I'd want to return true if the movie clip's x is between 50-60 AND the y is between 50-60. I'm attaching a small graphic to illustrate in case my explanation isn't clear enough [URL]

View 3 Replies

ActionScript 2.0 :: On Button Release Clear Current Movie Clip And Bring In New Movie Clip

Feb 21, 2010

I have created a flash website, each button is a movie clip with an invisible button over it containing the following script

on (rollOver) {
_root.mouse_over_profile_btn = true;
}
on (rollOut) {

[Code]....

each page is also a movie clip and on release of a button its played. the problem is that when i press another button to play another movie clip 'page' the old content is still there.

Is there a way of reversing the page transition i have used to bring out the movie clip and then bring in the next movie clip.

View 0 Replies

ActionScript 2.0 :: Collision Detection - Goto A Certain Scence When A Movie Clip Collides With Another Movie Clip

Jun 22, 2005

i am making a pacman game, and i need to know how to make it go to a certain scence when a movie clip collides with another movie clip.

View 2 Replies

ActionScript 3.0 :: MCs Classes - Can't Send An Event From The Eagle Movie Clip Or The T2D Movie Clip To Tell The Other To Fade Out

Nov 5, 2010

There is a bad gap in my knowledge with Event Dispatch and Event architecture, and this problem proves it. I've been getting nowhere on this problem for two days, I've posted everything to my Flash site. Go here, please: [URL] Click on "Flash Banners" The two thumbnails represent two different classes. Each class is identical. Both are "extends Movie Clip" classes. Tweeners of various types control the hover and click methods. URL Loaders load the thumnails which I then wrap in MC's and make them buttonMode = true, etc. Hover and click to load the Banners on the thumbnails.

I can't send an event from the Eagle movie clip or the T2D movie clip to tell the other to fade out. Both Banner classes are instantiated through a separate Base class. I'm sure this has to be an Event Dispatch from one MC to another and that it can't be done by the Base class. how I can send an Event or Event Dispatch and what the code structure is so one movie clip can in one class can tell the other movie clip in the other class to disappear while it's neighbour is playing. I'm happy to post code or explain / clarify anything that's not clear.

View 1 Replies

ActionScript 3.0 :: Movie Clip On Main Timeline Receiving Input From Nested Movie Clip

Feb 23, 2011

I've got a main timeline .swf file called "blank.swf" which contains nothing but two blank movie clips one called called "pproduct", the other called "ppalette". In the script frame of this main timeline I use the simple "Loader = new Loader();" method to load a URL of an .swf file into the "ppalette" movie clip. The "ppalette" movie clip contains several color chip buttons, each of which use the same Loader method above to load an external .swf into a clip. Here's what I want to do: let those color chip buttons, when the "blank.swf" file loads, be used to load an .swf movie into the "pproduct" clip on the main timeline. I'm wanting to be able to swap depths with various movie clips which will take out the movie which has the palette, but I want whatever that palette has loaded in the original "pproduct" clip to stay there.

[Code]...

View 3 Replies

Actionscript 3 :: Convert Global Coordinates To Local Coordinates Of A UIComplenent In Flex Project?

Dec 19, 2011

I was trying to convert global coordinates to local coordinates of a UIComplenent in my flex project using below code using below code

var gp:Point = new Point(e.stageX,e.stageY); //global point
var lp:Point = uic.globalToLocal(gp); //local point

uic is UIComponent in which I have subclass of Sprite for drawing something I have set the sprite's mouseEnabled and mouseChildren to false to not interrupt the mouse event. above code is within uic's mousemove event where I was tracing the gp and lp gp was giving correct value and suprisingly lp was giving negetive values. when I move the move to the top left corner of uic i expect lp to be 0,0 but it is giving the -width of of uic. I broke my head for hours and ended up finding an alternate by using offsets. Infact my original code was much simpler like this which was same issue

var lp:Point = new Point(e.localX,e.localY);

I am not sure what exactly is causing this problem. the workaround had lot of issues and it creating a mess in my rest of the algorithms.Just now I found even more interesting thing (which is actually weird). for some reason I went and create a new lp2

var lp2:Point = new Point(e.localX,e.localY);

now surprisingly it was giving correct values as expected and I went back and changed the code as

var gp:Point = new Point(e.stageX,e.stageY); //global point
var lp:Point = uic.globalToLocal(gp); //local point
var lp2:Point = new Point(e.localX,e.localY);
var lp2:Point = uic.globalToLocal(gp);

now it is expected to have all the lp, lp2 and lp3 variables to be same but weiredly lp two is giving wrong value and lp2 and lp3 were giving correct. I am suspecting using the variable lp has something to do. I am not sure about that but above proves it so right now I am using lp2.

View 1 Replies

Professional :: Create A Smooth Transition From End Of A Movie Clip To Beginning Of A Movie Clip?

Apr 8, 2012

I created a movie clip which plays ok. But when it ends there is a slight jump, if you will, when it goes back to frame 1 to begin playing again. Does anyone know how to make the transition unnoticeable from the last frame of a movie clip to the first frame of a movie clip?

View 4 Replies

ActionScript 3.0 :: Make A Movie Clip Follows Anther Movie-clip That Could Be Moved By User?

Sep 7, 2010

iam tring to make a new project , i just wants to know how to make a movie clip ( constant speed ) follows anther movie clip <--- "which can be moved by the user "

<<<>>>> i believe that this idea is good , that i records the X and Y postion of the User's movie clip and just make the other movie clip points at this postion and move toward it ,

how to make the other Movie clip (( which is a car ! .. so it have acceleration , speed , steering , etc )) go to this position or let us say try to??

View 9 Replies

ActionScript 2.0 :: Actions On Movie Clip Inside Another Movie Clip (menu) Won't Work

May 15, 2009

I have a very simple problem but I can't find the very simple solution to it. I've create an animated menu with animated movie clips inside to work as buttons. All the main buttons work perfectely but I've got just on button with a sub-menu. On this sub-menu I've placed an invisible hitarea button in order to place some gotoAndStop action. The thing is, it seems to me like this submenu hitarea are underneath something else (even though is the seccond layers right about the actions layers). I've placed a simple trace action whenever the mouse rolls over this area but I get nothing... Am I doing something really wrong? I'm losing all my hair already.

View 2 Replies

ActionScript 3.0 :: Resizing Parent Movie Clip Affects Child Movie Clip?

May 27, 2009

i am trying to use the Tween class to change the size of movie clip to certain height.the code works for me but when resizing the parent, it effects the child.i tried the height and scaleY property for the thum, but does not work.

ActionScript Code:
import fl.transitions.Tween;
import fl.transitions.easing.*;
import fl.transitions.TweenEvent;

[code]....

View 6 Replies







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