12 posts
  • 5 Years of Membership
  • Collector Level 2
  • Exclusive Author
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

601 posts
  • 6 Years of Membership
  • Affiliate Level 1
  • Author Level 3
  • Collector Level 2
+2 more
SparkyFlash
says

Try this code:

try {
  sound.close();
} catch (event:Error) {
  channel.stop();
}
12 posts
  • 5 Years of Membership
  • Collector Level 2
  • Exclusive Author
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
  • 5 Years of Membership
  • Collector Level 2
  • Exclusive Author
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); }

1689 posts Envato Elite Author
  • Affiliate Level 2
  • Author Level 8
  • Collector Level 1
  • Top Monthly Author
+8 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
  • 5 Years of Membership
  • Collector Level 2
  • Exclusive Author
johns1972
says

Thankx,

SoundMixer.stopAll(); it works

Gr, John

55 posts
  • 5 Years of Membership
  • Australia
  • Collector Level 1
eduardo8
says

heehe job done

55 posts
  • 5 Years of Membership
  • Australia
  • Collector Level 1
eduardo8
says

this sites amazing with help

12 posts
  • 5 Years of Membership
  • Collector Level 2
  • Exclusive Author
johns1972
says

Yes it work….

Thankx again.

by
by
by
by
by
by