Jump to content
xisto Community

jonnahlynb29e

Members
  • Content Count

    8
  • Joined

  • Last visited

Posts posted by jonnahlynb29e


  1. hi im a newbiew in as3 programming can u help me find a solution with my problem?>>>

    i have 6 frames.... the 1st frame has an action w/c calls/play the remaining frame depending w/c button they click let say button1 and so on.... here's my action for frame4


    ------------------------------------------------------------------------------------------->> here's my problem ...

    1. ) the keyListener won't work not until i click on the interface.
    2. ) can't add a child with sprite in frame 4...it doesn't show and when i click back button error occurs...
    error:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at BlockBox12_fla::MainTimeline/frame1()
    at flash.display::MovieClip/gotoAndPlay()
    at BlockBox12_fla::MainTimeline/backnClick()


    ----------------------------------------------------------------------------------------------//here's my code


    stop();
    import flash.events.KeyboardEvent;
    import flash.display.Sprite;

    //keycodes
    var left:uint = 37;
    var up:uint = 38;
    var right:uint = 39;
    var down:uint = 40;
    var tempX:int = 1335;
    var tempY:int = 2370;

    //-----------------------------------------------------------------------i believe this have something to do with #2 error

    var clockFace:Sprite = new Sprite();
    clockFace.gra
    phics.drawCircle(200, 200, 50);
    clockFace.graphics.beginFill(0x0190ff);
    addChild(clockFace);

    //-----------------------------------------------------------------------

    back_btn.addEventListener(MouseEvent.CLICK, backnClick);
    stage.addEventListener(KeyboardEvent.KEY_DOWN,keyDownListener);


    function backnClick(event:MouseEvent):void
    {
    //trace("button clicked!");
    gotoAndPlay("main");
    }

    function keyDownListener(e:KeyboardEvent) {

    if (e.keyCode==left){

    if( _student.x >= 350){
    _student.x-=5;
    trace("student.x is >= 350");
    }
    else if( tempX >=330 ){
    bg_scroll.x+=5;
    }
    else if(_student.x <= 0){
    _student.x = _student.x;
    tempX+=5;
    }

    else

    _student.x-=5;

    tempX-=5;

    }
    if (e.keyCode==up){

    if( _student.y >= 250){

    _student.y-=5;

    }

    else if( tempY >= 355 ){

    bg_scroll.y+=5;

    }

    else if(_student.y <= 0){

    _student.y = _student.y;

    tempY+=5;
    }

    else

    _student.y-=5;

    tempY-=5; }
    if (e.keyCode==right){

    if( _student.x < 350){

    _student.x+=5;

    }
    else if( tempX+500 <= bg_scroll.width){

    bg_scroll.x-=5;

    }
    else if(_student.x + _student.width >= 800){

    _student.x = _student.x;
    tempX-=5;

    }
    else

    _student.x+=5;

    tempX+=5; }
    if (e.keyCode==down){

    if( _student.y < 250){

    _student.y+=5;

    }
    else if( tempY + 265<= bg_scroll.height){

    bg_scroll.y-=5;

    }
    else if(_student.y + _student.height >= 595){

    _student.y = _student.y;

    tempY-=5; }
    else

    _student.y+=5;

    tempY+=5;

    } }

  2. ei really nid help here...I'm trying to make a web server for my project using wamp. already have a page, when i tried to access my localhost and IP on my own computer, it really worked fine. The page is viewed as expected. But when i used a different computer to access the server on my computer it displays "Connection Interrupted The connection to the server was reset while the page was loading.The network link was interrupted while negotiating a connection. Please try again."


  3. ei really nid help here in wamp...I'm trying to make a web server for my project using wamp. already have a page, when i tried to access my localhost and IP on my own computer, it really worked fine. The page is viewed as expected. But when i used a different computer to access the server on my computer it displays "Connection Interrupted The connection to the server was reset while the page was loading.The network link was interrupted while negotiating a connection. Please try again."

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.