Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • EspaƱol
      • FranƧais
      • PortuguĆŖs
  • ę—„ęœ¬čŖžć‚³ćƒŸćƒ„ćƒ‹ćƒ†ć‚£
  • ķ•œźµ­ ģ»¤ė®¤ė‹ˆķ‹°
0

stop sound

Explorer ,
Dec 01, 2018 Dec 01, 2018

hi . i make function (poooos) to stop the  sound but it did not work why? can u help plz!

import flash.media.Sound;

import flash.media.SoundChannel;

import flash.media.SoundTransform;

import flash.net.URLRequest;

myppbtn.buttonMode = true;

var s:Sound = new Sound();

var sc:SoundChannel ;

var trans:SoundTransform = new SoundTransform (.5);

s.addEventListener(Event.COMPLETE,sloaded);

s.load(new URLRequest("jo.mp3"));

function sloaded(e:Event):void {

  sc = s.play(0,1,trans);

  }

myppbtn.addEventListener(MouseEvent.CLICK, poooos);

function poooos (e:MouseEvent):void{

  sc.stop();

  }

_________________________________________________________________________

the output write for me this massage but i don't understand

TypeError: Error #1009: Cannot access a property or method of a null object reference.

  at RECOVER_RECOVER_Untitled_1_fla::MainTimeline/poooos(

297
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Dec 01, 2018 Dec 01, 2018

disable smart layers (modify>document>disable smart layers)

Translate
Community Expert ,
Dec 01, 2018 Dec 01, 2018
LATEST

disable smart layers (modify>document>disable smart layers)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines