Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

i need help Line 50, Column 19 1046: Type was not found or was not a compile-time constant: soundboom.

New Here ,
Oct 27, 2015 Oct 27, 2015

package  {

  import flash.display.MovieClip;

  import flash.events.Event;

  import flash.media.Microphone;

  import flash.display.StageAlign;

  import flash.display.StageScaleMode;

  public class sound extends MovieClip {

  private var _mic:Microphone;

  private var _sx:Number=0;

  private var sb:Number =_sx;

    private var Soundboom:soundboom;

  public function sound (){

  into();

  }

  private function into () :void{

  Soundboom = new soundboom();

  _mic = Microphone.getMicrophone();

  _mic.setLoopBack(true);

      addEventListener(Event.ENTER_FRAME, onEFrame);

  }

  private function onEFrame(evt:Event): void {

     _sx *=.9;

     _sx +=.4;

  _sx -=_mic.activityLevel * .05;

    Soundboom.height -=_sx;

    Soundboom.width -=_sx;

  if(Soundboom.height > 81){

  _mic.setLoopBack(false);

  }

  if(Soundboom.height>2){

  _mic.setLoopBack(true);

  }

  }

  }

}

package {

  import flash.display.MovieClip;

  import flash.events.Event;

  import flash.events.MouseEvent;

  import flash.media.Microphone;

  import sound;

  public class Mcass extends MovieClip {

  public var collisionHasOccured:Boolean = false;

  public var SoundB:sound;

  public var sb:Number;

  public var _mic:Microphone;

  public var _sx:Number

  public var Soundboom:sound;

  public function Mcass() {

  init();

  }

  public function init () :void {

  SoundB = new sound();

     Soundboom = new sound();

  caveManB.rotate

  caveManB.x=-928.75;

  caveManB.y=312;

  addEventListener(Event.ENTER_FRAME, onFrame);

  trace (stage.stageWidth);

  trace (stage.stageHeight);

  this.Push.addEventListener(MouseEvent.MOUSE_DOWN,Pu);

  this.ADDMAN.addEventListener(MouseEvent.MOUSE_DOWN,ADD);

     this.Speed.addEventListener(MouseEvent.MOUSE_DOWN,sp);

  this.CMH.addEventListener(MouseEvent.MOUSE_DOWN,HM);

  this.$.addEventListener(MouseEvent.MOUSE_DOWN,NO);

  this.IB.addEventListener(MouseEvent.MOUSE_DOWN,BOX);

  this.Go.addEventListener(MouseEvent.MOUSE_DOWN,GO);

  }

  private function GO(evt:MouseEvent):void{

  Go.x=-928.75;

  caveManB.x=928.75;

     money.width=1;

  healthBar.height=202;

  healthBar2.height=199.5;

  win.x=-600;

  YL.x=-600;

  }

  private function BOX(evt:MouseEvent):void{

   SW.height--;

  

     }

  private function NO(evt:MouseEvent):void{

  SW.x=230;

  SW.y=249.3;

  SW.width =10;

  SW.height +=10;

  money.width=0;

  $.x =-600;

     }

  private function Pu(evt:MouseEvent):void{

  if(caveMan.hitTestObject(caveManB)){

  caveManB.y *= -0.1 + sb;

  caveManB.x *= -2 +sb;

   money.width +=10;

  }

  }

   private function stp(evt:MouseEvent):void{

   caveMan.x +=7 ;

     }

         private function HM(evt:MouseEvent):void{

  money.width  +=6;

  CavMH.height +=4 + sb;

  

  }

     private function sp(evt:MouseEvent):void{

    money.width +=4;

    caveManB.x +=10 + sb;

    }

    private function ADD(evt:MouseEvent):void{

  if(CavMH.height < 1){

  caveMan.x=60;

  caveMan.y=310;

  caveMan.vx;

  CavMH.height=42;

  }

  money.width +=2;

  caveMan.push

             caveMan.x = 60;

             caveMan.y = 310;

    

}

  private function onFrame(event:Event): void {

  soundboom.x = caveMan.x;

  soundboom.y = caveMan.y;

    if(caveMan.hitTestObject(player2)){

  healthBar2.height --;

  money.width --;

  if(! collisionHasOccured){

  collisionHasOccured =true;

  caveMan.x +=-2;

  ET.height--;

  this.Speed.removeEventListener(MouseEvent.MOUSE_DOWN,sp);

  this.CMH.removeEventListener(MouseEvent.MOUSE_DOWN,HM);

     }

  }else

        {

    player2.gotoAndStop (1);

    collisionHasOccured = false;

    caveMan.x +=2;

    }

   

  if(money.width >95) {

  //ET.height--;

  money.width= 95;

  this.Speed.removeEventListener(MouseEvent.MOUSE_DOWN,sp);

  this.CMH.removeEventListener(MouseEvent.MOUSE_DOWN,HM);

  this.Push.removeEventListener(MouseEvent.MOUSE_DOWN,Pu);

  this.ADDMAN.removeEventListener(MouseEvent.MOUSE_DOWN,ADD);

  _mic.setLoopBack(false);

  }if(money.width<94){

  _mic.setLoopBack(true);

  this.Push.addEventListener(MouseEvent.MOUSE_DOWN,Pu);

  this.ADDMAN.addEventListener(MouseEvent.MOUSE_DOWN,ADD);

     this.Speed.addEventListener(MouseEvent.MOUSE_DOWN,sp);

  this.CMH.addEventListener(MouseEvent.MOUSE_DOWN,HM);

  this.$.addEventListener(MouseEvent.MOUSE_DOWN,NO);

  this.IB.addEventListener(MouseEvent.MOUSE_DOWN,BOX);

     }

   if(caveMan.hitTestObject(caveManB)){

   caveMan.x  += 0;

       caveManB.x += 8;

   CavMH.height --;

  

  

  

   }else

   {

    caveManB.x +=-2;

   }

     if(CavMH.height < 1){

          caveMan.x =-100;

  caveMan.x += 0;

  }

  if(caveManB.hitTestObject(player1)){

      healthBar.height --;

  if(! collisionHasOccured){

  collisionHasOccured =true;

  caveManB.x += 9;

     }

  }else

        {

    player1.gotoAndStop (1);

    collisionHasOccured = false;

    caveManB.x +=-2;

}

                 if(healthBar.height < 1){

  addChild(YL);

  YL.x=181.2;

  YL.y=190;

  Go.x=482.5;

  this.Push.removeEventListener(MouseEvent.MOUSE_DOWN,Pu);

  this.ADDMAN.removeEventListener(MouseEvent.MOUSE_DOWN,ADD);

     this.Speed.removeEventListener(MouseEvent.MOUSE_DOWN,sp);

  this.CMH.removeEventListener(MouseEvent.MOUSE_DOWN,HM);

  this.$.removeEventListener(MouseEvent.MOUSE_DOWN,NO);

  this.CMH.removeEventListener(MouseEvent.MOUSE_DOWN,HM);

  this.IB.removeEventListener(MouseEvent.MOUSE_DOWN,BOX);

  

  } if(caveManB.hitTestObject(player2)){

          healthBar2.height --;

          money.width --;

  caveManB.x +=-2;

    if(caveMan.hitTestObject(caveManB)){

  CavMH.height =0;

  }

  

      

}

   if(ET.height<2)

  {

  caveManB.x=-815.4;

}if( caveManB.y < 312){

    caveManB.y += 5;

    caveManB.x +=9;

}if( caveManB.y > 312){

    caveManB.y = 312;

    caveManB.x;

}if(SW.height>2){

  ADDMAN.x = -600;

  IB.x=136;

  IB.y=178;

}else

{

      IB.x = -600;

   ADDMAN.x=171;

   $.x=385;

   $.y=-4.75;

}

if(healthBar2.height < 1)

  {

  win.x=181.2;

    win.y=190;

    Go.x=482.5;

  CavMH.height=0;

            this.Push.removeEventListener(MouseEvent.MOUSE_DOWN,Pu);

  this.ADDMAN.removeEventListener(MouseEvent.MOUSE_DOWN,ADD);

     this.Speed.removeEventListener(MouseEvent.MOUSE_DOWN,sp);

  this.CMH.removeEventListener(MouseEvent.MOUSE_DOWN,HM);

  this.$.removeEventListener(MouseEvent.MOUSE_DOWN,NO);

  this.CMH.removeEventListener(MouseEvent.MOUSE_DOWN,HM);

  this.IB.removeEventListener(MouseEvent.MOUSE_DOWN,BOX);

}if(_sx < 0){

  money.width +=20;

}function xVelocity (startPosition:Number, destination:Number , coeff:Number):Number {

  return (destination-startPosition)/coeff;

  }

}

}

}

TOPICS
ActionScript
260
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
Community Expert ,
Oct 28, 2015 Oct 28, 2015

you used:

  soundboom.x = caveMan.x;

  soundboom.y = caveMan.y;

instead of

  soundBoom.x = caveMan.x;

  soundBoom.y = caveMan.y;

but the sound class doesn't have x and y properties so once you fix that you'll probably have more problems unless your soundboom class has those defined.

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
New Here ,
Oct 28, 2015 Oct 28, 2015

this did not helpful. i did define it   public var Soundboom:sound;

and in my sound class i  made a few changes thank for your help

package  {

  import flash.display.MovieClip;

  import flash.events.Event;

  import flash.media.Microphone;

  import flash.display.StageAlign;

  import flash.display.StageScaleMode;

  public class sound extends MovieClip {

  private var _mic:Microphone;

  private var _sx:Number=0;

  private var sb:Number =_sx;

    private var Soundboom:soundboom;

  public function sound (){

  into();

  }

  private function into () :void{

  Soundboom = new soundboom();

  _mic = Microphone.getMicrophone();

  _mic.setLoopBack(true);

      addEventListener(Event.ENTER_FRAME, onEFrame);

  }

  private function onEFrame(evt:Event): void {

  Soundboom.x = caveMan.x;

  Soundboom.y = caveMan.y;

     _sx *=.9;

     _sx +=.4;

  _sx -=_mic.activityLevel * .05;

    Soundboom.height -=_sx;

    Soundboom.width -=_sx;

  if(Soundboom.height > 81){

  _mic.setLoopBack(false);

  }

  if(Soundboom.height>2){

  _mic.setLoopBack(true);

  }

  }

  }

}

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
Community Expert ,
Oct 28, 2015 Oct 28, 2015
LATEST

Soundboom is not the same as soundboom.

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