I have a problem with the extendedportfolio. The portSwf.swf file with some music doesn’t stop when i click the page away. The music stills playin on. I know that you have to to it with DestroySWF but is that also for the music???
gr, John
Try this code:
try {
sound.close();
} catch (event:Error) {
channel.stop();
}
Where to put it?
import gs.; import gs.easing.; import gs.plugins.*; TweenPlugin.activate([BlurFilterPlugin]); OverwriteManager.init();
var i:int = 0; var colors:Array = [0xffc001,0xcfcfcf,0xffffff,0×000000]; var goForward:Boolean = true; var goBackward:Boolean;
if(stage null){ this.addEventListener(Event.ADDED_TO_STAGE, init, false, 0, true); } else{ init(null); }
function init(e:Event):void{ if(this.hasEventListener(Event.ADDED_TO_STAGE)) { this.removeEventListener(Event.ADDED_TO_STAGE, init); } stage.addEventListener(Event.ENTER_FRAME, animateText,false,0,true); }
function animateText(e:Event):void{ if(goForward){ i++; if(i colors.length-1){ goForward = false; goBackward = true; i = colors.length -1; } TweenLite.to(a,0,{tint:colors[i]}); TweenLite.to(s,0,{tint:colors[i]}); TweenLite.to(num3,0,{tint:colors[i]}); } if(goBackward){ i—; if(i == 0){ goForward = true; goBackward = false; } TweenLite.to(a,0,{tint:colors[i]}); TweenLite.to(s,0,{tint:colors[i]}); TweenLite.to(num3,0,{tint:colors[i]}); } }
function destroySwf():void{ stage.removeEventListener(Event.ENTER_FRAME,animateText); while(this.numChildren > 0){ removeChildAt(0); } this.parent.removeChild(this); }
Try this code:
try {
sound.close();
} catch (event:Error) {
channel.stop();
}
where do i have to put it in the file?
import gs.; import gs.easing.; import gs.plugins.*; TweenPlugin.activate([BlurFilterPlugin]); OverwriteManager.init();
var i:int = 0; var colors:Array = [0xffc001,0xcfcfcf,0xffffff,0×000000]; var goForward:Boolean = true; var goBackward:Boolean;
if(stage null){ this.addEventListener(Event.ADDED_TO_STAGE, init, false, 0, true); } else{ init(null); }
function init(e:Event):void{ if(this.hasEventListener(Event.ADDED_TO_STAGE)) { this.removeEventListener(Event.ADDED_TO_STAGE, init); } stage.addEventListener(Event.ENTER_FRAME, animateText,false,0,true); }
function animateText(e:Event):void{ if(goForward){ i++; if(i colors.length-1){ goForward = false; goBackward = true; i = colors.length -1; } TweenLite.to(a,0,{tint:colors[i]}); TweenLite.to(s,0,{tint:colors[i]}); TweenLite.to(num3,0,{tint:colors[i]}); } if(goBackward){ i—; if(i == 0){ goForward = true; goBackward = false; } TweenLite.to(a,0,{tint:colors[i]}); TweenLite.to(s,0,{tint:colors[i]}); TweenLite.to(num3,0,{tint:colors[i]}); } }
function destroySwf():void{ stage.removeEventListener(Event.ENTER_FRAME,animateText); while(this.numChildren > 0){ removeChildAt(0); } this.parent.removeChild(this); }
- Author was Featured
- Sold between 50 000 and 100 000 dollars
- Author had a Free File of the Month
- Bought between 1 and 9 items
- Exclusive Author
- Europe
- Has been a member for 3-4 years
- Referred between 10 and 49 users
- Repeatedly Helped protect Envato Marketplaces against copyright violations
That sound you are talking about is embedded in the swf and loaded externally?
I have no idea whats going on here but you would have to put code to stop the sound where that sound was created in the first place.
Also, you could try with this, but I am not sure if its going to work: SoundMixer.stopAll();
Thankx,
SoundMixer.stopAll(); it works
Gr, John
heehe job done
this sites amazing with help
Yes it work….
Thankx again.
