Results 1 to 3 of 3

Thread: Creating Scrolling scenes for flash games

  1. #1
    Join Date
    Jan 2008
    Location
    Near Chicago
    Posts
    247
    Thanks
    105
    Thanked 2 Times in 2 Posts

    Default Creating Scrolling scenes for flash games

    I am wondering if anyone can point me to a good example on how to get this done in As3 -and possibly a way to do this with the mouse -and vary the speed and direction relative to the mouse position as well.

    getting to know something about collision points would help too.

    any suggestions? If there are any great books that cover these topics I'll snap it up in a second.

  2. #2
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    I know you've probably already seen them but take a look at the tutorials on gotoAndLearn(). Lee has a tutorial specifically for that kind of functionality for AS2. You should be able to translate that into AS3.

    But his newer tutorials (3D Photo Panels, Click and Zoom 3D Carousel, The Throw Slider, Papervision3D 2.0 Interactive Cube) will also be helpful in learning about animation in Flash CS3 using the various tweening libraries as well as native logic.

    Let me know if you have any troubles.

  3. The Following User Says Thank You to Medyman For This Useful Post:

    evan (03-24-2009)

  4. #3
    Join Date
    Jan 2008
    Location
    Near Chicago
    Posts
    247
    Thanks
    105
    Thanked 2 Times in 2 Posts

    Default

    Here is the simplest code that would do some of what I want -oddly it works.
    as a beginning to what I want .


    but when I enable it to move the other parts at different rates because foreground midground and background move differently -it makes the scenery jump to follow mouse.

    I am reviewing Lee's tutorial for the scrollbar which I have am using on my site -I pimped it out a little.

    http://www.evanloiterman.com

    import caurina.transitions.*;
    /*



    stage.addEventListener(MouseEvent.MOUSE_MOVE, movesky);
    function movesky(evt:MouseEvent):void
    {

    Tweener.addTween(scenery,{x: (mouseX-150),time:1});

    //these lines that are commented out are intended to move parts of the scenery at
    //different rates:

    //Tweener.addTween(scenery.sky,{x: (mouseX-150),time:8});
    ///Tweener.addTween(scenery.mt,{x: (mouseX-150),time:5});
    //Tweener.addTween(scenery.fg,{x: (mouseX-150),time:3});
    }
    -Believe me I will have more questions as I go thanks again.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •