Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Targeting The Sound Object Plaese Help {very Frustrating}



I am having a little bit of a problem targeting a sound object.

The scenario is that a user can choose a track to listen to via a button on my main movie.

This button loads a swf using the load movie command.

On the loaded movie I want to have the sound controls but I can't get the targeting to work. I tested extensively using a simple "normal movie clip playing an animation and there was no problem, but the minute I changed the target to the sound object...no joy.

You can download the source files from:

http://www.siddhu.com/targetSound.zip

The folder "works" has the swf that works when it is not called and loaded by another movie.

The code on the button is:

on (release) {
mySound.start();
}



FlashKit > Flash Help > Flash ActionScript
Posted on: 09-28-2002, 10:31 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Targeting The Sound Object
I am having a little bit of a problem targeting a sound object.

The scenario is that a user can choose a track to listen to via a button on my main movie.

This button loads a swf using the load movie command.

On the loaded movie I want to have the sound controls but I can't get the targeting to work. I tested extensively using a simple "normal" movie clip playing an animation and there was no problem, but the minute I changed the target to the sound object...no joy.

You can download the source files from:

http://www.siddhu.com/targetSound.zip

The folder "works" has the swf that works when it is not called and loaded by another movie.

The code on the button is:

on (release) {
mySound.start();
}

The folder "bug??" has the loader file and the file to be loaded "soundTest2.swf".

I changed the code on soundTest.swf to:

on (release) {
_root.targetMovie.mySound.start();
}

The file "loadSoundTest" has a button which loads "soundTest2.swf", and has a movie clip called "targetMovie" used position "soundTest2.swf". Hence "targetMovie" being in the path.


Any assistance would be most appreciated since I have tried all sorts of targeting paths and I can't get it to work.

Ackk Help.. Problem With Targeting/level With Sound Object
i've got the main movie (main.swf) (in level0) and i am loading the movie holding the sound (sound.swf) into level3.

how i originally did it, sound.swf would run by itself from level0 obviously, but now that it is loaded on top of another movie into 3, how would i target that sound event?


this is the original actionscript.

sound1 = new Sound();
sound1.attachSound("sideaa");
sound1.start(0, 999999);


'sideaa' is the identifier for the wav file linkage


anyone have an anwser about this?? im lost and get hungry arrrghhhh

- aj

Plaese Help Dnt Know How To......................
Hi ive got a assignment due in on friday,

its on interface design so its mainly based on the appearance and usability. Its for an estate agent so that users can search for houses they are looking for.

So basically what i need to do is have the following:

drop down list boxes:

there needs to be a list box called no.of rooms which have the values of lets says 2, 3, 4

There has to be another another list box thats called type of houses and lets say it has the values of : detatched , semidetatch.

Now when you make a sellection from each of these there is to be a button conected to these to submit this informtion.

when submitted i need it to retive the informtion on the type of house available, this can be a line of text of the address displayed on screen and an image of a picture of the house.

Can this all be done within flash MX, if so please help, im not too familiar will require a step by step guide. Please help.

you can get me on osmaniz@coventry.ac.uk

pleeeeeeeeeaassse

Thanks

Frustrating With Sound
whazzzzzzzzzup...

im hoping someone can point me in the right direction...i have an issue with sound on my movie...i can play and stop the sound anytime, BUT when i stop the sound and press another button besides play on the timeline the sound plays....you can see the problem here: www.beatmanproductions.com

*i have added set variables (set("bg music", 1); when the sound starts...

*on the play button i have the below code:
--
on (press) {
set ("bg music",1);
tellTarget ("bg music") {
gotoAndPlay(1);
}
}
--

*on the stop button i have the below code:
on (press) {
set ("bg music",0);
tellTarget ("bg music") {
gotoAndStop(1651);
}
}
--

thanks
whitemotel

Targeting Object Properties Inside PopUp Object
In my project I am creating a window using the PopUpManager. The symbol used to create that window has several objects.

For the sake of discussion we'll discuss the object message_txt inside myWindow.

How do I reference message_txt.text from actionscript after the object is dynamically created?

[F8] Targeting An Object
I have been trying to figure out how the targeting works for the game "Bloons Tower Defense."

As the balloons pass the towers, the towers will shoot at them within a set radius. It will shoot at the balloons that are farthest ahead on the portion of track within the radius.

I know this is kind of confusing, but if you play the game you may get it more.

here is the URL:
http://www.ninjakiwi.com/bloonstd.html


Can someone please help?

Tween Object Targeting
Hi,

daft question but cant find an answers anywhere...

CAn you target 2 objects with one tween? something like:


PHP Code:



btnMove = new Tween (object1 + object2, "x", Back.easeIn, 190, 180, 10);




not the best example, but say for something like when you want several objects to fade out when you click on a certain button...

AS3 - Object Targeting Confusion
Last edited by enkriptid : 2008-06-07 at 07:49.
























So heres the situation.. i am trying to make a little menu with some movieclips are across the middle of the screen and have some simple behavior, basically the scale will increase as the mouse glides over them.. in an O.Sx genie fashion.. well thats the goal anyway, one hour at a time..

// Im having trouble with the following;
*Trying to get the scales to react;
*Figuring out how to calculate the distance from an MC to the pointer to calculate how the scale should react.. I understand the distance formula.. im just not sure if im implementing correctly for this situation because im only getting trace feedback when the mouse is over one of the clips which leads me to believe i need to add a listener to the stage.. or should i add a listener to both the stage aaand the movieClips??


Code:
// P.S. My naming is a little weird sometimes..
package
{
import flash.display.*;
import flash.events.*;


public class enuM extends MovieClip
{
private static const TOTALICONS:int = 8;



public function enuM():void
{
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;


for (var i:uint = 1; i <= TOTALICONS; i++)
{
var icon:Icon = new Icon(i);
icon.gotoAndStop(i);

icon.x = (icon.width * i) - icon.width/2;
icon.y = stage.stageHeight/2;
trace(icon.getiNum);
this.addChild(icon);
icon.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveSauce);
}
}

private function mouseMoveSauce(e:MouseEvent):void
{
trace(e.currentTarget.getiNum);
var selekshun:MovieClip = MovieClip(e.currentTarget);
var distanceX:Number = Math.abs(stage.mouseX - selekshun.x);
var distanceY:Number = Math.abs(stage.mouseY - selekshun.y);
var distance:Number = Math.floor( Math.sqrt((distanceY * distanceY) + (distanceX * distanceX) ) );
trace(distance)
}
}
}
i dunno guys ill experiment but any help would be pretty illmatic
Thanks in advance!

Targeting An Object Set Through Linkage - Flash MX
I have set up an object that is really just a movie clip to be scrolled through (using the scrollframe component) that contains links. But now I want to be able to target the movie clip to enable/disable the links within. For whatever reason, the following does not work when it is placed into the _root timeline:

links.retwo.enabled = false;

"links" is the name of the MC that contains, you guessed it, the links. "retwo" is the instance name of the button within "links" that I want to disable. Again, this is not an MC that is actually placed on the stage in the root timeline, rather an object that has been made using "linkage" and then called by the scroll component.

Can anyone tell me why this targeting of a linked MC is not working? Am I getting the syntax wrong?

Thx!

Targeting An Object Created In A For Loop
Hi all,

Please can you help? I am trying to create new sprites inside a for loop, I then want the sprite that I hover over to get bigger. At the moment all the sprites are scaling together and not just the one I hover over.

Im guessing it is because I am not giving each Sprite an different variable name but Im not sure how to do this inside a for loop. Does anyone know the solution?

Heres the code:


Code:

package com.edition.slideshow
{
import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;

public class SlideShowTest extends Sprite
{
public function SlideShowTest ()
{
for (var i:int = 0; i < 2; i++)
{
var hoverIndicator:Sprite = new Sprite;
hoverIndicator.graphics.beginFill(0xFF0000, 0.5)
hoverIndicator.graphics.drawRect(0,0,30,20)
hoverIndicator.graphics.endFill()
addChild(hoverIndicator)
hoverIndicator.x = 200 * i

hoverIndicator.addEventListener(MouseEvent.MOUSE_OVER, hoverHandler);

}
}

private function hoverHandler(event:MouseEvent):void {
this.scaleX = 2
}
}
}

Dynamically Targeting Properties Of An Object
Hi there, I have an object that has properties that are numbered numerically but I cant seem to access them dynamically. Can anyone help?
Thanks!



ActionScript Code:
var myObj:Object = new Object()myObj.p1 = 100;myObj.p2 = 200;myObj.p3 = 300;for (i=1; i<4; i++){tmp = ["myObj"]["p"+i]trace(tmp)}

Targeting MainTimeline Object From A Class
Hi,
I’m unsuccessfully trying to target Timer object created on MainTimeline from a class.

MainTimeline code:

Code:

var testTimer:Timer = new Timer(5000);
testTimer.start();

var myTimer:TimerTest = new TimerTest();
addChild(myTimer);
TimerTest code:

Code:

package
{
import flash.display.MovieClip;
import flash.events.Event;
public class TimerTest extends MovieClip
{
public function TimerTest():void
{
this.addEventListener(Event.ENTER_FRAME, targetMainTimeLineTimer);
}

private function targetMainTimeLineTimer(e:Event):void
{
//trace(this.parent.testTimer); how to target objects created on mainTimeline which are not in DisplayList ?
}
}
}
In attachment you have simple example.

Thanks in advance

Targeting An Object On The Main Stage From Within Another Symbol
Hello everyone, hopefully someone here can help me with my current dilemma. I have a movie symbol with a button inside of it and I have an event set on the button which checks to see if the mouse is over it. What I' m trying to do is have that event target another movie clip that is on the stage. How would I go about getting access to the instance of the movie clip on the stage from with the other movie clip?

Event Listener Targeting Wrong Object?
I've got a simple loop through xml and assign values to a clip from library scenario. my clip is called 't' and i assign it an eventListener for mouse click like this:


Code:
t.addEventListener(MouseEvent.CLICK, mcClick);
then later i define that function 'mcClick':


Code:
function mcClick(event:MouseEvent):void
{
trace("target: "+event.target.toolTip+" / "+event.target.url+" / "+event.target.action);
}
trying to trace out vars that i assigned in my initial xml loop and i get this error:
Quote:




ReferenceError: Error #1069: Property toolTip not found on flash.display.Loader and there is no default value.
at inAS3_fla::MainTimeline/mcClick()




This error occurs regardless of which variable i try to trace out.

looks like my event is not actually targeting my attached clip huh? Where have i gone wrong?

Targeting Sound
i have a flash file (the main interface) and in loading an external swf.

inside the external swf are sound files, which are being linked from the library via ActionScript.

im loading the external swf into a movie clip called "soundFile" on my main interface using this script


Code:
loadMovie("sound.swf", "soundFile");


now this works fine until i try to target the sound, as in play them, when i roll over a button from the main interface but it doesnt play, ive tryed creating variables and tracing them, to see if the external swf is loading, the varibles work fine, it just doesnt want to play the sounds.

below is the script im using.

any ideas? is it a bug or just me.?

this is inside the external swf.

Code:
// buttons sound
button1 = new Sound();
button1.attachSound("sound1");
button1.setVolume(100)


inside the button.


Code:
_root.soundFile.button1.start(0, 1)

Sound Targeting
how can i target a sound which has linkage for actionscript but not export in first frame?

Targeting Sound Objects
I am having problems targeting sound objects on the root. It works fine when
calling it from the root but when I try and call it from within a movieclip

_root.sound0.start();

nothing happens. Any ideas???

on the root I have this script to attatch the sound to a series of movie clips

soundArray = new Array("drop", "click", "bkg", "chopper", "batch", "dogs_dinner", "not_bad");
for (i = 0; i < 6; i++) {
_root.createEmptyMovieClip(["sound_holder" + i], (50 + i));
_root["sound" + i] = new Sound(["sound_holder" + i]);
_root["sound" + i].attachSound(soundArray[i].toString());
}

globalSound = new Sound();

Targeting Sound In A .swf Loaded In A Mc
I'm working on something that uses a lot of sound. It's a main .swf with a lot of small .swfs that are loaded one at a time into a movie clip in the main movie.

If I load the sound in the main movie .fla and put

firstSound=new Sound();
firstSound.attachSound("number1");

in the first frame of the main movie, and

on (release) {
_root.firstSound.start();
}

on a button in the small .swf that loads in the container, the sounds plays fine.
The problem is that I have to load a lot of these sounds onto the main movie, and it will take a long time to load. I'd rather load each sound with each movie that loads into the container. I tried putting the sound in the smaller movie. If I play it as a stand alone, it works fine. However, there seems to be a problem targeting the sound if I load it into the movie clip.

I tried loading the sound in the smaller movie, and putting

firstSound=new Sound();
firstSound.attachSound("number1");

in the first frame.
On the button I tried

on (release) {
firstSound.start();
}

and

on (release) {
_this.firstSound.start();
}

Does anyone know what else I can try? Let me know if I haven't been clear. Thanks

Targeting Sound In Loaded Movie
Hello, I have a movie, "index.swf", which loads another movie, "index2.swf". In index2.swf I have music. In index2 I have the following code:
ActionScript Code:
_root.targon.firstSound=new Sound();
_root.targon.firstSound.attachSound("firstSound01");
_root.targon.firstSound.start();

index.swf loads index2.swf into a movie clipped named "targon".

The problem is that the music in index2.swf doesn't play when loaded into index1.

Any help is appreciated.

thanks

.stop() For Sound Object Stopping Embedded Video Sound
I have a problem where the stop funtion for a sound object is stopping the audio in an embedded video. Has anyone ever encountered this? Ihave poured over my code and there is no cross-linked intance names, so I do not have a clue what is happening.

2 Problems, Sound Targeting And Storage Capacity
problem 1:
for my game im storing data locally but i need the user to already have enough local storage no matter what, before the local objects are loaded. Is there anyway to check the users local Storage limit and if it is not high enough request that the user increase the limit and if they do accept then they cannot continue onto the game?
Also would there be anyway that if at anytime the user tried to lower their local storage capacity to below 1mb lets say it would stop them and request that they do not lower the capacity and not let them deny but only accept. maybe a bit sinaster but...

problem 2:
due to the nature of the music in my game it must be used with attachSound(), but there are many large music files that must be exported for action script but are slowing down the preloader ( well not slowing down but making it start at like 45% cos it has to wait for music to load). How can i target the music if it is exported for action script, but not exported in first frame?

Stoping And Playing Sound At A Particular Point (using Sound Object)
Hi,

I have a movie in which i have a voice over and some animations which is in sync with the VO. I have a play button and stop button.

I am using the sound object method to play the sound and the animations are in timeline.

I have to stop the movie at any point in time and when i click on play the sound should start from the point where it stopped..But it is not happening.

Please help me..

am having a deadline today..

lamus

Glitch With Sound.position And External Mp3 Sound Object
Hi,

I am in the midst of build a flash mp3 player and have chosen to load all of my mp3s externally and streaming using this method:

sndAudio.loadSound(track01, true);

The problem I am running into is that when track01 starts playing and I switch to another sound i.e.:

sndAudio.loadSound(track02, true);

the value in sndAudio.position doesn't get reset. This is causing havoc for me in my pause function and my counter as well... I am guessing I have to somehow delete the sound object and repopulate it when I stop a sound or start a different one but I am having trouble figuring this out. Has anyone had any luck with this before? Here is how I am initializing my sound object:

this.createEmptyMovieClip("mcSoundHolder", this.getNextHighestDepth());
var sndAudio:Sound = new Sound(mcSoundHolder);

I am running Flash MX 2004.

Thanks to anyone who can lend a hand,

Cheers,

T-Dawg.

Stop Sound File Early (using Sound Object)
I know I can use the play() method of the Sound object to offset the beginning of a sound. Ex:

mySound.play(2000) - plays the sound beginning at 2 seconds

Is there a way to get a sound to stop early? For example, if it is a 20-second sound, can I get it to stop at 18 seconds? Thanks!

How Do I Load External Sound Into A Movieclip Vs. A Sound Object?
I have a sound player movie clip that is designed to play the sound loaded into the parent movie clip. In particular, it uses "_parent.gotoAndPlay(targetFrame);" to start playing the sound. And it works well for statically loaded sounds.

However, how can I use this sound player movie clip with dynamically loaded sounds? The player requires a sound to be loaded into the parent movie clip, but the only way I know of loading an external sound is instantiating a new Sound() object and then using .loadSound(...). But loadSound doesn't load the sound into a movie clip.

So, how do I load an external sound into a movie clip versus a Sound object?

Thanks!

_global Sound Element/ Shared Object Sound
THIS IS DRIVING ME CRAZY
Im programing a childrens game that teaches music.
Needless to say there are a lot of sounds involved, so natuarrally I only want the sounds to load one time then just be referanced later to be played.
However, this game consists of about 10 different .swf files, that jump back and forth depending on user navigation.
I have tried defining the sounds as _global like so

_global.mysound = new Sound ();
_global.mysound.loadSound("noise.mp3")
playsnd = function(){
_global.mysound.start(0,0)
}
However this will only play in the clip it was defiend in, and I need it to be able to be called from any of the .swfs

I use this code to transpher between movies

unloadMovie(this)
loadMovie("new", this)

I have also tried converting the sound to a Shared:Object but it two only plays in the clip it was defiend in

user_so = SharedObject.getLocal("sndz");
_global.sndz = new Sound(this);
sndz.loadSound("soundz/parry.mp3");
user_so.data.song = _global.sndz;
_global.playsnd = function() {
trace("getting called");
user_so.data.song.start(123, 1);
};
user_so.flush();

OMFG, I have a deadline on Thursday, and I have not been making any progress
PLEAS HELP!!!!!!!!!!

Synchronsing Sound Using Sound Object Method
before flash 7 you were able to synch the sound to the timeline with and option in the properties window (using the "stream" or "event" setting) - this would ensure any animation would keep up with the soundtrack, and if need be would skip frames.

how can you do this with the new sound object and actionscript??? - is there a method for it? at the moment im creating a new sound object and then use the attachSound method to bring the sound in from the library, but it doesnt automatically synchronise with the graphics on the timeline

anyone any ideas?

cheers

steve

HELP Sound Object Stop Kills Flv Sound Too
code:
if (!firstTime) {
_root.introMusic = new Sound();
_root.introMusic.attachSound("music");
_root.introMusic.setVolume(50);
_root.introMusic.start(0, 1);
firstTime = true;
}

music_btn.onRelease = function() {
if (!rockNow) {
_root.introMusic.setVolume(0);
this.gotoAndStop(2);
rockNow = true;
} else {
_root.introMusic.setVolume(50);
this.gotoAndStop(1);
rockNow = false;
}
};
stop();


This script for my "music on/off" btn kills ALL audio and not just the sounds object audio. It also pauses FLV playback (I'm using the FLVplayback component). Any insite?

I've tried modifying the above AS not using the "_root." to target the obj and also stop() and start() on the obj instead of just volume control. HELP!!!

Thanks,
1M.

Load New Sound Into Existing Sound Object
I have an extremely simple AS3 mp3 player that I'm trying to create but the problem I'm running into is that I can't seem to load a new song into my sound object when I switch tracks. Here's the basic code I'm using:


Code:
var sound:Sound = new Sound();
var sControl:SoundChannel = new SoundChannel();
var isPlaying:Boolean = false;

function triggerAudio(id:Number, path:String, type:String):void {
if(isPlaying){
sControl.stop();
sound.close();
isPlaying = false;
} else {
sound.load(new URLRequest(path));
sControl = sound.play();
sControl.addEventListener(Event.SOUND_COMPLETE, completeHandler);
isPlaying = true;
}
}
Right now, playing an initial song works
Stopping a song works
But loading a new song over top of a previously loaded song doesn't.

I'm brand new to AS3, what am I missing?

Streaming Sound Distorted - Sound Object
I have a streaming sound that is loaded into my flash movie (will end up on CD) that is very distorted, it sounds like someone is slowing down the audio, the voice sounds deep and slow. its kinda funny, but I doubt my boss will think so.

anyone ever run into this before?

[F8] Recording Sound From A Sound Object To Mp3 Using AS - Brainstorm Here
Hi guys,

Im creating a number of little flash instruments, that I need to be able to record the sounds/songs they create. AFAIK, there is no official way to do this in AS, but I was hoping the more creative scripters around here might be able to help me find a solution?!

The worst case scenario is using the microphone I guess, but i would like to avoid that if at all possible.

Please brainstorm with me here!

Steve

Streaming Sound Distorted - Sound Object
I have a streaming sound that is loaded into my flash movie (will end up on CD) that is very distorted, it sounds like someone is slowing down the audio, the voice sounds deep and slow. its kinda funny, but I doubt my boss will think so.

anyone ever run into this before?

Sound Object Attach Sound Or Load
Hi

I am wanting two sounds in my FLA one for movie clip buttons and one for background music.

In the past I have created a sound object and just loaded the file from a location on the server, but I've just seen an aletrnative method thats works very much in the same way but you import the sound files into the library and then export for action script and then attach them to the sound object.

Which is the best method to use? If I bring them into the library do they contribute the FLA size? and if they do is this worse than just loading them?

What are the pros and cons of each method? and which is best to use?

Thanks

Ricky55

Advance Sound In Sound Object?
Hey all. Check this:

I need to advance a sound to a certain timeframe. For example, go to 120000 (2 minutes). Is there an way of doing so?

Thanks,
Leo

The Sound Object 'mySound=new Sound();
I had an Idea of using dialogue sound and background loops together on my demo. I wanted to do this using the Sound object using linkage to export all sounds embedded in the same .swf. I also wanted to have two volume sliders. One controlling the volume of the Dialogue, the other controlling the background loops, using the mySound.setVolume(); method.

The problem: everytime I instantiate a new Sound() object it supercedes the old one, even though I give the two objects unique identifiers (names)

Can you only have one sound object playing at a time?

Loading Sound With Sound Object() 'DAP'
Hello,

i was running a test in trying to preload mp3 dynamically using the loadSound function and notice that if am running DAP which is the download accelerator program the flash file doesnt work and instead DAP tried to download the mp3 file. however on diasbling the DAP it worked.

did any one ever encounter a similar problem? was there a solution

Sound Object To Tell You When Sound Stops?
I'm having a problem. I'm developing an intro/offline presentation in flash for a client and it has music in the background to go with it. I have imported the sound and attached it to the first frame after the preloader using the sound thing in properties panel. Now how do I know when the sound ends? If i put a frame down a couple 1000 frames i see where it says it ends, but i added a keyframe on a different frame there and put something like "music ends" in a text box, but when i play it the music ends about 30 seconds before that. And the worst part is it ends at different times depending on the computer. I want to display something right when the music ends. Is there some way (probably with sound object) i can do something like this:

[on frame 999]
if(!sound.on){
gotoAndPlay(1000)
}else{
gotoAndPlay(998);

so it keeps testing to see if the sound ends, and when it does it continues to play the rest? I took out moock's Actionscript the Definitive Guide, but all i can find on the sound object is how to control stop and play, not to test if it is playing.

Thanks

Sound Object - End Of Sound Detection?
Hi all,
is there a possibilty to detect the end of a sound called by a sound object?
i have a few sound objects which i need to play in a raw.
Thanx

[F8] AS2 Sound Object - Sound Never Plays
Hi there, I'm trying to build a JS sound control class using some simple ActionScript and ExternalInterface.

Problem is that the sound never works when I try to play it. Is there a glaring omission in my code?


PHP Code:




import flash.external.*;
import System.security;

System.security.allowDomain("*");

var sounds = new Object();

function registerSound(url) {
    var s:Sound = new Sound();
    log('URL is: '+url);
    s.loadSound(new URLRequest(url), true);
    sounds[url] = s;
    log(sounds[url]+' registered.');
}

function startSound(url) {
    log("Starting sound: "+url);
    log(sounds[url]);
    s = sounds[url];
    s.start();
    s.onID3 = function() {
        for(var i in s.id3){
            log(i+':'+s.id3[i]);
        }
    }
}

function log(mess) {
    ExternalInterface.call('console.info', 'Flash: '+mess);
}

ExternalInterface.addCallback("startSound", this, startSound);
ExternalInterface.addCallback("registerSound", this, registerSound);







Thanks for the help!

Looping Sound Using Sound Object...
Hi i have the following AS code:


ActionScript Code:
var song_sound:Sound = new Sound();
song_sound.attachSound("background_music");
btnSoundOn.onRelease = function() {
    song_sound.start();
};
btnSoundOff.onRelease = function() {
    song_sound.stop();
};

At the moment on clicking sound on, it plays the track once, is there a way i can make it loop continuously?

Sound Object - Specifying Only Certain Sound To Stop
Hi everyone. I'll try to make this as brief as possible. I am creating a flash project which contains video on a few pages. The project also contains background music which loops contiuously.

The goal is to have the background music stop whenever the user is on a page containing video and for the music to play again when the user leaves said page.

The script I created works to stop the music, but it also stops the audio contained within the video and causes the video player (by proxxus) to lock up.

The solution is probably a simple one, but I'm having difficulty figuring it out.
If anybody can see where I've gone wrong, your help would be greatly appreciated. Here's the setup:

Library:
music.wav - linkage = "myMusic01"

Main Timeline:

Code:
//-- create a variable to determine if the current movie contains video
var currMovie:String = "notVideo";
//-- start playing sound object
myMusicMc.myMusic.start(0, 999);
myMusicMc (residing on main timeline)
frame 1

Code:
//-- set up sound object
myMusic=new Sound();
myMusic.attachSound("myMusic01");
frame 2

Code:
//-- check the variable "currMovie"
if (_root.currMovie == "Video") {
_root.myMusicMc.myMusic.stop();
} else {
_root.myMusicMc.myMusic.play();
}
frame 3

Code:
//-- create a loop to continuously check the variable
gotoAndPlay(2);
on the actions layer of the movie clip containing my navigation controls
snippet of the callback used

Code:
videoLink_mc.onRelease = function() {
_parent.prodDetail_mc.gotoAndPlay("video");
_root.currMovie="Video";
}
on all the other buttons currMovie is set to "notVideo"

Sound Object
Hi everybody!
Can anybody tell me where I can learn about the sound object in Flash??
I already know how to put sound in the "classic" way in flash, but I need something much complex.
I tried with actionscript documentation but I couldn´t understand.
Thank you very much.
Best regards,
Strato

Sound Object
please help

mix is sound object
mix.start(0,50);
mix plays, 50 loops right?

how does flash know it's done with 50 loops ?
and doesn't play sound again.
there must be a counter in there somewhere.
what is it, how do i get to it.

please, anybody know?

how about this.
mix.start()
sound is playing
is there a boolean test?
true when sound is looping
false after looping done, sound off?

help, i've been looking for 6 hours.

thank you,
^_^

Sound Object
Is there a way to have sound object load an outside file then so that u can have many sounds but still keep the main movie small? if ther is how? Thx a lot!

Charles <><

Can Everyone Try This One Concerning Sound Object
Basically I'm bringing in a sound dynamically - I have imported a sound gone to linkage called my sound "adultTune4" clicked Export for ActionScript and Export for first frame

Right on the first frame of the main timeline I have this


function goPlay(){
moviesound = new Sound();
moviesound.attachSound("adultTune4")
moviesound.start(5,0);
}


I then have a button with this(which is simply a call to the function


on (release) {
goPlay();
}


Great this works my tune starts playing 5 seconds into it
however when I simply replace

on (release) with on (keyPress "Enter") (with the arrows around Enter dont show up in this post)


It fails to play my tune at all!!!!!


very frustrated - does anyone know why??? or how to resolve this problem

thanks in advance

Sound Object
It seems I've seen this posted before, but I couldn't find it. I'm using sound objects, and when I stop one sound, all sounds stop. I don't mean using stopAllSounds(). I mean:

_root.mysound.stop()

Which, I thought should only stop "mysound," but it stops all sounds. Anyone know what's up with this?

It would also be helpful to know if anyone else has sucessfully used the stop() with a sound object and NOT had the background sounds stop (like stopAllSounds). This way I would at least know that what I need to do is possible.

Thanks very much.

Sound Object
I want to use the sound in my library rainHeavy with the sound object. I have a movie clip called heavyRain to have the sound attached.

What I'm using now is:
RainHeavy = new Sound(heavyRain);
RainHeavy.attachSound("rainHeavy");
RainHeavy.start(1,999);

this doesnt work.

I have read through the help files exstensively and it doesn't help. If you could give me some brand new code, or maybe spot whats wrong with mine... it would be great.

Sound Object
I want to use the sound object that the user can control the volume of sound they here but I can't figure out how to get the sound to loop when I add it programatically.
Can anyone help?
thanks,
Jeff

Sound Object With Mac OS X
hi everyone,

i'm using code like this:
mySound.setVolume(0);

to mute streaming sound. ist works fine (as it should). except for mac osx obviuosly because i still can hear the sound there - using either ie or mozilla.
is this a bug and is there another possibility to mute the sound (streaming sound, not event sound)?


thx
eman

Copyright © 2005-08 www.BigResource.com, All rights reserved