ActionScript 2.0 :: Controlling Movie Clip Speed From Root?
Mar 2, 2010
In my document I have my actionscript on Layer 1. In this I duplicate an enemy movie clip.The controls for moving the enemy are inside the enemy movie clip, so setting speed, where to start from etc.On the Layer 1, I also run a script which acts as a timer, and when it reaches set values (eg. 10 seconds) it "levels up" (basically just changes background colour). I wand this to increase the speed of the enemy movie clips so that they get faster. I have this code:
Actionscript Code:
for(i=1;i<=enemies;i++){ _root["enemyRight"].duplicateMovieClip("enemyRight"+i,i+1000,enemyRight);
[code].....
View 2 Replies
Similar Posts:
Mar 15, 2007
I'm trying to control the exponential speed of the attached movie clip with AS but don't know where to start.I want the words to scroll through slowly at first and over 4 seconds the speed increases until they are all a blur.
View 2 Replies
Nov 18, 2008
I'm trying to control the root timeline from a movie clip. On the last frame of the movie clip, I have:
MovieClip(root).gotoAndPlay (10);
which successfully brings me back to frame 10 on the main timeline. However, from here, none of the ActionScript that is on Frame 1 seems to work... the rollovers aren't working, except on those embedded in a separate movie clip.
View 2 Replies
Nov 4, 2009
I have on my main timeline a movie clip (emptyMC) that I am loading my external SWFs into and I need to be able to access this loader movie clip from my menu, which is it's own movie clip. As it stands, when I have my buttons on the main timeline I have no issue. But once I put these same buttons into the menu MC I am lost as to how to "get back" to the loader on the main timeline to load and unload the external SWFs.Here is my current code that allows for me to load and unload with buttons on the main timeline. Is there away to modify this same code for my purposes?[code]
View 0 Replies
Mar 9, 2009
I'm just trying to find the right action scrip for instance on my button to control the movie clip it is within.I have currently tried..
on (press) {
mc_lexisnexis_main.gotoAndPlay(2);
}
[code].....
View 4 Replies
Apr 16, 2010
I press a button and have an object (a movie clip) move onto the stage - that works ok.When that movie clip gets to a certain spot, I want it to stop - that works ok.I want to be able to press the button again and have it leave the stage - that works ok.Then if I press the button again, it will come back on the stage again - that works ok.when it stops on the stage, I want a part of it to animate just once. I've been trying to do this by putting a second movie clip inside of the first, but it won't work.
View 4 Replies
Jan 30, 2007
I made a movieclip to put the blocks(which are movieclips too) in a breakout clone.lets give the container movieclip the instance name "container"the blocks are preset in that container with their own instance names...what I want to do is a hittest with those blocks but I found out that.[code]
View 3 Replies
May 2, 2010
Is there a way I can speed up one particular movie clip in my project? I've tried changing the frame rate, but obviously this changes the frame rate for the whole project which isn't what I want.The current project frame rate is 20fps, and I need this one movie clip to be running faster at say 30fps.Is there a way I can perhaps achieve this using Actionscript 2.0?
View 4 Replies
Mar 30, 2009
I have a looping movie clip and want it to speed up when the mouse rolls over one of the ends. Is there and action script that will do this? Or a different way to get it done? I faked it by making two movies with different number of frames but when you load that movie it starts over and it looks stupid. I have the scrolling animation on the site but want to put that effect on it. Click the first box after the intro to see the animation at the bottom(line of trucks) http:[url].....
View 1 Replies
Sep 3, 2009
I am trying to increase the speed of a movie clip by using a slider. Can someone point me to some information on how to do this? I found this but am not sure my version is picking up the change in frame rate accurately
View 1 Replies
Apr 11, 2009
I have a button inside a movie clip that when pressed it launches another movie clip. That part works great. The problem I'm having now is either removing the original movie clip or at the very least making it invisible when the next movie launches. So far for my button script this is what I have:
onRollOver=function(){
this.gotoAndPlay("_over");
};
onRollOut=function(){
[code]...
View 3 Replies
Dec 6, 2005
I am trying to do up the framework for a flash project which has a transistion fadein and fadeout whenever it loads a new content but faces no result. How is this done? I have created fade in and fadeout as movieclips. Is there any script that I can use in my fadein movie clip that tell the root frame to jump to another frame?
View 3 Replies
Feb 22, 2010
I've got a list of links nested in a movie clip named "link_list_mc", and I've got a movie clip that simulates a radio equilizer nested in another movie clip namedcentral_control_mc".Both mcs are directly on the stage. As you can see I can reproduce the music of my links but I cannot put to play the movie equilizer. My question is, how could I send an order (like in this case: stop() or play()) to a movie clip from another movie clip?.Ive beensing:root.central_control_mc.equilizer.stop()parent.central_control_mc.equilizer.stop().t neither of them seem to work.This is the code in the first frame of my nested movie clip "list_links_mc".
Code:
var mySecondChannel:SoundChannel = new SoundChannel();
//click_cl01_al01.addEvent..."click."..click_cl01_al01
[code].....
View 2 Replies
Sep 16, 2009
I have a movie clip and at the end of the timeline I have an action where it stops. Then I want it to play another movieclip on the stage that is stopped. My code is:
stop();
_root.narration.play();
But when I try it doesn't work.
View 1 Replies
Mar 1, 2008
When a movie clip is clicked on, another movie clip will fade out.The problem is that the clip that needs to fade out just disapears in a second, is there a way to controll the speed.I read a lot of info about this for complicated setups, is there a simple fix for this.I was hoping I could just do this designR_mc._alpha = 0/4;But that does not work.HERE IS THE CODE
design_mc.onRelease = function()
{ designR_mc._alpha =0;
}
[code].....
View 4 Replies
Jun 16, 2005
I have instances in my movie layed out as such
_root contains
[sliderX] which contains
[holder]
Where X is a number from 1-500 inside [holder] is a button that when pressed should load an image into new browser (does this fine) then move the main movie to it's next scene. this is when it fails. I have tried
[Code]...
View 1 Replies
Oct 1, 2007
In Flash CS3 using Action Script 3, how can I tell the main timeline to gotoAndStop(); a certain frame from within a movie clip.
I have a menu (which is a movie clip) with various buttons. Each button corresponds to a certain frame in the main movie. So if a user click on Button1, it should gotoAndStop(1); and Button2 should gotoAndStop(2); and so on.
In Action Script 2, I could use _root.gotoAndPlay(2); from what I understand, but that does not work in Action Script 3.
View 9 Replies
Nov 12, 2009
how to attach a movie clip to the stage or root. I have created a movie clip called movClip and have checked export for actionscript and have chosen "movClip" as its class.I have used this script:
ActionScript Code:
function button1(evt:MouseEvent):void {
var mc1:movClip=new movClip();
mc1.x=0;
[code]....
This attaches the movie clip. Great! Problem is it doesn't attach the movie to the root or stage, but rather as a child of this function?? weird! so when I want to use removeChild(mc1) from a different function from a different button or even from an action set on a different timeline it can't target mc1?So how do I make this work. Basically I want one function from button 1 to attach the movie clip and I want a second function from a second button to remove the movie clip.
View 4 Replies
Jun 9, 2009
What the best way to access the root timeline from in a movie clip?
View 3 Replies
Aug 5, 2008
I've created a main page with my main links on top, and a container as my body.I load my pages with this action to the container.
on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = "production";
container.loadMovie("production.swf");
[code]....
Inside the production.swf files I've created a gallery with a MovieClip that loads from my library to a container1 inside the production.swf. In the galleryMC(from library), Ive created a close button to unload it from the container1. It works fine from my production.swf file, but when it loads to the main page it doesn't unload. This is the ActionScript that I have to unload the Movie Clip.
on (release) {
this._root.container1.unloadMovie();
}
View 2 Replies
Oct 21, 2009
How can i access a function, from the root, that is inside another movie clip?
_root.mc_1.mc_1_1.mc_1_1_1
Inside of the mc_1_1_1 is a function called test_me.How can i call that same function from the root?
View 1 Replies
Oct 12, 2009
Just need to figure out how to pass root level variable to a movie clip which contains a dynamic text box to display the passed variable. How is this possible? I usually use global variables when i was coding in AS2...but it appears this feature is dropped in AS3.
View 4 Replies
Jan 3, 2011
I'm trying to add an element to the scene on the root level, and when it is dropped within a specific movie clip area, it takes that element and puts it in the movie clip, thus allowing me to mask out the area.
Everything works fine when I add can.addChild(myBox); directly, but the element is not viewable on the root scene, since the movie clip is masked. Right now with the code below, the result is gives me is not good. It creates the element on the root level, but doesn't allow me to put it in the movie clip.
[Code]...
View 5 Replies
Mar 22, 2010
Problem:I have my main Scene 1.In that scene I have 2 layers.Layer 1 has a movie clip named ca.Layer 2 has a movie clip named tutorial.When a button is clicked in movie clip ca I want it to tell movie clip tutorial to gotoAndPlay("31")
I was using the code:
btn_ca.addEventListener(MouseEvent.CLICK,click01);
function click01(e:MouseEvent):void {
[code].....
View 4 Replies
Nov 4, 2010
I'm working from main.swf and I need to call another swf to display one of four flvs once the appropriate button is clicked.
main.swf = my main content
player.swf = contains mc_playMovie
mc_playMovie = embedded in player.swf and contains four frames, each with a different flv movie.
My code so far:
butDelmar_thumb.onRelease = function() {
createEmptyMovieClip("targetMC", this.getNextHighestDepth())
targetMC._x = 0
targetMC._y = 0
[Code].....
View 1 Replies
Feb 21, 2010
I am making a game were you create movieclips with a button and move them around using a function system. The problem is, I want to control all of the same attached version of that movieclip in the code. how exactly would i do that if the instance name changes every time I load it?
View 3 Replies
Jul 20, 2011
I'm at the end of my flash site creation and I would like to have the "mouse_down" keyframe in my movie clip to change the frame of my other movie clip displaying the content of the page. How would I go about a gotoAndStop() function to control a movie clip from another MC?[Code]...
View 1 Replies
Apr 18, 2004
The problem I have is when i select to move the movie clip, i can't get it to stop animating when i tell it to go to a certain place.
View 4 Replies
Oct 10, 2004
What is the best way or controlling one movieclip from anoither. Pretty much want my menu and contentas two separate files but of course i need to contol my content from the menu.
View 1 Replies
Oct 22, 2006
Does anyone know whether it would be possible to set a motion path for a movie clip and to have the speed of the tween set as a variable which can be increased or decreased by the user during the movie?
View 3 Replies