Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 02-10-2009, 08:41 PM   #1
Registered User
Join Date: Feb 2009
Posts: 1
Default Interactive Sound Game

Hi. Apologies if this has already been covered it's just I’m not entirely sure what I need to do so was unsure of what to search for.

The game is composed of a scene that contains buttons that play different sounds when pressed. The user clicks a button, 'record', which records the sequence in which they press the buttons and they can then play their sequence back using a 'play' button.

I understand I need to use an array to do this but how I would go about this is what I am lost about. I hope I have been clear enough on my description and any help would be greatly appreciated.

LJD is offline   Reply With Quote
Old 02-10-2009, 10:45 PM   #2
Senior Member
neilmmm's Avatar
Join Date: Oct 2005
Location: dorset
Posts: 1,637

something like
var soundArray:Array = new Array();
var s:Sound = new Sound();
var counter:Number = 0;
var soundLength:Number = 0;
s1_mc.onRelease = function() {
s2_mc.onRelease = function() {
s3_mc.onRelease = function() {
clear_mc.onRelease = function() {
	soundArray = [];
function playSounds() {
	soundLength = soundArray.length;
	if (counter<soundArray.length) {
		s.onSoundComplete = playSounds;
	} else {
		counter = 0;
		delete s.onSoundComplete;
play_mc.onRelease = function() {
s1_mc.inner_txt.text = "sound 1";
s2_mc.inner_txt.text = "sound 2";
s3_mc.inner_txt.text = "sound 3";
clear_mc.inner_txt.text = "clear";
play_mc.inner_txt.text = "play";
Attached Files
File Type: zip play array of sounds.zip (89.6 KB, 73 views)
neilmmm is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[AS3] interactive game mabdog Gaming and Game Development 2 01-15-2008 07:03 PM
[AS3] Building Interactive Paint Game animatorjb Gaming and Game Development 0 10-18-2007 05:34 PM
drag & drop audio - slight problem :) whiteybags ActionScript 1.0 (and below) 6 05-31-2004 02:39 PM
event sound between scenes larussell Other Flash General Questions 4 07-24-2003 07:42 PM
help with sound!! uramis ActionScript 1.0 (and below) 0 07-09-2002 02:36 AM

All times are GMT. The time now is 06:44 AM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.