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


Similar Posts:


ActionScript 3.0 :: Controlling MovieClips Using Other MovieClips

Nov 20, 2009

Using Flash CS4 - AS 3.0

how to control a movie clip using a separate movie clip.

on scene 1 (2 frames long), i have 2 movie clips.

-bFind (24 frames long)

-textEffects (14 frames long)

i want to jump to frame 7 of the textEffect movieClip when i hover over bFind

i have my AS code in the first frame of the movieClip called "Bfind"

Code:
stop();
addEventListener(
MouseEvent.MOUSE_OVER,

[Code].....

View 5 Replies

MX04 With Movieclips Controlling Other Movieclips

May 5, 2010

I'm using flash MX 2004 Professional. What im trying to is the following: I have 9 movie clips, each has a "closed" and "open" state. Basically, when I click no.1 I want it to animate open, and then, when I click no.2, it must first check if any of the other clips are in their "open" state and if so, close them. I've worked with the following, but it doesnt seem to be working:

[Code]...

View 4 Replies

ActionScript 3.0 :: Controlling A Timeline W/in A Timeline?

Feb 15, 2012

Main_mc has a movie with a button movie and an animation movie. I want the button_mc to control my main_mc timeline. I want a btn when rollover play up to frame a and stop. Rollout play to end. If btn is clicked play and stop at frame a.

View 5 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

IDE :: Controlling Brightness Within Movieclips?

Nov 18, 2009

is there any way to control the brightness of a movie clip or button on mouse roll over so that it gets brighter when the mouse is on it? I could only find things for earlier versions of AS and i couldnt figure out how to change them..

View 1 Replies

ActionScript 1/2 :: Xml % Controlling Timeline?

Jan 25, 2010

Well, I have a project where I would need a XML with a % range from 0-100 to controll a timeline. The concept is to fill a bottle. So the timeline would animate from empty to full. But must be controlled with a XML number and its all in AS2...

View 18 Replies

ActionScript 3.0 :: Controlling SWF Timeline?

Nov 29, 2010

I never seem to get any answers on these forums lately but surely someone can answer this. I've loaded an AS2 based SWF in to an AS3 SWF. I want to gotoAndPlay a frame in the AS2 SWF when a button is clicked thats inside the AS3 SWF.

View 2 Replies

ActionScript 2.0 :: Controlling A MC's Timeline?

Nov 26, 2009

if its possible to control a movieclips timeline a bit more than the simple play, stop functions.

I was hoping by pressing a button, it would make the MC's playhead not just jump to frame 20, but play to it.

So if the movieclip's timeline is on frame 60, I press a button and it scrubs all the way back to frame 20. Click another button and it scrubs to frame 40, etc..

View 3 Replies

ActionScript 2.0 :: Controlling MC From Timeline?

Mar 27, 2004

I have a MC in my movie. I want to control it's properties in different frames in the main timeline. For instance

at the 1. frame change it's position
at frame 50 change it's alpha
at frame 100 change it's scale

until now I have done all this by motion tweening but I know AS is the best way.

View 3 Replies

ActionScript 3.0 :: Controlling Different MovieClips In Different Levels?

Feb 4, 2011

I have a movieclip on the main timeline with instance name "rpm_display". Inside that movieclip I have another movieclip with instance name "dial_graphics". My actionscript is on this timeline. The tween that uses "dial_graphics" drives "rpm_digital.rpm_counter.text" to compute a value based on the tween position of "dial_graphics".
 
I need to move the movieclip "rpm_digital.rpm_counter.text" outside of movieclip "rpm_display", but it will not work when its on the main timeline. I have tried having it on the main timeline and putting the actionscript there too using "rpm_display.dialgraphics", but this did not work...
 
should i use _parent? Not too familiar with AS3.
 
My CODE:
 
stop();
import fl.transitions.Tween;import fl.transitions.easing.*;import fl.transitions.TweenEvent;

[Code]....

View 9 Replies

ActionScript 3.0 :: Controlling MovieClips On Screen Via XML

Jul 15, 2009

I am trying to figure out how to control 3 movieClips on the screen via XML. I can successfully control one, but I want to control all 3 if the XML has the values.

Here is my code:
var ducks:Array;
var myLoader:URLLoader;
var i:uint;
var xPos:int;
var yPos:int;
var myXML:XML;
[Code] .....

I think I would need to create some sort of list for each specific node (arrayPos, xPos, yPos, isvis) and then run a for loop so that each movieClips values get assigned properly. I have uploaded the .fla and XML for anyone who wishes to view it.

View 1 Replies

ActionScript 2.0 :: Controlling The Attributes Of Movieclips Through Another?

Jan 14, 2009

I have a beginner question, apologies for rusty language and incorrect references.I have 3 movie clips on the stage. Their identifiers are 'dim', 'bright' and 'source'. What I want to happen is when the user clicks on the 'dim' movie clip, the alpha of the movieclip 'source' is set to 20. So I tried to write the following:

onClipEvent(mouseDown)
{
_root.source._alpha=20;

[code]......

View 1 Replies

ActionScript 3.0 :: Controlling Nested Movieclips?

May 18, 2011

I have an animation of a spinning globe made from 2 maps placed back-to-back and a circular mask over them. The animation loops endlessly to simulate a spinning globe. This animation was made into a movieclip (globeSpin) which is nested inside another movieclip ontainer_mc). I want to stop the spinning effect when a user mouses over and start it up again when they mouse out. Code is below:

Code:
container_mc.addEventListener(MouseEvent.MOUSE_OVER, stopSpin);
container_mc.addEventListener(MouseEvent.MOUSE_OUT, startSpin);

[code]....

View 3 Replies

ActionScript 2.0 :: Controlling Movieclips With An IF Function?

Dec 6, 2003

I have created 3 movieclip buttons which have a total of 3 states eachUP, OVER and Pressed.What i am wanting to do is create a fuction that will change the state of an already pressed button back to its UP state. For exampleButton one is press and will stay in its state untill button 2 or 3 are presses then it will revert back to its up state.My way of tackling the problem was to target a frame in the movie clip that I wanted to change such as this:

on (rollOut) {
gotoAndPlay("ee");
}

[code].....

View 5 Replies

ActionScript 3.0 :: Controlling Timeline With Buttons?

Apr 3, 2010

i have forward/back buttons to control the timeline. what happens in the following code is that if the button is clicked while in the < or > range of frames, it gets buggy. heres the code.

[Code].....

this doesnt seem to go to the exact frame i need if i click while the current sample is still animating in. It would be much better if i could tell flash to a specific frame instead of asking flash to determine a range. that way, if a button is pressed during an animation it wont just advance one frame, it would jump to a specific frame.

I wish i could just do this:

[Code].....

i thought about creating a var that would be a string. i could then add a number to the name of that string each time the button is clicked. then i could make frame labels the name of the string. but i couldnt get my head around it. also, i didnt know how to make the button stop adding to the string name once it reach a certain value (6 in this case). or how to make it play the last sample animation if the user kept clicking the advance button at the end of the samples.

View 1 Replies

Flash8 :: Controlling Timeline From A Movieclip?

Sep 1, 2010

So im creating a site for a friend and I have placed the menu inside a movieclip so the buttons are inside the movieclip. This the script i have tried :

Code:
stop();
natural1.onRelease = function () {

[code].....

View 1 Replies

ActionScript 1/2 :: Slider Bar Not Controlling The Timeline?

Nov 11, 2009

This time I'm attempting to make a timeline, that should control what frame of a movie clip on the root timeline is displayed. So relevant to where the user slides the slider bar, the appropriate information will be displayed inside that movie clip. Now I really have NO idea where to start the coding that will attempt to convert the slider's location on its on slider bar, to what frame is shown on that movieclip.

[Code]...

View 28 Replies

ActionScript 3.0 :: Controlling Timeline Of External Swf?

Jun 3, 2010

Just wondering how to control the timeline of an external swf loaded into the root of your main timeline, from within nested movieclips on your main timeline?I can successfully control it once it's loaded from within the function that assigns the external swf a MovieClip var, but I want to control it from deeper in my main swf.1. I've loaded an external swf into the root of my main swf.2. After loading, I assign the external swf a MovieClip var, and then set up a button to control the timeline of the external swf:
 
function dataOnLoad(evt:Event): void {
var myClip:MovieClip = evt.target.content;
function updateSwf(evt:MouseEvent): void{

[code].....

View 6 Replies

ActionScript 3.0 :: Controlling An Imported Swf's Timeline

Mar 9, 2011

I can't use the normal MovieClip methods on my imported swf.

Code:
package {
import flash.display.MovieClip;
import flash.events.Event;

[Code].....

I've tried waiting for the swf to finish loading

View 5 Replies

ActionScript 3.0 :: Controlling A Movieclip Timeline

Sep 3, 2011

I have buttons that load movie clips when you mouse over them and unload the movie clips when you mouse out.[code]the problem is that the movie clips aren't necessarily playing from the beginning when you mouse over, since their timeline is independent.How can i specify that I want to add the instance of the movie clip to play from frame 1.I've tried using the gotoAndPlay method with the frame number/ label in parenthesis afterwards and got an error message..I've looked through multiple tutorials on controlling symbols using AS, and i still can't get this to 'click' for me.[code]

View 3 Replies

ActionScript 2.0 :: Controlling Timeline From Button Name

Aug 2, 2004

I have a huge timeline with photos, each photo on a different frame, and several buttons, one for each picture on the first frame. My idea is to make a unique action for the buttons that tells the timeline to go to the frame number that is the same as the button instance name.

View 1 Replies

ActionScript 3.0 :: Controlling Timeline Of An Instance?

Apr 4, 2011

have a MovieClip that's called 'enemy1'. It is using a class called 'Enemy'. Is it possible to control my enemy1 MovieClip's timeline from the Enemy class?

For example I want to run an if check and see if current frame inside my MovieClip is currently 15. (I have animation inside my MovieClips)

When I do something like this inside Enemy.as:

Code:
if(this.currentFrame == 15)
{
this.stop();
}

I get error messages like: Line 271119: Access of possibly undefined property currentFrame through a reference with static type Enemy. Line 291061: Call to a possibly undefined method stop through a reference with static type Enemy.

View 9 Replies

ActionScript 2.0 :: Controlling Timeline From Button Name?

Aug 2, 2004

I have a huge timeline with photos, each photo on a different frame, and several buttons, one for each picture on the first frame. My idea is to make a unique action for the buttons that tells the timeline to go to the frame number that is the same as the button instance name.

View 1 Replies

ActionScript 3.0 :: Scroll Bar Controlling Multiple Movieclips?

Feb 22, 2010

Instead of a scroll bar just controlling one movieclip..How could we get it to control multiple movieclips?
 
public class MainScroll extends Sprite
{     
//private var mc_content:Sprite;

[Code].....

View 3 Replies

ActionScript 3.0 :: Controlling Multiple Dynamic Movieclips

Sep 25, 2009

I need to dynamically attach a movieclip from a library and then make it move across the screen.This is quite easy for one movieclip instance, but what I need is to have movieclips spawn at regular intervals then move accross the screen.[code]My question is, how do I continuously attach movieclips without making so many variables? Is my method of attaching even alright for this purpose?

View 2 Replies

ActionScript 2.0 :: Controlling Multiple Movieclips With One Button?

Jul 15, 2010

I'm working on a picture of cell phone, which I want users to be able to click on the number pad and have the numbers appear on the screen. Seems simple enough but I'm having trouble making the numbers appear in order just like phones in real life do. For instance, the screen starts with four *'s until "1" is clicked, then when the next number is clicked(let's say 3) I want the screen to display "13**" and so on.What I have is a movieclip with 11 frames (* and numbers 0 to 9), and 4 copies of them are each named p1,p2,p3,p4. They would be on the cell phone "screen" and display numbers clicked by the user. Then I have buttons acting as number pad with actionscript as follows:

ActionScript Code:
//for button "1"
on (release) {

[code].....

View 3 Replies

ActionScript 3.0 :: Controlling Multiple Levels Of Movieclips?

Jan 31, 2011

Background: Written a basic flash animation where a number of buttons control 8 signs, and each sign can have 3 different 'faces' There isn't one button per face, as each button can affect multiple faces. (i.e. button a changes signs 1 and 5 to faces x and y, button b changes signs 2 and 6 to faces q and z, etc)Each 'face' is made up of multiple 'sections', a bit like the rotating advertising boards or motorway signs, like this:(can't post links, don't have enough posts. Go to google images and search for this:rotapanel the_southit should be the first resultThis part isn't the problem, it works by having each 'section' as a separate symbol, and face symbols made of of either 4 or 5 of these section symbols. As the buttons are pressed, I hide and make visible the appropriate faces, and everything is good. The idea is that I can easily customise it later by switching out the underlying section symbols to update the whole thing, or create new 'faces' by combining the sections in different combinations. All nice and modular.

Now the problem: In order to try and make the thing look more realistic, I decided to animate the transition between faces by rotating the sections as vertical prisms (think of 4 or 5 toblerones stood on their ends, placed together to make a single surface. If you rotate them all about their centre points at the same time, you can create up 3 different 'faces').The animation is done and works fine, but the problem is controlling it. At the moment, each 'face transition' structure is this:

Face Trans. - Section Name(1) : Spin out animation: Static Graphic
________________________________Spin in animation: Static Graphic
____________- Section Name(2) : Spin out animation: Static Graphic

[code]......

View 1 Replies

ActionScript 2.0 :: Controlling Objects (Sounds) Across MovieClips

Sep 9, 2003

I have a few movie clips running swf's and I need a play/stop button in one clip to control the audio in another clip. The buttons are in the _root clip and the audio is contained in an swf I load into an empty 'content' movie. I have labelled the frame containing the audio but can't seem to use the object hierarchy to access it. On a somewhat similar note, is there a way to have the root movie display the bytes loaded/bytes total of a swf loading over top of the root movie, i.e. in a content empty movieclip?

View 1 Replies

ActionScript 2.0 :: Controlling MovieClips (SWF) In Same Level With Buttons

Mar 4, 2002

I have a movie (back.swf) and this calls into another (menu.swf, level20). I want to control the movie clips to the level0 with the buttons on level20. I do that but I can't control in a random order.
For example:
I press button 1 and play movie clip 1.
I press button 2 and play movie clip 2.
But if I press again button 1 don't play it.
And if I press the button 3 play the movie 3 but don't allow to return to the button 1 and 2.
Every movie clips are in level0.

View 1 Replies







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