Jump to content
Search Community

First Time [SOLVED]

rgmartino test
Moderator Tag

Recommended Posts

I want to control a fade out of a sound object. I try this but doesn't work. Can someone help?

 

import gs.*;

import gs.easing.*;

TweenLite.to(soundOne, 2, {volume:0});

 

var req:URLRequest = new URLRequest("firstloop.mp3");

var soundOne:Sound = new Sound();

 

function soundloaded(event:Event):void {

soundOne.play();

}

 

soundOne.addEventListener(Event.COMPLETE, soundloaded);

soundOne.load(req);

Link to comment
Share on other sites

  • 1 month later...

I have a sound and sound channel that i'm trying to fade, but it's not seeming to work.

 

var sc:SoundChannel;
var song:Sound = blah;
//blah is a sound, trust me, it plays fine and everything i just don't want to put the code in here for the loading and such;
sc = song.play();

 

then when my app ends,

 

var fadeOb:Object = new Object();
fadeOb.volume = 0;
TweenLite.to(sc.soundTransform, 2, fadeOb);

 

But this doesnt work. If i use the onUpdate listener and check the volume of the soundtransfomr, it always stays at one

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...