ActionScript 3.0 :: Add Multiple Sounds At Random To Single Action / Movie Clip?

May 24, 2011

I am currently working on an assignment that requires me to add sound to a mobile game. This is fairly straightforward in many ways but I wondered if there was any way that I could add multiple sounds to a single movie clip or action?

What I really want to do is to have say three or four different sounds for the sound of a spaceship exploding in the game to create variety and stop the gamer getting bored of the same sound every time they hit a spaceship.

View 9 Replies


Similar Posts:


ActionScript 2.0 :: Controlling Multiple Movie Clip Location Using Single Function?

Sep 20, 2007

I need to write a function which should fix the location of the movie clip on the stage.

public function setCoOrdinates(xpos:Number,ypos:Number,movieName:S tring):Void
{
eval(movieName)._x=xpos;
eval(movieName)._y=ypos;
}

My function is as above. While I use this function in flash I only see the last movieclip on the stage which was passed. Movieclips passed earlier seem to have disappeared from the screen.

setCoOrdinates(20,200,"bButton_mc");
setCoOrdinates(530,100,"fButton_mc");

I see only "fButton_mc" on the stage. Even though I set different xpos and yposs for the movie clip.

View 1 Replies

ActionScript 3.0 :: How To Use Multiple Sounds To Play A Single Mp3

Jan 22, 2009

I have figured out how to play a sound with AS3, but i cannt figure out how to use multiple sounds. to play a single mp3, i am using this:

Code:
//number that is redefined when the pause button is hit
var pausePoint:Number = 0.00;
//a true or false value that is used to check whether the sound is currently playing

[Code]....

but what I need to do is have 4 different mp3's, each with its own stop & play button, so the user can play any file they want. These are voice over reels, not music, so each needs its own set of buttons.

View 1 Replies

ActionScript 2.0 :: Add Action Script Code For Multiple Frames Movie Clip?

Sep 11, 2009

This seems a very basic question, but googled for long time... I have a movie clip, at Frame 3 there is only one line of code: stop(); My question is: how can I add it through AS? The instance name is my_mc, more specific, how to refer to the Frame 3 of my_mc?

Another question is the same. The movie clip has two frames, frame 1 is blank, at frame 2 there is a button. After attachMovie, get my_mc, trace my_mc, it is there, trace my_mc.my_button, it says undefined. How can I refer to my_button at frame 2? Then I can define onRollOver function for it.

View 4 Replies

ActionScript 3.0 :: Flash Multiple Sounds On Single Frame?

Aug 18, 2010

I have two buttons on a single frame that each play seperate sounds when clicked though actionscript is throwing up this error and I have no idea how to fix it.

1151: A conflict exists with definition snd in namespace internal.
1021: Duplicate function definition.
Warning: 3596: Duplicate variable definition.

[Code].....

View 2 Replies

CS3 :: Multiple Buttons Run Single Clip?

May 16, 2009

What I have done:

1/ A very simple Flash movie

2/ 5 very basic rollover buttons

What I want to happen:Everytime I'd hover the mouse on each button, I would like the background animation to run. And have the animation stop on mouseout for each button.I was able to make it on one button via this tutorial: [URL]But this doesn't seem to work with multiple buttons involved.

View 1 Replies

ActionScript 2.0 :: Add Multiple Sounds Of Movie?

Nov 11, 2005

im am using this script in my current movie to attach sound using acttion script it also has a stop/start button but i need to now how to add multiple sounds in this way.

[Code]...

View 2 Replies

Flash :: Created Multiple Movie Clips And Then A Single Big Movie?

Jun 21, 2011

I'm having some trouble following this (link) tutorial. I'm new to flash, so please bear with me.

In step 1 of this tutorial, we have created multiple movie clips and then a single big movie clip(including all the movie clips).

In step 4, I'm not able to access the properties of the clips we created earlier by using the following code, like in the tutorial.

[Code]...

View 3 Replies

ActionScript 3.0 :: Stop A Single Movie Clip In Flash And Other Movie Clips Still Looping?

Nov 22, 2010

how to stop a single movie clip in flash and other movie clips still looping. I tried stop(); and myclipname.stop(); both are not working. I attached a simple file,

View 0 Replies

ActionScript 3.0 :: Separate Sounds In Each Movie Clip?

May 2, 2010

stop();
function a(event:MouseEvent):void
{[code].........
 
I have separate sounds in each movie clip, which is what these buttons lead to, but it plays them all at the same time.

View 1 Replies

ActionScript 3.0 :: Control Sounds In A Movie Clip Using Buttons?

Nov 16, 2010

I have five audio clips that need to be played when their corresponding button is clicked, but need to be stopped when the same button is clicked or when another one is clicked and when the user clicks out of the movie clip to get back to the main interface.

So far I've been trying to tinker with this:

var sound1:Sound = new Yield();
var mySoundChannel:SoundChannel;
numberThree.addEventListener(MouseEvent.CLICK, clickThis);

[Code].....

View 3 Replies

ActionScript 1/2 :: Single Droptarget For Multiple Movie Clips?

Aug 19, 2010

I have a movie clip which i use as a drop target. And I have four additional movie clips which can be dragged and dropped into the droptarget movie clip. But when I place a movie clip into a droptarget and I drop the second one too, the droptarget for the second one becomes the first movie clip but not the actual droptarget movie clip.

View 3 Replies

IDE :: Tween Multiple Movie Clips Within A Single Layer?

Aug 26, 2009

i want to have two different tweens on different movieclips within same layer...but what happens is..it groups both the mc into a single graphic...and applies tween for the entire graphic..and also i loose the Mc instance.

how can i achieve diff tweens on diff objects within a layer? More important is dont want to loose the MC instance

View 3 Replies

Actionscript :: Way Of Combining Multiple Flash Files Into A Single Movie?

Aug 24, 2010

I have 8 flash movies, each with 3 scenes within each one.What is the most effective way (by which I mean, takes the least amount of time to implement and produces a file without each and every object used in the library) to combine these 24 scenes into a single flash file so that they play consecutively and can be exported as a single SWF?EDIT: I know there is a method whereby you select all frames in each scene and convert these frames to a movie clip, however the main document then inherits all the objects from each MC in its library- this seems a cluttered approach. Is there a better way?

View 1 Replies

Professional :: Preloader Based On A Single Movie Clip?

Jan 6, 2010

Is there a way to have a pre-loader based on a single movie clip, instead of on the entire SWF size? This movie clip may have a single graphic, but the entire movie has a slideshow with more images to display...but rather than making my visitor wait for the entire site to download before they see anything, I'd like to have it so when that graphic is loaded, it displays while the rest of the movie finishes loading. And there would be a preloader that shows the progression of the single movie clip.

View 3 Replies

ActionScript 3.0 :: Random Animation + Random Sounds + Background Music?

Feb 19, 2012

A background music looping in the back, that starts with the opening of the swf and never stops. I think I achieved that with this bit of code :import flash.media.Sound;

import flash.net.URLRequest;
import flash.media.SoundChannel;
bg music[code].....
 
Finally I need to jump from frame to frame randomly to play various animations. For example :Project starts, background music starts playing, we hear random sounds played one after the other, while some animations can be seen on screen, playing in a random order.

View 9 Replies

ActionScript 1/2 :: Stop Action In Movie Clip?

May 21, 2010

I have a simple movie clip that animates some text and a divider bar. The clip loops which is normal, I want to add a stop action to stop the loop.I have three layers; text, divider_bar, and actions. On the actions layer I placed stop();  on the last frame. This stops the movie clip just fine. But if I rewind and play it again the movie clips stays on the last frame and wont restart. I'm using Action script 2 and have even tried using as 3 with out any luck.

View 3 Replies

ActionScript 2.0 :: Movie Clip (with An Action) As A Button

Mar 15, 2010

my movieclip doesn't behaves as a button when i try to use this

[Code]...

i want my movieclip to behave as a button and at the same time to load a page after clicking on it (this code loads a page and i cant delete it and use another.i just can add something into it to make this movieclip move.)

View 5 Replies

IDE :: Jump A Movie Clip With Action Script?

Jul 7, 2009

I want to Jump a Movie Clip When I pressed a Control Key. What will be the code.

View 3 Replies

ActionScript 2.0 :: Load A Random Movie Clip From The Library To An Empty Clip On The Stage Called (bg_graphics)?

Oct 20, 2004

I want to load a random movie clip from the library to an empty clip on the stage called (bg_graphics). the clips in the library are called (green, blue, yellow).

View 5 Replies

ActionScript 3.0 :: Removing Thats Swf That Is External Thats Is Inside One Single Movie Clip?

Nov 17, 2011

I want to gain knowledge outside of the class.I have 4 buttons that each load different external swf and load properly the probelm i have is i cant remove them. this is my trouble. I have tried the remove child but it cant be that easy and it doesnt work. i must be going wrong.when i go to remove one single child it remove the the latest child but wont remove every child that i want so the MC is clear and ready for the nest button to load the swf.heres my code so far.

Code:
import flash.events.MouseEvent;
import flash.media.SoundMixer;

[code].....

View 1 Replies

ActionScript 3.0 :: Externally Loading SWF Into Position On A Single Movie Clip?

Jan 3, 2008

I realize that title sounds a little confusing, but what I am trying to do is copy this style of site[url].... I have created all of the swf's for the main index of the site, but am way out of my league on how to load them into a certain position in a single movie clip so that a drag bar can slide the movie clip left and right. I have read a few posts on external loading, but am not really sure on how to implement them to achieve this look.

View 9 Replies

ActionScript 2.0 :: Changing Properties Of Multiple Movie Clips With 1 Action?

Jan 14, 2010

you'll notice on their main page, when you roll over section "living" all movie clips below which are "living" projects are highlighted, while others are faded out.I have a vague notion that this is done by creating a series of arrays, one for living, one for learning, one for working, etc etc etc... and then changing whole sale all MC's contained in those arrays upon roll over.First of all, am i correct in this assumption? If so, i really need some pointers to get started. Say i want to define these arrays, and on the press of a button, one directs its movie clips to change alpha to 50, and the other to 100. All of these movie clips by the way are visible on the stage.

Code:
var High = new Array();
High[0]=mc_pAICM;

[code]......

View 9 Replies

ActionScript 2.0 :: Load A Movie Clip In A RollOver Action?

Nov 23, 2011

I am trying to load a movie clip in a RollOver action inside another movie clip, but I have 2 problems:

1. If I do it with loadMovie("movie.swf") I cannot go back to my previous instance when the movie stops playing, but if I do it with the loadMovieNum("movie.swf", 1), it gets back to the previous instance, but it leaves that instance behind, so it keeps appearing all the time on the back.

2. Even though I see the swf when I publish it from Flash, when I insert the swf in Dreamweaver, I cannot see the swf that I loaded in layer 1. I only see the first layer and nothing happens when I RollOver.

View 1 Replies

Actionscript 2.0 :: Action Script Instance In Movie Clip

Feb 11, 2009

I'm trying to get a button that I made, which is in a different movie clip, to change the video in the video list.[code]The button instance name is "v1btn" and it's in the movieclip instance name "menuBtn"

View 11 Replies

ActionScript 3.0 :: Same Button On Single Frame To Display/hide Movie Clip?

Jul 2, 2009

can a button on a single frame be coded to both display a movie clip on its first click and, after a second click, hide the movie clip?

View 3 Replies

ActionScript 2.0 :: Playing A Movie Clip In Forward And Reverse With A Single Button?

Oct 5, 2010

i am new to this site and also to AS i am trying to create a an expand and collapse functionality in which i want a movie clip to shrink and disappear when i click on a button and reappear when i click it again the solution that i came up with was i animated the movie clip shrinking and disappearing and now i think playing the timeline in reverse will solve the other half and i also added the stop script at the 1st and last frame of the movie clip.

i tried a lot and a number tried and tested the no of scripting techniques posted on other threads

View 9 Replies

ActionScript 2.0 :: Movie Clip Action Won't Work With Main File

Dec 8, 2009

I am not sure what is the difference between externally and dynamically loading pages, but I have created swf files for each of my pages and then a main page that those swfs get loaded into. The problem I am having is: I have transitions between my pages and my movie clip will animate when it is in the page swf, but not when it is in the main file.

View 0 Replies

ActionScript 2.0 :: Sending An Action To A Movie Clip From A Keyframe On A Different Timeline?

May 12, 2005

I am making a thing on my flash animation with a 3d planet spinning. When you move your mouse over it the planet will stop and contact info comes up, and when you rollOut the planet continues spinning and the contact info fades away. I have everything working but i cant get the planet to stop spinning when i do this because the button controls the fade but the planet is just spinning in the backround, hard to explan. Anyways i need to be able to send a stop and play action to the planet movie clip behind the button to stop. i need to send an action from Scene 1>universal>destinationclip>world. from a keyframe on the destination clip.

View 2 Replies

ActionScript 2.0 :: Button Action Not Working To Control A Different Movie Clip Timeline?

Jan 13, 2009

I have a button action not working to control another movie clip timeline. The movie clip timeline I want to control has an instance name but for some reason it's not playing. The button is on a different movie clip timeline. Both movie clips are on Scene 1. I think there is something wrong with my target path?

on(release){
_root.insMcWorkNav.gotoAndPlay("lbWork04");

insMcWorkNav is the movie clip, lbWork04 is the frame to play

View 5 Replies







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