ActionScript 3.0 :: Referring To A Frame In A Different Movieclip?

Jul 8, 2009

I have a button located in a movieclip which I want in its overstate to gotoAndStop a particular labeled frame located in a different movieclip. How do I go to a frame of "movieclip A" by interacting with an element of "movieclip B"? Must I sever the relationship between the button and the movieclip its in which I wouldn't want to do...?

View 3 Replies


Similar Posts:


ActionScript 3.0 :: Referring To A Movieclip?

Nov 23, 2009

i need to refere to a whole bunch of mc named a1, a2, a3, a4, a5 and var who:MovieClip="a"+3 dosnt work...

ActionScript Code:
import gs.TweenLite;
stop()[code].............

View 1 Replies

ActionScript 2.0 :: Referring To A Movieclip?

Feb 7, 2006

Code:
var l = 2;
duplicateMovieClip(button, "button"+l, this.getNextHighestDepth());

[code].....

View 4 Replies

ActionScript 3.0 :: Referring To Movieclip Within Object?

Mar 4, 2010

I have an object that I add movieclips into when a user does something.

I'm trying to loop through the items in this object later and perform something when object.objectName = something, however I'm finding it hard to get the right code to use in place of the something.

code within a function that adds movieclip to object:

Code:
if (thisHImage==1) {
healthArray[healthIndex] = new mcCake();
}

[Code]...

when i trace(healthO.objectName) i get [object mcCake], but it won't enter the if statement,

View 2 Replies

ActionScript 3.0 :: Referring To Functions On The Stage From A Movieclip?

Mar 2, 2010

I just started "coding" in AS3. By "coding", I actually mean trying around with features and generally trying to grasp the vast amount stuff you can do with this software of. I have some coding experience, however the way  Flash likes to hide code snippets all over my project does tend to confuse me. Not knowing where I tried putting the code and/or rewrote some other stuff keeps me sorta busy.
 
Anyway, my issue is this:
 
Messing around with movieclips inside movieclips, I've keep encountering the error "1120: Access of undefined property onTimerComplete." I do realize that this error generally is caused by not having defined an instance correctly or not having it defined at all - an error beginners tend to make. Nonetheless, I'm not trying to refer to an instance/symbol, I am trying to call a function defined on the stage from within a movieclip that also is placed on the stage.

I've been reading huge amounts of text/articles and how-to 's, but they all seem to only touch the subject lightly or simply going in head-first - becoming far too complicated for me (a beginner) to grasp.
 
So, trying to sum my questions up into something that looks like a tl;dr:
 
- What's up with levels, "_root" and referring to functions like in the older versions of flash?

Flash tells me to use some display-package instead of _root, when I use that... (I do realize the article is from Flash 5.0)
 
- How do you refer to a function defined on the stage, from inside a movieclip? (The function is a timer, that is supposed to make the mother-movieclip continue to the next child-movieclip.)

View 7 Replies

ActionScript 3.0 :: MovieClip Buttons Referring To Main Timeline?

Sep 1, 2009

I've got what I think isn't a real tough one however I can't seem to get this working.
 
I have a MovieClip. This movie clip has 21 buttons. These 21 buttons should be forwarding the user to frames 60-81 on the maintime line.
 
The actionscript I've added is not providing any errors however it's working either as these buttons don't do anything unfortuanlty.
 
Below is a sample of the code i've placed within the MovieClip itself, as the buttons and the button names are contained in the movieClip.
 
AS3 Code Being Used

button1_btn.addEventListener(MouseEvent.CLICK, button1Click);function button1Click(e:MouseEvent):void{    gotoAndStop(55)}
 
This code is listed for each button instance and to forward the user to a frame on the main timeline (NOT the timeline in the MovieClip itself).
 
Again, this code is contained in the MovieClip itself and not on the main timeline, as the buttons exist in the movieClip I.E. button1_btn to button21_btn
 
Lastly, to provide a visual idea of what i'm expereincing, please refer to screenshot embeeded in this message or the attachment (same thing).

View 4 Replies

ActionScript 3.0 :: Flash Referring To Movieclip In Array Using Names?

May 1, 2011

I am writing a program where I have used multiple movieclips (boxes) that are put into a grid using a nested for loop.

Each movieclip is in an array and I want to give them names (box1, box2, e.t.c) but when I try to trace() them i get this in the output: "[object gridBox]".

[Code]...

View 4 Replies

ActionScript 3.0 :: Referring To "parent" MovieClip In A Nested MC

Apr 12, 2011

I have a nested movieclip, which I shall refer to as Menu.a.b This is passed to a MouseEvent function using e.currentTarget

I now need to run a command (indexOf) on Menu.a, however only have Menu.a.b saved. How can I refer to Menu.a as a function of Menu.a.b

I've tried Menu.a.b.parent, and that hasn't seemed to work, nor has a few other attempts involving the MC function.

View 2 Replies

ActionScript 3.0 :: Amatur - Access Variables In A Frame On The Stage With Code From A Frame Within A Movieclip?

May 16, 2009

how I access variables in a frame on the stage with code from a frame within a movieclip?(basically passing variables from a stage frame to a movieclip 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

Flash :: RemoveChild Frame Animated MovieClip, Will Stop Frame Running?

Sep 14, 2010

If I removeChild frame animated Movieclip, will it automatically stop running the frames inside it? Actually without calling mc.stop();

View 2 Replies

ActionScript 2.0 :: Bi-lingual Pathway - Call Up A MovieClip To Play From Frame 10, And Not Frame 1?

Mar 8, 2005

I'd like my Flash site to be bi-lingual. What I have currently is a Flash movie with an empty Movie Clip which then allows users to go from movie to movie. The movies are all small movieClips that are loaded into the empty movieclip on demand. There is some video and text in each of the 30 movieClips.
Here is sample of code that i'm using to call up next MovieClip.

[Code]...

My solution for the bilingual version is to create a separate frame with the French version + video and then when user presses the French button they are directed to that frame. This way I could easily create the French text within the one movie. however i don't know the Actionscript code to call up a movieClip to play from frame 10, and not frame 1.

View 3 Replies

ActionScript 3.0 :: Seek Frame-by-frame The MovieClip Timeline And Use The CurrentFrame To Control All Motion Child?

Jul 16, 2010

i'd like to control MovieClip timeline witch contain several DisplayObject (like Sprite, Button, ...) these DisplayObject have Motion (AnimatorFactory). How can i do seek frame-by-frame the MovieClip Timeline and use the currentFrame to control all Motion child.

[Code]....

View 18 Replies

Actionscript 3 :: If Statement Not Working - Loop Carrera(a Lenghthy Movieclip) From Frame 2 Back To Frame 1

Nov 25, 2011

This is an if stament on a frame on the root. I want to loop Carrera(a lenghthy movieclip) from frame 2 back to frame 1. (For testing purposes) This is the code:

[Code]...

View 3 Replies

ActionScript 1/2 :: Movieclips Aware Of What Frame Open Another Movieclip To The Same Frame?

Jan 4, 2011

I was having trouble even knowing quite what to search for so I figured asking a question in a forum would be the best way to go. Currently I am making an application where I have multiple movieclips of equal duration on multiple frames. For example, movieclip_1 is on frame 1 and is 40 frames long. There is currently a scrub bar that scrubs through the 40 frames of movieclip_1. On frame 1 of the Scene there are also buttons with the actions to gotoAndStop on frame 2, frame 3, and frame 4. Frame 2 contains movieclip_2, frame 3 contains movieclip_3, and so on. The functionality of this is that it shows medical conditions progressing from different angles and when a button is clicked the display shows a close up of just that one angle. As expected, without any actions on the movieclips navigating from one frame to the next brings up the proper new movieclip but they always begin at frame 1. What I would like to be able to do is somehow have my movieclips know what frame they are on so when a button is clicked the application would go to that frame and open that movie clip to the same frame as the previous one that was just navigated from.

View 3 Replies

ActionScript 3.0 :: When Change De X Or Y Value Of This First MovieClip The Frame Rate Slows Down For During 1 Frame

Mar 27, 2012

I got a MovieClip filled with a lot of others clips... When I change de X or Y value of this first MovieClip the frame rate slows down for during 1 frame. For exemple... I created a counter that returns around 30 mseconds every frame, but when I do this X or Y change the return is around 400 mseconds... When I try to fill the first MovieClip with less information it goes faster, about 100+-200 mseconds...

View 6 Replies

ActionScript 2.0 :: Tell _root To Goto Frame And Then Play Certain Frame Of Movieclip?

May 7, 2006

When you click a button I want my flash to go to the frame label where the movie clip is located, and then play a certain frame of that movie clip.

View 5 Replies

ActionScript 2.0 :: Make A Simple Movie (call It MovieClip) First Frame Has Stop(); Action, Second Frame Has Label PlayMovie?

Nov 6, 2006

1. I make a simple movie (call it movieClip) first frame has stop(); action, second frame has label playMovie, last frame has action gotoAndPlay(2); (so that movie not stop anymore2. Now I place movieClip on stage3. Question... what is code to make movieClip play frame label playMovie?

I already try to put many different type action in frame one of stage
this.movieClip.gotoAndPlay("2"); //NOT WORK
this.movieClip.gotoAndPlay(2); //NOT WORK

[code].....

View 7 Replies

Flash :: MovieClip To Play From Frame 5 To Frame 30 And Then Stop?

Aug 1, 2011

I want my MovieClip to play from frame 5 to frame 30 and then stop. How can I do this?

View 5 Replies

ActionScript 3.0 :: Go To A Frame And Play A Certain Frame In A Movieclip?

Aug 11, 2008

This may be a really simple question but I'm trying to go to a frame on the timeline which has a movieClip object in it and then goto a specific frame in that movieClip and I can't figure out how to code it. I thought something like:

gotoAndPlay("movieClipframe");
this.theMovieClip.gotoAndPlay("theFrame");

but I get a null reference error.Does anybody know what I'm doing wrong or if I'm?

View 6 Replies

ActionScript 2.0 :: Go From Frame One In MovieClip#2 To The Last Frame In MovieClip#

Feb 7, 2004

Here is how my movie is set up.

Frame one -> MovieClip #1
Frame two -> MovieClip #2
within each movieclip there are 10-15 frames.

Here's the problem. I want to be able to go from frame one in MovieClip#2 to the last frame in MovieClip#1, via a button click.

View 5 Replies

ActionScript 3.0 :: Event Listener - When The Mouse Rollsover The Movieclip To Go To Frame 3 Of The Movieclip

Mar 4, 2009

i've not tried to do anything odd with eventListeners up until now. i have a movieclip with multiple frames that i use AS to attach a textfield to it. problem is i have a eventlistener for when the mouse rollsover the movieclip to go to frame 3 of the movieclip.

[Code]...

what's causing the textfield to suddenly take precedence and how do i stop it. when i trace the evt.target - it is my movieclip.

View 5 Replies

ActionScript 3.0 :: Hiding A Movieclip On Stage From Inside A Movieclip Frame Action

May 4, 2011

I have the scenario below. I have a movieclip on the stage (root). Inside this movieclip I have a frame with the action below:

_root.MCHappy.visible = false;
_root.MCSad.visible = false;
_root.MCNormal.visible = true;

I cant get this working with AS3. How is the correct way to do that inside a MovieClip with AS3?

View 6 Replies

ActionScript 3.0 :: Get A Button Inside A Movieclip Link To A Frame In Another Movieclip On The Scene?

Feb 16, 2010

How can I get a button inside a movieclip link to a frame in another movieclip on the scene? I tried this code:

function gotoCenter(event:MouseEvent):void {
MovieClip(root).centermc.gotoAndPlay(2);
}
skruetest.addEventListener(MouseEvent.CLICK, gotoCenter);

..where "skruetest" is the button, "centermc" is the movieclip where I want to go to frame 2. I don�t get errors with this code, but nothing happens when I click the button. What can I do?

View 4 Replies

ActionScript 2.0 :: Get A Movieclip Within A Movieclip To Stop Playing When It Reaches Its Last Frame

Nov 20, 2007

i'm trying to get a movieclip within a movieclip to stop playing when it reaches its last frame. let me describe my problem: it should start playing when the user rolls over the movieclip that is containing it(i'll call this mc1, and the movieclip within it mc2). i've put a stop action in mc2's last frame but it won't stop and plays again and again. one thing i should point out is that there is a variable in mc1 that tells the movie whether it's ok to play the movie in reverse when the user rolls over mc1, if this is false, that means that it plays normally(not in reverse). i'm using "play()" to play mc1 when the user rolls over it and this is where i think the problem is; even though the last frame of mc2 has a stop action, it is somehow told to play again? anyways, this is just a guess, i haven't figured out why or how to fix it. i'm not sure if my explanation was too hard to understand so i'll try to clarify it if anyone wants me to.

View 1 Replies

ActionScript 2.0 :: Referring To URL In XML?

Dec 21, 2006

This is my problem: I've got a couple of movieclips, when I click on them I want them to open the URL that I've typed in my XML-file.(The photos are thumbnails stored inside of the movieclips)Here's my XML:

Code:
<?xml version="1.0"?>
<select name="photos">
<option photo="film14" url =">[code]....

How do I refer to the url-code in the actionsscript?

View 4 Replies

Professional :: CS4 Referring To A Label

Feb 20, 2010

Now that I've set labels, I'm trying to create actionscript code to go to the labels. Here's an example of my code:
 
btn_me.addEventListener(MouseEvent.CLICK, gotome);
function gotome(event:MouseEvent):void{    gotoAndPlay(me);}
 
This code has been borrowed from the online video - Getting Started 18: Building an Application. Of course, in that video explicit frame numbers are used so the code looks like gotoAndPlay(15). I'd prefer to use labels for obvious reasons. My question - how do I tell Flash that 'me' is a label? I expect I need to use a special character and I've already tried gotoAndPlay(#me) but that gives me a Syntax error.

View 3 Replies

ActionScript 2.0 :: Referring To Another Object?

Apr 12, 2010

I have a small Flash file where I control a ball.In ActionScript 2.0, I have it to where this ball moves around based on input from the Arrows on the keyboard. It also bounces off the edges.I added a new separate ball (not the same symbol) and I want to refer to the NEW ball's X and Y coordinates to see if I am running into the new ball. How do I refer to the other ball's (or any other object for that matter's) properties from within the ActionScript of the first object?

View 2 Replies

ActionScript 2.0 :: Referring To A Variable

Apr 17, 2003

say i have this code: blah = "123 + i" so blah is a variable right? so how would i refer to this variable? i want to be able to do: _root.blah.onPress = function () but this won't work beause you need an instance name instead, so how would you do this? thx, i hope you understood what i was saying

View 9 Replies

ActionScript 2.0 :: MC - Referring To Instance Name

Mar 31, 2006

im trying to, to make my MC have a rollover effect but my movie clip had been added by Action Script so this doesnt work

[Code]...

View 5 Replies







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