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


Similar Posts:


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

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

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 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 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 :: 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 :: GotoAndPlay - Link A Button In Main Timeline To A Label- Frame In A Movie Clip

May 18, 2010

I want to link a button in my main timeline to a label- frame in a movie clip. The movie clip is called "Adetail" and the label is "on01"... I type in the following script

[Code]...

View 1 Replies

ActionScript 3.0 :: Movie Clip - If The Arrow Key Is Held Down, The "gotoAndPlay(9)" Stops The Animation From Playing?

Apr 18, 2009

I have a MC called Robot. It is animated with keyframes so that my robot appears to walk. There is an Action on frame 8 that says, "gotoAndPlay(1)".When the user pushes the arrow keys, I want to MC to move in the direction of the press arrow. I also want the MC to start playing at keyframe 9 so it plays the walking animation.

This all works but with one small problem. If the arrow key is held down, the "gotoAndPlay(9)" stops the animation from playing, instead showing only the graphic that is on the 9nth keyframe.

Code:
// initialize arrow variables
var leftArrow:Boolean = false;
var rightArrow:Boolean = false;[code]....

Is there a way to call a function once and play the MC frames until the arrow key is not pressed? I think the problem I am having is that if the key is held down, the EventListener keeps running and starting the MC in the same frame instead of allowing the MC to play as I want it to.

View 5 Replies

Flash :: Event For Movie Clip Loading?

Oct 7, 2011

Is there an event for when a movieClip loads that I can have other aspects of my flash movie react to? I would like to add an event listener for when movieClipOne loads that can trigger a different function in my actionscript (dim the rest of the stage).movieClipOne.addEventListener(Event.NAME, dimFunction);

View 3 Replies

ActionScript 3.0 :: Listen For An Event Within An Instance Of A Movie Clip?

Mar 3, 2010

How do I access an object (in this case a button) within an instance of a movie clip on the stage?Basically I want to listen for a button (but_1) within the movie clip instance (menu_bar_1) which is set on the stage of my main movie.I want to use that same movie clip in several different parts of the main file, and each time the button will play a different sound.

View 1 Replies

ActionScript 3.0 :: Movie Clip Closes With No Mouse:Event?

Jun 16, 2009

This is the top third of the stage that the user sees. When they click on a computer a window is supposed to pop up. Everything is working fine at this point. The full screen, (the small hard-to-read button is Random Hardware which opens up a window to a random computer), a link to the "Digital Studio", and the computers when you click on them.It's after the window is open that the problem occurs. As you can tell there is an X in the upper right corner of the window. When the user presses that it is supposed to close the window and return to the normal stage. The "Software" text is clickable and sends the user to the websites of Adobe, Microsoft Office, etc. When the user clicks the software it works fine, but if the user clicks anywhere else in the window it just closes and returns to the first frame. There is nothing in my ActionScripting that puts an Event Listener to the window or the close sign.

View 16 Replies

Professional :: Remove An Event Listener Set In Another Movie Clip?

Mar 10, 2011

I'm in one movie clip and want to remove an event listener set in another movie clip
 
the following code brings up an error
 
TypeError: Error #1010: A term is undefined and has no properties.    at GemoroBovoMetzia23b_fla::Draw_Tool_7/toolsbtn()
 
So in my toolsbtn function I have written the following code which doesn't work
Object(root).slides_mc.help_btn.remove.EventListener(MouseEvent.CLICK, Object(root).PresentationHelp);

View 5 Replies

ActionScript 3.0 :: Scale Mouse Event In Movie Clip?

Feb 1, 2010

I'm trying to make a zoom in and out effect, on images in a movieclip, using the mouse wheel. But, there is another mouse event that scrolls through the frames of the movie clip. I need it to stay zoomed in, and out respectively, when you scroll to the next frame.

View 0 Replies

ActionScript 3.0 :: Event Target Inside A Movie Clip?

Apr 29, 2010

How can I target an event target that is inside a movie clip?

portfolio_mc.landingBtn1_mc.addEventListener(Mouse Event.MOUSE_OUT, landingRollOutFunc);

ActionScript Code:
function landingRollOverFunc(myEvent:MouseEvent):void {
TweenMax.to(event.target, .2, {scaleX:1, scaleY:1});[code]..........

//This obviously doesn't work but it will provide an idea of what I'm trying to do:

function landingRollOverFunc(myEvent:MouseEvent):void {
TweenMax.to(MYPARENTCLIP.event.target, .2, {scaleX:1, scaleY:1});
}

View 2 Replies

ActionScript 3.0 :: Adding OnEnterFrame Event To Movie Clip

Sep 19, 2010

how to add an onEnterFrame event to a newly created movie clip.

This is what I'd do in as2:

Code:
var mc:MovieClip = new MovieClip()
mc.onEnterFrame = function(){
//Code here

[Code]......

View 6 Replies

ActionScript 2.0 :: Nested Movie Clip Event Handlers?

Mar 29, 2007

After figuring out that removeMovieClip won't work on objects with negative depth numbers, I've run into another stumbling block in some menu generation code I'm working on.For the most part, my menu code is complete, and functional. However I've been trying to clean up some of the display methods to make it a nicer and smoother interface.

When you rollover a menu item, a submenu appears. This submenu consists of a number of items. Let's pretend we have this MAIN MENU > SUBMENU > ITEM 1, ITEM2, ITEM 3.ITEM 1, ITEM2, and ITEM 3 are nested in SUBMENU. For example, the full path for ITEM 1 is _level0.mainmenu.submenu.item1.

SUBMENU itself consists of a background object and the item objects. The items all have event handlers assigned to them. onRollOver highlights a selection, onRollOut unhighlights the selection, onRelease jumps to the appropriate Movie Clip.

What I would like to do is assign an onRollOut event to SUBMENU that collapses the menu on a mouse roll out event. It works, however, when I do this, the event handlers of the nested ITEMs become nonfunctional. Is it not possible for parent and child movie clips to both have onRollOut events assigned to them? Or is there something else I'm missing?

View 5 Replies

ActionScript 2.0 :: Remove/ Hide Movie Clip On Frame Event?

Sep 11, 2010

I have a "snow movie clip" playing in my .swf, but removing the clip on a certain frame doesnt stop it from playing. I need to either remove it or hide it using as2.

View 1 Replies

ActionScript 3.0 :: Event Listener Calling To The Stage From Movie Clip?

May 22, 2011

I am having problems with a flash project I am working on (flash cs5.5, as3).I have a movie clip with some animation in it, and when it reaches a certain point, I want it to call out a function that is on the first key frame on the stage (as in on the main timeline and not in a movie clip...).This is what I have so far in side that movie clip:

Actionscript Code:
stop();addEventListener(Event.ENTER_FRAME, onTween);

but I allways get this error message:

"Symbol 'ContMask', Layer 'Layer 6', Frame 124, Line 21120: Access of undefined property onTween."

All I am trying to make it do is to trigger the function (onTween) in the main timeline from the movie clip (ContMask).

View 2 Replies

ActionScript 3.0 :: Adding Event Listener To A Button Within A Movie Clip?

May 1, 2009

On the main timeline, I have placed a movieclip (movieclipone) which contains some content. On frame 85 of movieclipone, there is a new keyframe which contains a movieclip that hasn't previously appeared in the movieclipone timeline, (moviecliptwo) which contains four buttons (btnone, et cetera).Is there a way to have code in the main timeline that attaches listeners to the buttons inside moviecliptwo, which, when pressed, trigger a function that increases a counter and tells movieclipone to go to the next frame? This is the code I am using right now:
 
stop();
 movieclipone.addEventListener(Event.ENTER_FRAME, onEnter);function onEnter(e:Event):void [code]........

When I debug the movie, I get this error at frame 85:TypeError: Error #1009: Cannot access a property or method of a null object reference.

View 5 Replies

ActionScript 3.0 :: Dispatch An Event From A Class That Extends A Movie Clip?

Aug 1, 2008

how i need to dispatch an event from a class that Extends a movie clip now so i cant extend the class to be EventDispatcher. Do i need another class just for handling events?

View 3 Replies

ActionScript 3.0 :: Target One Movie Clip With Event Handler Function?

Oct 19, 2009

I created an array with movie clips now how can i target one movie clip with event handler function . so that when i clicked on one movie clip a message should be displayed

View 4 Replies

ActionScript 2.0 :: Mouse Event With Hitest - Change In To Another Movie Clip

Jul 7, 2011

Anybody having program for this task my movie clip(1) Act As mouse. In the screen having Animated movie clip(2) if mouse(movie clip(1)) touches movie clip2. Mouse change in to Another Movie Clip(3)

View 2 Replies







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