ActionScript 2.0 :: Controlling Playback Of Dynamically Referenced Movieclips

Mar 4, 2005

There is a nav section of just 2 buttons, one for the "previous step," and the other for the "next step."

Just to make it easier (or maybe not...) I've named all instances of my movieclips "mc1" "mc2" etc... And I've created ActionScript that notes what "page" you're on, and using a for loop, makes the movieclip that corresponds to the current page (page #2 >> mc2) visible while at the same time making every other movieclip invisible. I've got all of that working properly.

What I need to fix is... Say you view the first step's movieclip, and you go on to the next step, but then want to go back to the previous step to watch it again... What you'll see is the last stopped frame of that movieclip rather than seeing the entire animation over again.

You'll be able see what it's doing in the code...

Code:
stop();
// Declare variables
pageNumber = 1;
maxPageNumber = 12;

[Code].....

I know that I can use setProperty to reference something like "mc"+i, but can I do the same thing with play()? Obviously "mc"+i.play(); doesn't work...

View 1 Replies


Similar Posts:


ActionScript 2.0 :: [FMX] Controlling Playback Of Dynamcially Referenced Movieclips

Mar 4, 2005

I'm basically making a step-by-step tutorial. There is a nav section of just 2 buttons, one for the "previous step," and the other for the "next step."

Just to make it easier (or maybe not...) I've named all instances of my movieclips "mc1" "mc2" etc... And I've created ActionScript that notes what "page" you're on, and using a for loop, makes the movieclip that corresponds to the current page (page #2 >> mc2) visible while at the same time making every other movieclip invisible. I've got all of that working properly.

What I need to fix is... Say you view the first step's movieclip, and you go on to the next step, but then want to go back to the previous step to watch it again... What you'll see is the last stopped frame of that movieclip rather than seeing the entire animation over again.

You'll be able see what it's doing in the code...

Code:
stop();
// Declare variables
pageNumber = 1;
maxPageNumber = 12;

[Code]....

I know that I can use setProperty to reference something like "mc"+i, but can I do the same thing with play()? Obviously "mc"+i.play(); doesn't work...

View 2 Replies

Flash :: Dynamically Changing The Referenced XML File In AS3?

Sep 28, 2010

Basically I have media being parsed and played by reference of an XML document using AS3. These media files are gonna be seperated into seperate XML files then what I was planning was to just dynamically change which XML file is being referenced. Problem is, the code only fires once on frame 2 and I can't seem to figure out how to switch out the XML file for a different one upon an event trigger. "new URLRequest [URL]" isn't working...do I need to reload a whole other string of code to change to a different XML document?

View 2 Replies

Actionscript 3 :: Controlling As2 Swf Playback

Oct 8, 2010

I am embedding a swf built in flash 8 into an as3 project. When I call stop() or gotoAndStop(0); on the MovieClip that represents an instance of the embedded swf it stops for a sec and then continues. Trying to call removeChild on the mc removes it from the display but the audio in the swf keeps playing. The swf, in this case must be embedded, I cannot use loader.[code]

View 3 Replies

ActionScript 2.0 :: Controlling Speed Of Flv Playback

Jul 13, 2007

Title says it all. Is this possible, in a dynamic sense?

View 3 Replies

ActionScript 3.0 :: Looping Sound And Controlling Playback?

Feb 1, 2009

I'm new to Actionscript and also new here. I've seen a lot of posts on this topic here and elsewhere, but forgive me, as I am having a hard time getting my particular Actionscript to work.

My goal is to have an external mp3 start playing by default, then continuously loop back to the beginning and play each time it reaches its end. All the while, I need to be able to play and pause the mp3 with buttons.So far, I believe I have everything working correctly EXCEPT for getting the sound to loop while retaining the functionality of my buttons.

[Code]...

View 5 Replies

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 :: Flash Record And Playback Movieclips

Dec 29, 2010

My goal is to make a replay function: I have to "record" 3 moviesclips movements for N seconds and play them back.Is there a library avaible to do it or a simple way ? Or do I need it from scratch?

View 1 Replies

ActionScript 2.0 :: MovieClips Playback Buttons On Main Timeline

Apr 21, 2010

I have a movie clip - it is a slideshow style mc, but instead of pictures, each frame is layers that include bulleted text, images, etc. - and it advances frames automatically with this code:
Code:
stop();
function wait() {
nextFrame();
}setTimeout(wait, 4500);

I need to set up a pause button that will stop the mc from advancing (i.e. ignore the wait function code above) and a PLAY button that will resume the auto-advancing of my movieclip. In my main timeline, I already have forward and backward buttons that work to advance/rewind frame by frame using this code:
Code:
stop();
//next button
next_btn.onPress=function(){
if(mc_content._currentframe==mc_content._totalframes){
mc_content.gotoAndStop(1)
[Code] .....
How to set up PLAY/PAUSE buttons that will stop/start all actions that are running in my MC?

View 4 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 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 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 :: 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 :: 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

Dynamically Controlling Many Instances At Once?

Mar 19, 2011

i am trying to control 30 instances of a movie clip dynamically. the instances are as follows

ship1
ship2
ship3

[code]....

coming from php i would just set up an associative array like list array('speed'=>array(false,false,true,...),'weapon '=>array(true,false,....and so on I can not for the life of me figure out how to store this information and then use it as a variable name later.my end result should look something like this .. i just don't understand how to do this in as3 .. it seems unnecessarily convoluted.

Code:

foreach($upgrades['speed'] as $key => $val)
{
UpgradeScreen.'speed'.$key.visible = $val);
this would dynamically call

[code]....

i know the above is incorrect.I want to create this so that it is completely dynamic and the instance names can be feed in dynamically as the array or whatever is being looped.

View 9 Replies

Actionscript 3 :: Change Video Playback Rate Dynamically In Flash?

Feb 10, 2011

I'm looking for a way to allow a Flash Video to change speed smoothly, from slower to faster than original framerate. It only needs to work on a Windows PC, and the latest version of Flash 10.2 with Stage Video is available.

View 1 Replies

Flash :: Controlling Sub-movieclips Of A Loaded SWF From A Loading Class?

Feb 4, 2012

I have a compiled swf File (lets call it "cat.swf") that is loaded via the Loader Class of my Main movie. The cat appears without problems. But inside cat.swf there are two movieclips defined (lets call em "head" and "body"), and I have ye to find a way to get control of these from my Main movie.

When I check for numChildren of the loader Object it only gives me back one (an unnamed instance), if I cast that as a Movieclip to check for deeper children it continues all the way down like a tower of turtles.

View 1 Replies

ActionScript 2.0 :: Controlling MovieClips - Separate Graphic With Tween

Oct 30, 2010

I'm having some trouble with the attached file, I've tried lots of things but just can't seem to control the movie clip. On click on 'Detailing' from the landing page a new slide *slides onto the stage 'content3'. Within this I have added a separate graphic with a tween 'gr_detailcopytest'. I want it to start only when it lands within the main stage's masked area. I also want the tween to stop too after its played out. I have tried adding a stop action at the end of the tween but this stops the tween altogether - Furthermore, when I click on another menu item and go back to 'Detailing' I want the tween to start again.

View 6 Replies

ActionScript 3.0 :: Same Set Of Buttons Controlling MovieClips In Current Scene

Mar 27, 2012

I'm just starting to learn as 3.0, and was having problem understanding the scenes, timeline (stage, root) and movieclips.

Basically now I have two scenes: S1, S2
S1 has one mc: round_mc ; S2 has one mc: rect_mc
And I have same set of control buttons: play, stop, prevFrame, nextFrame, prevScene, nextScene, gotoAndStop()

The control buttons worked with the round_mc in S1, but didn't control rect_mc when S2 is playing. Why same set of buttons doesn't work in all scenes. Should I have to assign a variable to detect movieclips on the current scene...

Code:
import flash.events.MouseEvent;
import flash.display.MovieClip;
prevS_btn.addEventListener(MouseEvent.CLICK, preScene);
nextS_btn.addEventListener(MouseEvent.CLICK, nexScene);
prev_btn.addEventListener(MouseEvent.CLICK, preframe);
[Code] .....

View 3 Replies

Actionscript 2.0 :: Creating And Controlling Arrays Of Movieclips At Runtime?

Apr 14, 2011

here's my code:

Code: Select allvar arrThumb:Array = new Array();
for(i=1;i<=10;i++){
arrThumb[i] = "thumb_mc"+i;

[code]...

THE CODE ABOVE DOES NOT WORK ,I want to create 10 moveiclips each with unique name, which I can move around or maybe load things into later. At the moment the trace returns 'undefined' so the movieclips aren't even being created.

View 2 Replies

ActionScript 2.0 :: Controlling Multiple MovieClips With One Button Click

Sep 28, 2007

I have a spreadsheet represented with three bitmaps within mcs. I'm using an mc with four directional buttons to allow scrolling (x and Y). The complication comes when I want the header to move on the x axis, but not the y axis. Also, I've got an mc with the row title column and I want that to move on the y axis, but not the x axis. This should be easy, but it is not for me. I've tried using an array, but with my onEnterFrame/incremental movement, how to break out of the onEnterFrame. I've also tried a function call as seen below. I can get things to move, but not quite right, tweaking only makes things worse. This one will move both of my mc's on the y axis, but only after clicking three times. The on the reverse trip, the mc moves jumps up and then increments correctly, only with that initial jump offset.

Let me show you my code (these variables are supplied by the loaded MC):
Code:
_level0.maxDown = -271;
_level0.stepY = 140.334;
_level0.maxUp = 150;
_level0.maxRight = -323;
_level0.maxLeft = 0;
[Code] .....

View 1 Replies







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