ActionScript 2.0 :: Get The Position Of A Movie Clip, On A Particular Frame Of A MC?

Jun 12, 2010

I am trying to get the position of a movie clip called "Shooter", returned to a variable called spitballYpos.

The movie clip is sitting on frame 6 (labelled "Shooting") of a movie clip called PDFstanding.

The position returns perfectly if I place the .shooter MC on the first frame of PDFstanding, but on frame 6 the variable result just returns "undefined".

What have I missed? If I need to reference the particular frame the 'shooter' movie clip is on, then what is the correct syntax?

Here's my code...

Actionscript Code:
spitballYpos = _root.PDFstanding.shooter._y;

View 1 Replies


Similar Posts:


ActionScript 2.0 :: Resizing - Create A Movie Clip Dynamically Whose Position And Dimensions Are Changed In Each Frame As Loaded From Xml

Mar 22, 2010

i'm new to action script 2.0 and i want to create a movie clip dynamically whose position and dimensions are changed in each frame as loaded from xml;

[Code]...

the position and dimension are changed but the problem is the last dimensions are not removed and it get bigger n bigger

View 1 Replies

ActionScript 3.0 :: Duplicate A Movie Clip In Original Movie Clip Position?

Aug 30, 2011

I have several movie clips on the stage. They are draggable. I want to be able to drag the movie clip, then when it is dropped, a copy of that movie clip will appear where the first one had been, and the first one will just stay where it is on the screen.

However, I'm running into problems with the syntax.

Here is my current code:

[Code].....

View 14 Replies

Stop A Movie Clip From Looping And Move To Another Frame/movie Clip?

Jun 30, 2009

it isn't such a big problem bur for a beginner like me it is.I have a movie clip called "Lion_beginning_mc", inside of it I have 3 Key Frames and Inside each and one of them I have different shapes.For example:Key Frame number 01 - DogKey Frame number 02 - CatKey Frame number 03 - MouseI want to move this movie clip "Lion Beginning_mc" form Key frame number 1 to Key frame number 20.I want the Dog,Cat and a mouse to change between each other only once while moving from Key Frame number 1 to 20.And then when the movie clip "Lion Beginning_mc" reaches his goal another movie clip or a frame (with a shape) will start.

View 5 Replies

ActionScript 3.0 :: Flash - Call A Frame Of One Movie Clip From Another Movie Clip?

Jun 28, 2010

Scene1->MovieClip1->Image1(as a button)Scene1->MovieClip2->MovieClip3->MovieClip4->frame1Now I want to call frame1 from Img1 have a parent Scene1 common.How can I do this.I have tried

on(release){
_parent.MovieClip2.MovieClip3.MovieClip4.gotoAndPl ay("frame1");
}

[code].....

View 2 Replies

ActionScript 3.0 :: If Click The The Mc1 On First Frame  The Movie Clip Should Goto And Stop At Tenth Frame?

Aug 18, 2011

i created a two layer in time line in one layer there is a movieclip called mc1. In the same layer in 15th frame i have another movie clip mc2. Inside the movieclip mc2 i created another movie clip at frame10 now if i clik the the mc1 on first frame  The movie clip should goto and stop at tenth frame

View 4 Replies

ActionScript 2.0 :: Make The Movie Clip To First Go From Frame 1 To 10( Last Frame In Teh Movieclip) With The Text Time?

Mar 26, 2004

i have a movie clip with a dynamic text field being animated...i have a text file with this in it

&textline1=time
&textline2=place
&textline3=year
&textline4=month

now how do i make the movie clip to first go from frame 1 to 10( last frame in teh movieclip) with the text time and then when the movie clip starts again it should say place and so on and so forth.. depending on how many textline variables i define in the text file?

View 5 Replies

ActionScript 2.0 :: MX04 Link From Frame To A Frame Inside Movie Clip?

Apr 30, 2009

is it possible to link a frame inside a movie clip from main time line?

View 4 Replies

ActionScript 3.0 :: Programming - Stop In Each Frame And Run The Animation Of The Movie Clip On That Frame

Jun 30, 2011

i'm very new at flash and finally ended all the work i wanted to do here. now i just need to had the actions so it will run properly. basically i just need it to stop in each frame and run the animation of the movie clip on that frame. if it's i can put the project here so you can see what and were i need to had the actions.

View 1 Replies

IDE :: Add A Movie Clip To A Button Position?

Dec 2, 2009

how do i add a movie clip to a button position? i want a button that, when clicked, slides out to a certain position and stop. kinda like a drawer in a desk.

View 1 Replies

ActionScript 1/2 :: When Click The Shift Button,it Shows The First Frame Static Of The Movie Clip In Frame 3?

Feb 23, 2010

I have a character, And in its movieclip I`ve got 3 frames (first has an idle pose, second a walking pose and third a running pose), each with a movieclip with an action in it.Well, what I wanted is that when I am walking with this character, and press the SHIFT key he runs.And I`ve got the following code

if (Key.isDown(Key.LEFT))[code]....

But when I click the shift button, he shows the first frame static of the movie clip in frame 3 (running frame).

View 9 Replies

ActionScript 3.0 :: MC To Loop That Is Inside A MC - Play Head Of A Movie Clip To Return To A Certain Frame Of That Clip

Nov 2, 2010

I would like play head of a movie clip to return to a certain frame of that clip so a MC inside it would loop. I now have: stop(); as the action.

View 2 Replies

ActionScript 2.0 :: Error : Frame=1: Line 5: Clip Events Are Permitted Only For Movie Clip Instances?

Jun 8, 2002

i've tried placing the code in the actions pnel of the mc; on the mc at the main time line and in various other unspeakable places... but i always get the same error warning me that this code can only be used in movieclip instances and that my stupidity levels are reaching dangerous levels. (error: 'Symbol=stage_mc, Layer=actions, Frame=1: Line 5: Clip events are permitted only for movie clip instances

onClipEvent(enterFrame){'

i fear somebody will reply to this with:'the code goes on the movieclip instance'...at which point i will take up a career in knitting (i knew i shouldn't have given up the course in the first place)

View 12 Replies

ActionScript 2.0 :: Playing A Movie Clip From A Certain Frame To A Certain Frame With A Button

Jan 7, 2009

I have an invisible button and only one mc, the mc loops 3x then stops, this is defined with as in mc.

Now i want to play the movie from the invisible button but only loop it once. Which means i would like to play it from frame 1 to frame 215.

And also when u rollout i would like the movie to stop and go to frame 1.

this is my button code so far

Code:
on (rollOver) {
tellTarget ("loader")
{

[Code]......

View 12 Replies

Movie Clip Reverts To Default Frame After Frame Change?

Jun 7, 2010

I am making a quiz/game, and it works like this, two teams that have to take over the united states, by answering history questions, so right now I have it were when you click on a state, it takes you to a question (on a different frame in the main timeline), then I have a problem, if you get the question right it takes you to the "board" of the United States (that works), but when you are back the color of the state should change its color to red (on frame of the clip) if south got it and blue (another frame of the clip) if north got itBut instead i changes back to grey (default color, all start grey to begin with). I don't and can't seem to figure this out

View 2 Replies

ActionScript 3.0 :: Locate Frame Position In A Movie?

Dec 19, 2008

There's a way to know which frame number I'm located in a movie? I fond this 'getCurrentKeyframe () ' but I don't understand how does it work.

View 2 Replies

Flash :: How To Position Empty Movie Clip

Jan 20, 2011

I have two images pulling though an empty movie clip, using the actionscript below. I can't seem to figure out how to position both of them, could anybody shed some light on this? I'm using AS3.

[Code]....

View 1 Replies

ActionScript 2.0 :: Display A Movie Clip's Position?

May 6, 2005

actionscript and was trying to display a movie clip's x and y positions in dynamic textboxes. I can make them display the mouse's x and y positions but need to get it to say the movie clip's

View 2 Replies

Actionscript 3.0 :: Change A Movie Clip Position?

Aug 24, 2009

I am creating a flash presentation for school. I am unable to solve this problem, that keeps on pestering me.The problem is:I am trying to create a touch screen calibration movie clip. The only problem i keep running into is, when i click the calibration touch screen cross, what is the script that allows the change in position of the cross after it has been clicked on?Example:The original cross is orientated on the top left of the screen, after it has been clicked i need it to move to the top right of the screen, then clicked again - bottom right, and again bottom left and finally clicked again to be displayed in the centre

View 1 Replies

ActionScript 2.0 :: Add X And Y Position For Empty Movie Clip?

Mar 27, 2004

I created an empty movieclip with[code]...

Where in the script can I add the x and y properties for that empty movieclip?

View 3 Replies

ActionScript 2.0 :: [FMX] Locking A Movie Clip's Position?

Oct 20, 2004

I'm an ActionScript beginner, by the way.

I have a simple drag and drop interface, fill in the blank type thing, and I wat to lock a specific move clip's position once it's dropped in the appropriate place. Make sense?

View 1 Replies

ActionScript 2.0 :: Movie Clip Position Testing?

Dec 16, 2008

Is there a way to test the _y of all movie clips and set a function that if there is a movie clip at _y = 75 that it is 'topMovie' and if another clip is at (topMovie + topMovie._height) THAT movie will be 'secondMovie' and so on ad infinitum?

View 2 Replies

ActionScript 3.0 :: How To Test For Movie Clip Position

Nov 24, 2009

I need to test for the x position of a movie clip and if its in place a do something otherwise if its in position b do something else. Can you tell me how to test for this?

View 2 Replies

ActionScript 2.0 :: Use A Blank Movie Clip For The Position?

Aug 25, 2010

how would i go about using a draw code(Code that allows users to draw within the flash) and restricting it to a certain size and location on the movie? for instance a 75x75 box located at xPos=200 and yPos = 150?

Like would I have to use a blank movie clip for the position? then make an invisible box within it to restrict drawing area?

View 1 Replies

ActionScript 2.0 :: [FMX] X And Y Position For Empty Movie Clip?

Mar 27, 2004

I created an empty movieclip with:Code:_root.createEmptyMovieClip("container", 1);Where in the script can I add the x and y properties for that empty movieclip?

View 3 Replies

ActionScript 2.0 :: _x And _y Position - Stop The Movie Clip

Jul 8, 2004

i have this

onClipEvent(enterFrame){
speed=5;
this._x+=2;
}

i wanna know how do i stop the movie clip in a place?

View 1 Replies

ActionScript 2.0 :: [FMX] Locking A Movie Clip's Position

Oct 20, 2004

I have a simple question, but for the life of me I can't figure it out. I'm an ActionScript beginner, by the way. I have a simple drag and drop interface, fill in the blank type thing, and I wat to lock a specific move clip's position once it's dropped in the appropriate place. Make sense?

View 1 Replies

ActionScript 3.0 :: Movie Clip Should Pop Back To Its Original X And Y Position?

Feb 2, 2009

I made two movie clips that follows the mouse but I want to put constraints on them, they should follow the mouse until the mouse reaches a certain distance and then the movie clip should pop back to its original x and y position.

Code:
private function init():void
{
addChild(backgrnd);

[code]....

View 1 Replies

ActionScript 2.0 :: Stage Position While Inside A Movie Clip?

Jul 3, 2009

Is there a way to position something INSIDE of a movie clip, based on X and Y values of the root stage?

Basically the X and Y of the container movie clip is at Stage.width/2; but I want one specific movie clip inside to stay permanently at 200X and 200Y on the MAIN STAGE. I can't actually move it to the root timeline though because it is using actionscript inside of the container.

View 1 Replies

ActionScript 2.0 :: Preserving Movie Clip Playhead Position

Apr 29, 2010

I need to jump the movie clip position back and forth between two positions on the stage--without tweening--via a mouse click on a button. I have no problem doing this by creating a 2-keyframe timeline, and re-positioning the movie clip for each frame. To move back and forth from frame 1 to 2 and back to 1 on the main timeline, I wrote a gotoAndStop action for the button, (labeled flipflop.) In frame 1 of the main timeline:

flipflop.onMouseDown = function() {
gotoAndStop(2);
};

In frame 2 of the main timeline:

flipflop.onMouseDown = function() {
gotoAndStop(1);
};

The problem is, when the movie clip jumps from position A to position B on the stage, the movie clip resets to frame 1. I need the movie clip to hold its current frame as it changes position from frame 1 to 2 and back to 1. How do I do this, and would the method be the same if the single button controlled the movement of multiple movie clips?

View 1 Replies







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