12 posts
  • Has been part of the Envato Community for over 4 years
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
johns1972 says

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

584 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 1+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 10+ items on Envato Market
+3 more
SparkyFlash says

Try this code:

try {
  sound.close();
} catch (event:Error) {
  channel.stop();
}
12 posts
  • Has been part of the Envato Community for over 4 years
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
johns1972 says

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); }

12 posts
  • Has been part of the Envato Community for over 4 years
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
johns1972 says
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); }

1677 posts Envato Elite Author
  • Has referred 10+ members
  • Has sold $125,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+6 more
Tean says

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();

12 posts
  • Has been part of the Envato Community for over 4 years
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
johns1972 says

Thankx,

SoundMixer.stopAll(); it works

Gr, John

55 posts
  • Has been part of the Envato Community for over 4 years
  • Located in Australia
  • Has collected 1+ items on Envato Market
eduardo8 says

heehe job done

55 posts
  • Has been part of the Envato Community for over 4 years
  • Located in Australia
  • Has collected 1+ items on Envato Market
eduardo8 says

this sites amazing with help

12 posts
  • Has been part of the Envato Community for over 4 years
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
johns1972 says

Yes it work….

Thankx again.

by
by
by
by
by
by