AS3 Button Function Controling Another Movieclips Timeline?

Nov 13, 2010

What I am trying to achieve is have one movie clip containing a button control the timeline of another movie clip.I know how to get a button to control the timeline of it's current movie clip, however, getting a button to control the timeline of a seperatef there is a tutorial that someone knows of, or if someone could post a snippet of AS3 showing how a button controls another clips timeline -Re: Question: AS3 Button controling timeline of movie clip.here is the coding I am using too:

but_shows.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
function onMouseDown(event:MouseEvent):void{
_root.mainContainer.gotoAndStop(2);

[code].....

View 1 Replies


Similar Posts:


ActionScript 2.0 :: Controling Timeline Via Mouse X Position?

May 15, 2005

i want to know if anyone can tell me how to controll the timeline via moving the moiuse in x (left to right basicly i wsant to shocase a sculpture of mine in a seemingly quicktime vr fasion. so i will take lots of images of the sculpture in difrent agles to get the 360 degreemovie. then import intoflash timeline. Then somehow i need a script to control the scrub the timeline images (to create the quicktime vr look )

View 3 Replies

ActionScript 3.0 :: Controling MovieClip With One Function

Oct 7, 2009

I am working on building an accordion style menu using Tweener. I have 3 movieClips on my stage, I can add a tween to each but I need a little help getting the menu items to end in the correct position. In my code below this line tells the movieClip to move to a position of y=25. Tweener. add Tween(mc,{y:25, time:1});I changed mc to box1 and box2 which makes evey thing move when I click, but how do I set up my function so I can click box1 and it will slide up and then click box2 and it slides up.[code]

View 1 Replies

ActionScript 2.0 :: Button Not Controling Movie Clip Correctly?

Dec 17, 2003

Note the button at the top called portfolio, on mouseover this button should loop through the "mouseover" label section, and when the user takes the mouse off of it it should continue to play through what it has started, and stop at the begining of the mouseover labelhen the user clicks on the button it should play through the "trans" label (only once) and begin to loop at the label section "current" when the user goes to another section, for example, clicks another button besides portfolio, the animation should stop on the label "visited" my code for it to loop looks like this (on the invisible button over the movie clip)

on (rollOver) {
portfolioBtn_mc.gotoAndPlay("mouseover");
}

[code].......

View 2 Replies

ActionScript 3.0 :: Play A Certain Part Of MovieClips Timeline Depending On The Button Pressed

Nov 22, 2010

Right I only want to play a certain part of my MovieClips Timeline depending on the button pressed.

ActionScript Code:
stop();
CircleLineMC.KingsCross.addEventListener(MouseEvent.MOUSE_DOWN, KingsCrossBtn);
function KingsCrossBtn(event:MouseEvent):void {
BigSquare_MC.gotoAndPlay(1);
}

But I want it to play only up to frame 50 and then stop there and then loop instead of playing the whole timeline, does anyone know How to do that.

View 6 Replies

ActionScript 2.0 :: Function In Timeline Called Fom Button?

Feb 2, 2007

as im just starting out.for example i have a graphic i need to rewined (instead of tween backwards)when the button is clicked it calls this function in timeline

mc_on_stage.onEnterFrame = function() {
if (rewind == true) {
prevFrame();

[code].....

View 3 Replies

ActionScript 2.0 :: Call A Function In Main Timeline And It's Defined In The Button?

Sep 28, 2010

I have a main time line and a button defined. Can I define functions in actionscript anywhere and call them from anywhere? For example, if I call a function in main timeline and it's defined in the button, does that work?

View 3 Replies

ActionScript 2.0 :: Button Inside MovieClip To Call Function In Main Timeline

Oct 4, 2010

I'm having a bit of a hard time with calling a function in the main timeline through a button in a movieclip. The mc is in the main timeline and in it I added a button with this.removeMovieClip(); and so far it works, but when I try to call a function from the main timeline it just doesn't seem to work.

View 13 Replies

ActionScript 3.0 :: Function - Button Will GotoAndPlay One Frame Beyond Where The Timeline Presently Is Stopped At

Feb 23, 2011

I'm taking a class on Flash right now but its set up in this strange manner where they barely teach you actionscript at all but expect you to be able to take the examples in class and work and amend them into your projects. I am trying to write a function for a button that will gotoAndPlay one frame beyond where the timeline presently is stopped at.

[Code]...

View 3 Replies

ActionScript 2.0 :: Why Do Movieclips Inside Movieclips Have Different _x And _y Than The Timeline

Oct 30, 2007

why does a MC inside another MC have different _x and _y values than the main timeline?What I am trying to do right now is animate a MC inside another MC then get the main MC holding everything to move where that new MC ended animating at (it's part of a game I'm making.)

I know it's confusing but Flash shows the cursors current X and Y in the info panel, which is the same as the main timeline. Yet inside the movieclip, an x of 76 and a y of 277 on the timeline is -195 and -30.9 (respectively) inside the MC.How do I fix it so I can get the _x and _y values to match up so I can tell the main MC to reposition itself to the new X and Y (of the inside MC)

View 1 Replies

ActionScript 3.0 :: Call A Function On Main Timeline From A Different Timeline

Jul 14, 2009

so here's the function on main stage:

[Code]....

and here's the code that wants to call this function in a another movie clip. I've attached this clip dynamicaly to the main stage as well.

[Code].....

How can i acess slideImage function on the main stage. in AS2 _root.slideImage(btnNumber); would work. How Would I do this in AS3?

View 7 Replies

ActionScript 3.0 :: Change Parent Timeline From A Button In The 'Child' Timeline

Apr 30, 2009

I am just trying to use actionscript 3.0 (Flash CS4) to change the 'Parent' timeline from a button in the 'Child' timeline

[Code]...

View 2 Replies

ActionScript 3.0 :: Disable RollOut Function On Movieclips On Click Function?

Sep 13, 2009

I'm doing a basic site with frame labels on the main timeline whose name corresponds to the btn names. A simple  otoAndPlay(evt.target.name); I have a basic navigation setup of 7 mcs with mouse eventlisteners for CLICK, ROLL_OVER and ROLL_OUT.
 
Example:
prepare.addEventListener(MouseEvent.CLICK, navigate);plans.addEventListener(MouseEvent.CLICK, navigate);retire.addEventListener(MouseEvent.CLICK,

[Code]....
 
Does anyone know a better way to do this so when my mcs are clicked they display the rollover content/art? In essence I'm trying to achieve that when the user clicks a btn it goes to that "page" and the corresponding btn stays highlighted. Pretty standard web navigation technique but I just don't know what the best way to do this in flash is and with  how my site is setup.

View 1 Replies

GotoAndPlay Any MovieClips Timeline In Library?

Nov 23, 2010

I was wondering if there is a way to tell flash to navigate to a movieclips timeline without that movie clip being on stage or having an instance...

For example i have MovieClip1 in my Library and its named MovieClip1...but its not located on the stage...

View 6 Replies

ActionScript 3.0 :: Put Movieclips, On 2 Or 3 Frames On Timeline?

Dec 23, 2011

I have a bunch of movieclips in my library. Each one contains it's own class and functions etc.I put each of these movieclips on diffrent frames in my timeline.My question was, if I am going to put these movieclips, on 2 or 3 frames on my timeline what will be the impact on speed of application (in mobile afcourse).For example MovieClip2 will be put on frames 2,3 and 6.It has 300 lines of code. Is the impact noticable ?

View 3 Replies

ActionScript 3.0 :: Accessing MovieClips In A Different Timeline?

Nov 20, 2010

everyone comes across when switching from AS2 to AS3. I have two movieclips (on the same timeline)- character and walls. on the timeline inside walls, I want to access the x and y coordinates of character. How can this be done without the convenience of _root or _parent?

View 1 Replies

ActionScript 2.0 :: Depths Particular To Timeline Of MovieClips?

Feb 3, 2005

Are depths particular to the timeline of the movieclip you refer to it? In other words, let's say you have actionscript to duplicate a movieclip 100 times, each time putting the new one on the next depth. But the code and the movieclip to be duplicated are themselves inside a movie clip. Are those depths inside that movieclip? So for instance, let's say the parent movieclip lies on the maintime. And on a layer above that is a button. Are those duplicated movieclips going to be visibly above or below the button?

A tangible example:
I would like to have a smoke/steam effect that uses duplicateMC and depths. But I need the effect to be underneath other movieclips at certain times. Can I just contain the effect inside a movieclip that sits on a layer below other movieclips on the maintimeline? Or do I need to stop the effect and do a swapdepth with whatever the last depth was?

View 7 Replies

ActionScript 2.0 :: Animated MovieClips On A Timeline?

Aug 8, 2006

I have a series of thumbnails that I have made into movieclips so that I could animate them. I have named all the instances. I have a main jump page to go to a particular picture. Each picture has a set of thumbnails (movie clips) that are animated on each. When I built it, they work fine by themselves, but when I created my "jump page" the smaller thumbs lose their overstate and onRelease. My actionscript loads on the jump page and to a frame that I request with no problem, but. Why is my actionscript not working?

stop();
mike.onRollOver = over;
mike.onRollOut = out;
mike.onRelease = down;

[code]....

View 1 Replies

ActionScript 3.0 :: Controlling A Movieclips Timeline From Within Itself?

May 14, 2010

How do I control the timeline from a movieclip from within itself?I made a menubutton for a school assignment. To make it, I created a movieclip of the button's graphic, with on the second frame the button again but with the menu open (haven't added anything in it yet).Opening the menu is as easy as

Code:
menu_mc.addEventListener(MouseEvent.CLICK,openMenu);
function openMenu(evt:Event):void{

[code].....

View 4 Replies

ActionScript 3.0 :: Controling Resizing Of A Swf From Another Swf

Jul 25, 2009

I'm trying to build a site where all the pages are full browser and maintain aspect ratio. I would like to control the resizing from the menu page.The resizing works fine from the page that's being resized but when I try to let the parent swf do that it has issues. Here's what the home page looks like with the controls built in URL...This example is the site it has a menu page that I open the others from I remove the resizing code from the home page and try to resize from menu.swf.[code]

View 4 Replies

ActionScript 3.0 :: Controling An External Swf

Mar 30, 2010

I have a site that presently has a preloader @ the beggining but takes too long to load everything. The main section has a sliding menu that triggers various movies containing photos and animations I have decided to extract all of the project items as SWF files and call them when required.The challenge I now have is that previously when an item was selected from from the menu it would send the play head to a new frame that had the the movieclip; this movie had an instance name which enabled me to use the 'close' button embedded in it and send the play head back to the sliding gliding menu.[code]

View 4 Replies

ActionScript 3.0 :: Controling External Swf?

Dec 4, 2005

I have main swf that uses DocumentClass to which I loadanother swf that uses its own class.In main movie there are coupleof buttons that I want to use to load different xml files forexternal swf. When I tried a few suggestions from this forum I got thiserror:

Error #1034: Type Coercion failed: cannot convert
Classes::SlideShow@3a49f239 to flash.display.MovieClip.
at Classes::DocumentClass2/onTravelClick()

View 3 Replies

Variables Within Movieclips That Control Main Timeline?

Aug 26, 2009

I built my website on the main timeline with a fade in animation...stop(on the page) and a fade out animation. At the end of this fade out animation i would like it to call upon a variable to know what page to go to next.I am trying to tell my main timeline to gotoAndPlay a frame based off of a variable within a movieclip(about_mc this movieclip contains another movieclip which acts like a button(factsheet_mc)) that i have set in my main timeline.I set the variable with:

var buttonFrame; in the first frame of the main timeline

then within my movieclip i have another movieclip which tells my main timeline to play the out fade and remember a variable:

this.onRelease = function(){ --------"this" meaning the movieclip factsheet_mc------------ [code]........

View 1 Replies

ActionScript 1/2 :: Timeline Continue When All Movieclips Are Visible?

Feb 23, 2010

I am looking to have the timeline continue (gotoAndPlay basically) when the movieclips in the frame are visible.I'm trying to make a simple game where the user clicks differences and they (movieclips) are made visible in a table of discovered differences.When these movieclips are visible, the timeline should continue to the congratulatory frame.I was given the following code:

if(mc1._visible && mc2._visible && mc3._visible && mc4._visible){
somemovieclip.gotoAndStop("someframelabel");
}

I have replaced 'mc1' .etc with the instance names of the table entries recording what differences have been found. However, I don't know where to put this script (i assume it's on the frame where the movieclips become visible when differences are clicked). In addition, what do i replace 'somemovieclip' with?

View 7 Replies

Professional :: Call Movieclips From The Main Timeline?

Jul 24, 2011

how to create .as file and how to link it with flash? another question is can anyone teach me on how to create main timeline and also how to call movieclips from the main timeline?

View 3 Replies

ActionScript 3.0 :: Slider That Controls Movieclips Timeline?

Apr 29, 2010

I want to control some movieclips animation using a slider. I have this code for a custom slider, but I don't know how to link the track of the slider with each movieclip timeline.

ActionScript Code:
var bounds:Object = {left:98, right:449};
var currentX:Number = thumb.x;

[Code].....

View 2 Replies

ActionScript 3.0 :: Controling The Turn Of Action?

Dec 30, 2008

controling the turn of action.

Example: i moved an object a certain distance. once it reaches a distance then it stops.i want to have a button; when you press will allow you to move the object again for the same distance.(what is code to do mthat).....then will need press button to allow it to move again.

View 8 Replies

ActionScript 3.0 :: Controling One Flash Movie With Another?

Nov 11, 2011

For example: I have a graphical interface created in Flash AS3 which is simulating the control of machines on the ocean floor. I have 3D animations that will animate what is happening on the ocean floor when a control element is activated on the graphical interfaceAt the moment I have this happening all in one Flash player window that has been made to look like two windows. One which is the interface...one that is made to look like a small screen showing what looks like video coming in from a camera on the ocean floor.

What I need to be able to do is have the Control Screen as one window, and the animations to appear in another. In this way we can set up two monitors, have the control screen on one (computer monitor), the animations playing on the other (a large plasma connected to the same computer). The animations need to play within a flash shell and the control screen would need to play in a separate shell. So in essence I need to be able to double click on an .exe....two screen will activate showing one screen with buttons that port animations into the second screen which I have positions to play on the larger screen.

View 3 Replies

ActionScript 2.0 :: Controling Separate Swfs?

Mar 8, 2006

ok so i need 2 create one movie that controls a second movie, so i have movie1.swf with a back and forward, and i need them buttons to advance movie2.swf, which is essenialy just a slide show!the movies will run independantly of each other, i do not want to load movie2.swf in movie1.swf! get me?how i go about this, i have been told of listeners, so movie2.swf will listen for a true or false command before it advances on... and movie1.swf will send out the command when the next is pressed??

View 5 Replies

ActionScript 2.0 :: Controling MC Time Line?

Jun 14, 2006

I am wanting to control the timeline of a MC using AS. What I mean is when I click on a movie click and drag right it controls the reverses the MC and when I go left it plays it (but i only want this to happen when I click and drag).

View 7 Replies







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