Professional :: GotoAndPlay Nested Movie Clip In Class?

Dec 26, 2010

I have a class controlling all my targets, I want to play a death scene for each target when they get shot. My targets involve several nested movie clips, I want to put the death scene on the second level of my targets nested clipsWhat code do I use to tell flash to go to the second level in my targets and play there?Here is my class code in it's entirety. I have highlighted the part thats currently playing my targets.

package {import flash.display.MovieClip;import flash.events.Event;import flash.events.MouseEvent;import flash.media.Sound;
public class SquaresClass extends MovieClip {function SquaresClass()

[code].....

View 3 Replies


Similar Posts:


ActionScript 3.0 :: Access Class From Nested Movie Clip?

Jan 28, 2010

I've instantiated a class on the main timeline where the stage is[code]...

View 6 Replies

ActionScript 3.0 :: Calling A Class Function From The Timeline Of A Nested Movie Clip?

Aug 26, 2010

I'm trying to call a function called checkForHit() located inside of my Hero class at a particular frame of an attack animation of my Hero object. Meaning, when his weapon is at the point in the animation where it could collide with any enemies, I want to call the function that performs the check.My Hero Movie Clip is set up where it contains a Movie Clip on different frames that coorespond to the different animations (attacks, movements, etc). So the Hero MC contains a bunch of other MCs. That way I can just use hero.gotoAndStop("attack1");

The problem that I'm having is that the code that I wrote to call the checkForHit() function is written on one of the frame of the nested MC's timeline, and it's not being recognized. In fact, even if I put a trace("HELLO") on any of the frames on the nested MC, it's not being output. I even tried to put something that I know should cause an error on one of the frames, and it ran without throwing an error. It's almost like the code on the timeline isn't being compiled, or it's being skipped over somehow.

View 1 Replies

Professional :: Nested Movie Clip Not Playing

Oct 17, 2010

I have some movie clips nested and at some point one on the left side should call one on the right side and it's not working and I'm pulling my hair, and I'm opening this thread for therapeutic purposes, I'm so angry I can't see straight
 
one frame in the left MC calls this

_root.pages_mc.cpr_mc.charr_mc.right_mc.gotoAndPlay("Sidney");
 
and it doesn't work and I don't know why, as I have a root who has a frame with a pages_mc that has a frame with cpr_mc that has a frame with charr_mc that has a frame with right_mc and there is a label 'Sidney'well, that's all. I don't even know flash very well, but looks to me that logically I'm doing it right, but flashly I'm doing it wrong...

View 9 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.0 :: Delete A Variable Containing A Movie Clip Class And Recreate It With A Different Movie Clip Class?

Jul 1, 2009

In my project are pages of text with each word having a button that when pressed will display a movieclip presentation about that word (its pronounciation and spelling etc..). In the project I am working on now I have over 450 unique presentations of words to deal with. I don't want to have all of these hundreds of movie clips on the stage and tell them one at a time to stop and rewind and then have one play each time a word button is pressed. That seems to be very inefficient to me.

add movieclips to the stage using addChild(movieclipname) and remove them using removeChild(movieclipname) but there is a problem. I have hundreds of unique movieclips and I don't want to have to manage hundreds of variables containing the indivudual movieclip instancess. It is a real pain having to figure out what instance is still on the stage before i delete it.In Adobe Director all I have to do is this:

View 5 Replies

Set A GotoAndPlay Event On A Movie Clip?

May 12, 2010

Basically trying to set a gotoAndPlay event on a movie clip (onPress / onRelease)

I've tried laying an invisible button over the top of the movie clip which did work, but disabled the movie clip from playing on rollover.

I found the following code on a Adobe forum, but don't really understand it.

myMovieClip.onPress = function () {
trace ("onPress called");
};

View 3 Replies

ActionScript 2.0 :: GotoAndPlay In Other Movie Clip

Nov 2, 2010

I have some sendAndLoad code which works good. Instead of outputting something to a text box I'd like to go to a different place in my movie. I've got quite a few embedded movie clips and the path is the following:

pages_all -> action sc copy 12 -> action content copy 13. Within the pages_all movie clip I'd like to go to frame number 13. How can I use the gotoAndPlay function to go to another movie clip.

I did try the following:

this._parent.gotoAndPlay(13)

View 0 Replies

ActionScript 2.0 :: [FMX]: Using GotoAndPlay With An Empty Movie Clip?

Jan 15, 2003

[fmx]

related files: 7MB .FLA File
Okay...

At the _root I have an instance using an empty clip named mainPageEmptyClip. Inside of that, are various other movies.

Now, at the _root there is a menu which, when clicked, should access one of the layers within the empty clip's content.

The problem here is that I can't discern what the target would be to actually access the clip. The action worked fine before I implemented the empty clip, but now it won't work any longer.

I've tried using the target tool built into FlashMX, but it doesn't list any of the instances withing mainPageEmptyClip - that's as far as it goes. I've tried entering in what would seem to be the path, based on the instance names of subordinate movies, but it does me no good - I'm continually given the error of Target Not Found.

These are the two options I've tried....

_root.mainPageEmptyClip.gotoAndPlay(351);
_root.mainPageEmptyClip.webLayer.gotoAndPlay(156);

View 2 Replies

ActionScript 2.0 :: GotoAndPlay In A Movie Clip Using Scenes?

Feb 14, 2005

in the end of a frame of a movie clip, can i have some kind of action script that makes that movie clip stop, and then play a frame in a scene?

this is what i have-

stop;
gotoAndPlay("Scene 2", 60)

it works, but instead of going to frame 60 of scene 2, it just goes to frame 60 of the movie clip that's still in scene 1.

View 4 Replies

ActionScript 2.0 :: GotoAndPlay In A Buried Movie Clip

Dec 13, 2005

I've got a 'simple' problem with some actionscript and movie clips. I have a 1 frame movie with 2 Layers. On Layer 1 I have a movie clip called green1_mc. In this movie clip I have another called green2_mc. This animation is 120 frames long, with a stop(); on frame 59. On Layer 2 of the main timeline I have another movie clip called green_back. This is my button. I've put the following code on the clip.

[Code]...

View 3 Replies

ActionScript 3.0 :: Targeting Nested Clip From Class?

Jul 23, 2009

I use the loader class to load in an external swf, a preloader movie in my class. (not a document class)

To target the properties in the swf (specifically the text field in it), I coerce it to a movie clip after it's loaded and add the child with:

var thumbPreloaderMC:MovieClip=evt.target.content as MovieClip;

now I can use:
thumbPreloaderMC.preload_text.text "sometext";

to reach the text field. works.

But, I want to nest that clip in a container movieclip I'm placing all the thumbnails I'm loading in, thumbContainer.

So I create the movieclip thumbContainer, add the child, then add the preloader swf to this clip.

I can't name the loaded swf, it throws an error, I googled that and see I can't name an already named clip.

I get an error "TypeError: Error #1010: A term is undefined and has no properties."

First of all, I'm fairly green with as3 still, I think perhaps I should rethink how I'm structuring this. I could and would ask how to target a nested loaded swf from a class.

is nesting clips like this from a class bad practice? What are best practices when it comes to using timeline based animations like preloaders etc by a class? I'd like to make my class as reusable as possible, but one can't create all animations and graphics from code.

View 1 Replies

ActionScript 3.0 :: Reference Instances From Movie Clips If The Movie Clip Referencing From Is Nested?

Mar 23, 2010

It's me again and I'm running into a problem. So, I have this movie clip that is nested inside multiple movie clips. I want to tell Flash to perform an action when that movie clip hits another movie clip in the main timeline. It's just collision detection for a game using the hitTestObject code. I was thinking of using MovieClip(root), but that won't work since it's nested so much.

View 15 Replies

ActionScript 2.0 :: GotoAndplay A Frame In Scene 1 From A Movie Clip?

Jan 25, 2005

I need to make it so when the movie clip that is in frame 1 of scene 1 is done it plays frame 2 of my scene 1. How do I do this Im making a cartoon where a characters mouth which is the movie clip which is moving and when it is done moving i want it to go to and plays frame 2 on scene one. Its to late to do everything on the timeline, and I cant just copy the movie clip, i could but I want to just be able to do this go to and play on scene one from the movie clip instead of doing all my work all over again

View 3 Replies

ActionScript 3.0 :: Send Movie Clip To Blur Instead Of GotoAndPlay?

Oct 19, 2009

How can I sent my movie clip to blur instead of gotoAndPlay?

Code:

shirt.gotoAndPlay(2);

View 3 Replies

ActionScript 3.0 :: Movie Clip Doesn't Respond To GotoAndPlay()?

Aug 4, 2010

My movie clip doesn't respond to gotoAndPlay(1) command at all. Here is the situation: The Main.fla has a movie clip instance "Mov1" and the following AS3 code in the first timeframe:

function LoadSWF(Mov:Object, swf:String ):void {
fl_Loader = new Loader();
fl_Loader.load(new URLRequest(swf));[code]......

Once it's loaded it plays once (there is a stop(); at the end).So far so good but... the following code in the button script doesn't trigger any action at all:

Mov1.gotoAndPlay(1);

Any other code in that button works fine, so the button itself works ok.

View 5 Replies

ActionScript 2.0 :: GotoAndplay Frame In Scene 1 From A Movie Clip

Jan 25, 2005

I need to make it so when the movie clip that is in frame 1 of scene 1 is done it plays frame 2 of my scene 1. How do I do this , PLEASE HELP ME!!! Im making a cartoon where a characters mouth which is the movie clip which is moving and when it is done moving i want it to go to and plays frame 2 on scene one. Its to late to do everything on the timeline, and I cant just copy the movie clip, i could but I want to just be able to do this go to and play on scene one from the movie clip instead of doing all my work all over again.

View 3 Replies

ActionScript 2.0 :: Using GotoAndPlay From Inside A Movie Clip To Go Back To The Main Timeline

Aug 12, 2009

I have a ten-frame Flash doc. Seven of these frames have movie clips. What I want to do is be able to have a user navigate to another frame in the main timeline by clicking a button at the end of each movieclip.

I'm using this code:

on(release){
gotoAndPlay("Scene 1",6);
}

[Code]....

And I"m not getting errors but it's not working when I launch the movie.

View 5 Replies

ActionScript 3.0 :: Setting Properties Of Nested Clip From Document Class Of Parent

Aug 29, 2011

Setting properties of a nested clip from the associated document class of the parent clip. I am developing a Jigsaw puzzle in Flash. I am developing a class for puzzle piece. The code of the PuzzlePiece class in given as follows.

PuzzlePiece class
package {
import flash.display.MovieClip;
import flash.events.MouseEvent;
public class PuzzlePiece extends MovieClip {
private var pieceX:Number;
[Code] .....

Is it wrong to access it like that. The PuzzlePiece is the export for a puzzle clip. For the time being I am hard coding the dimension as 60. I have aloso uploaded the fla and as files. [URL].

View 4 Replies

Nested Movie Clip Not Playing?

Aug 14, 2009

I have a movie clip (that includes a preloader and video elerments) that I created and made a .swf file from which I then imported in my main movie. I then place this .swf file (which is listed as a movie clip symbol in the library) onto the main timeline. I put an action to stop the main timeline at the frame where the nested movie is placed and expected to start. When previewing the movie, the nested movie doesn't play. I see the preloader (in scene 1 of the nested movie)  appears for a second but the movie doesn't play.
 
Any specific action command needs to be define to make the nested movie play?

View 13 Replies

Create Nested Movie Clip

Nov 2, 2009

i am new to flash, i have cs4.i created a 3 second flash animation of a logo.i would like to export that into other flash projects, so that those projects will play the logo first.so what is the best and most efficient way to do that?i have tried to export the logo.fla file as a movie clip or swf file but importing it into a new flash project is a bit weird, like it doesn't come in as a single symbol, but as all of the components that make up the original animation.i have watched many tutorials on nested timelines, but i can not find one on creating a mulitlayered movie clip in a separate fla file and then importing that as a single symbol into a new project fla.

View 3 Replies

ActionScript 3.0 :: Button - GotoAndPlay(frame Label) For A Movie Clip With The Instance Name Content

Jun 12, 2011

I want to do something like gotoAndPlay(frame label) for a movie clip with the instance name content. I am using an array for my buttons placing multiple instances of the button mc on the stage. When I add content.gotoAndPlay I get an access of undefined property error. If I add it inside the parenthesis I get an expecting identifier before my frame label name error.

[Code]....

View 2 Replies

IDE :: GotoAndPlay Button - Play Frames 5-10 On A Movie Clip Inside The Current Frame?

Nov 23, 2009

is there anyway to have a button play frames 5-10 on a movie clip inside the current frame, as well as skipping to...lets say...frame 10 of the scene?

i want to create a site where buttons go to different pages, but those pages have animations in and out.so if someone is in one page, and clicks a button to go to another, that page plays the "out" animation while the other page plays the "in" animation.

View 1 Replies

ActionScript 2.0 :: Calling XML In Nested Movie Clip

Feb 10, 2009

I'm trying to create an image slideshow from preloaded images via XML. I can get the XML to call and 9 images to display as here: [URL] This is fine in itself but I want things to occur underneath the 9 images so I'm trying to preload all the images on the _root. and call the images inside a looping movieclip. The problem is that I can't get the functions inside the movie clip to call the XML - as here [URL]

[Code]....

View 3 Replies

ActionScript 3.0 :: Stop Nested Movie Clip?

Dec 16, 2009

How to stop a nested movie clip. I have a movie clip (instance name: Driver) and within that is a wheel that spins (instance name: myMovieClip). I want that on frame 40 of the main timeline for the wheel to stop spinning. In an actions layer on frame 40,[code]...

View 2 Replies

ActionScript 3.0 :: Another Button In Nested Movie Clip?

May 29, 2009

Sorry to pose this type of question yet again. I have been searching for the past 24 hours for a solution, and am losing the will to live. I am very new to AS 3.0 (and don't have much programming experience), so I guess that's a big part of the problem.

Here's the situation: I have a movie clip on the main timeline (frame 1) whose instance is called "Main_mc". Within Main_mc I had some buttons, each defined this way in the script:

[Code]...

View 5 Replies

ActionScript 3.0 :: Control Nested Movie Clip?

Jan 4, 2010

I try to control nested movie clip.So i have box movie clip and on this movie clip i put tree movie clip.And now i try to change for example apha of tree. Code:

//box_mc.tree_mc.alpha=.4;
box_mc.getChildByName("tree_mc").alpha=.4;
"" for me not logical symbols:) it looks like trace("blabla"); why need use ""?

[code].....

View 1 Replies

ActionScript 1/2 :: Nested Movie Clip Keeps Looping

Aug 25, 2010

I have a two-frame movie clip, each frame has a stop() action.This movie clip, instanced "btn", is inside another which has one frame, also with a stop action.  This second movie clip is instanced "ctrl".The file is called mcCtrl.flaFrom another file, which I consider my main movie, I am using the following to load mcCtrl.swf.[code]Everything works fine except that the "btn" movie clip keeps looping.

View 16 Replies

Flash :: Pre-loader And Nested Movie Clip?

Mar 5, 2012

I'm using a simple pre-loader which loads a nested MovieClip. Now I'm trying to use it on another project were the nested is a simple photo gallery were users can click on prev or next slides this works fine until adding the pre-loader if I just use a nest MovieClip with no user control it works as soon as I add a button to frame 2 it throws this error:

1046: Type was not found or was not compile-time constant: Textline.

Trying to get the pre-loader to start and then users click on a button to continue with the program

Code for pre loader

function loadProgress(my_content:ProgressEvent):void
{
var percent:Number = Math.floor((my_content.bytesLoaded * 100) /my_content.bytesTotal);[code]......

View 1 Replies

ActionScript 2.0 :: Calling XML In Nested Movie Clip?

Feb 10, 2009

I'm trying to create an image slideshow from preloaded images via XML.

I can get the XML to call and 9 images to display as here: [URL]

This is fine in itself but I want things to occur underneath the 9 images so I'm trying to preload all the images on the _root. and call the images inside a looping movieclip.

The problem is that I can't get the functions inside the movie clip to call the XML - as here [URL]

The code inside the move clip is this...

Code:
xmlSmallImages = new XML();
xmlSmallImages.ignoreWhite = true;
xmlSmallImages.onLoad = loadSmallImages;
xmlSmallImages.load("images-small.xml");

[Code].....

View 0 Replies







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