-
please help me with sound problem
problem: when swf is loaded on target_mc there is no sound!
--------------------------------------------------------------
I have series of swf with sound in it.
intro
ani1
ani2
ani3
each swf has sound loop. when intro is over it loads ani1 on target_mc
I have following code to play sound ( same code on all swf )
// ----------------------------------
myLoop = new Sound(myLoopMc);
myLoop.attachSound("introLoop");
myLoopVolume = 0;
myLoop.setVolume(myLoopVolume);
// Fade In -------
fadeIn01 = 1;
myLoop.start(0, 999);
//--------------------------------
this.onEnterFrame = function () {
//Text boxes
myMusicDurationText=_root.myLoop.duration/1000;
myMusicPositionText=_root.myLoop.position/1000;
//
//Fade In
//
if (fadeIn01==1) {
// fadeIn01 can be set to 1 when a button is
// pressed, when a frame is reached or many other ways.
_root.myLoop.setVolume(myLoopVolume);
// Sets the volume for the sound object "myLoop"
// to the variable "myLoopVolume" every time the
// frame is entered during the movie clip loop.
myLoopVolume=myLoopVolume+1;
// Increments the variable "myLoopVolume" by 5.
// Increase or decrease this to change the speed of
// the fade from 0 to 100.
if (myLoopVolume>99) {
fadeIn01=0;
// This stops the "myLoopVolume" from incrementing
// by making the if-statement false once the volume
// reaches 100%.
} //Closes 2nd fadeIn if-statement
} //Closes 1st fadeIn if-statement
//
//Fade Out
//
if (fadeOut01==1) {
_root.myLoop.setVolume(myLoopVolume);
myLoopVolume=myLoopVolume-2;
if (myLoopVolume<0) {
_root.myLoop.stop("introLoop");
fadeOut01=0;
}
}
}
-----------------------------------------------
to fade out
fadeOut01 = 1;
-----------------------------------------------
after fading out..loading swf
loadMovie("ani1.swf", "target_mc");
-------------------------------------------
It loads swf but sound is lost.....
I need help...it`s very urgent.
thanks and appericiate a lot!
PilotX
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|