+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14

Thread: chess.fla for flash mx

  1. #1
    Junior Member
    Join Date
    May 2004
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    chess.fla for flash mx

    I bought the book "flash mx 2004 game design". It includes some nice sample flash files(especially chess.fla) but, i'm using flash mx ver. 6.
    Can you send/post the files for my version?

    Thanks

  2. #2
    Electrotank jobem's Avatar
    Join Date
    Apr 2004
    Posts
    996
    Thanks
    0
    Thanked 24 Times in 17 Posts
    Hi mvpdating, and welcome to the boards




    Unfortunately Chess is an ActionScript 2.0 game. It makes thorough use of ActionSCript 2.0 class files and so it does not have have a Flash MX (ActionScript 1) counterpart.




    The only way to view the source is with Flash MX 2004.
    ------
    Jobe Makar
    @jobemakar
    http://www.electrotank.com

    YouTube ElectroServer video tutorials
    http://www.youtube.com/user/ElectrotankInc

  3. #3
    Junior Member
    Join Date
    May 2004
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm trying to build a mutlit user (2) board game like monopoly. I have a die, pawns,cards, and tokens that need to be moved or displayed. I figured out how to do most of it using the sample tic-tac-toe game.

    I would like to "animate" the other player's move like I read in the book. Are there any other games available that will help? If nothing else, would you mind sharing the code used to "animate" one players move?

    Thanks, again, and thanks for responding so quickly

    mvpdating

  4. #4
    Electrotank jobem's Avatar
    Join Date
    Apr 2004
    Posts
    996
    Thanks
    0
    Thanked 24 Times in 17 Posts
    Hi,


    Animating a movie clip using code is pretty simple. To see an example, follow these steps:
    1. * Put a movie clip on the stage

      * Give the movie clip an instance name of 'test_mc'

      * Add this code to the timeline of the stage (not the movie clip)

    [code]
    function moveClip(clip, x, y, k) {
    clip.x = x;
    clip.y = y;
    clip.k = k;
    clip.onEnterFrame = function() {
    var xmov = (this.x-this._x)*this.k;
    var ymov = (this.y-this._y)*this.k;
    this._x += xmov;
    this._y += ymov;
    if (xmov*xmov+ymov*ymov<1) {
    this._x = this.x;
    this._y = this.y;
    delete this.onEnterFrame;
    }
    };
    }
    moveClip(test_mc, 100, 100, .6);

    4. Test the movie.
    In the final line of code you call a function and pass it information. In order of left to right you are telling the function: which movie clip to animate, the x position to move to, the y position to move to, how fast to move (between 0 and 1).
    The final number will move the piece faster and faster the closer you get to 1. Don't go over 1.

    Good luck!
    ------
    Jobe Makar
    @jobemakar
    http://www.electrotank.com

    YouTube ElectroServer video tutorials
    http://www.youtube.com/user/ElectrotankInc

  5. #5
    Junior Member
    Join Date
    May 2004
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks!!!

  6. #6
    Electrotank jobem's Avatar
    Join Date
    Apr 2004
    Posts
    996
    Thanks
    0
    Thanked 24 Times in 17 Posts
    No problem!




    Let us know when you put your game online, we always love to see what everyone is up to
    ------
    Jobe Makar
    @jobemakar
    http://www.electrotank.com

    YouTube ElectroServer video tutorials
    http://www.youtube.com/user/ElectrotankInc

  7. #7
    Junior Member
    Join Date
    Aug 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hey I have been following the tutorials in the game design demystified book. I've gained a lot out of it, which I'm thankful for. The book was given to me from I guy I used to share my office with. Neither of us know where the cd got to. I've haven't needed until now. I wanted to view the class files for chess.fla. I'm hoping to speed the process up of a simple TBW I'm attempting to make.

    It'd be amazing if anyone could help with this. I'm trying to set up rules for the player to move one cell per turn like the 'king' in chess. All the class files obviously would be useful. I'm getting there slowly but with my noob code I'll end up with some exhaustive result.

  8. #8
    Member
    Join Date
    Jul 2008
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have been creating a Snakes and Ladders game in Adobe Flash CS3 Pro. If you want, open two windows, and paste the following URLs (one in each window). See if this motion is kind of what you want, and if so, I'll give you the code (all of it, or just the peice movement part).

    http://newmatrix.cs.odu.edu:9024/TOM...electroserver1


    http://newmatrix.cs.odu.edu:9024/TOM...electroserver2

  9. #9
    Member
    Join Date
    Jul 2008
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts
    PS: the game is in development, and doesn't work without 2 players in a room; hence the two windows... sorry!

  10. #10
    Junior Member
    Join Date
    Aug 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for the reply jbrunelle. I've tried opening both links, the both give me flash errors. The start frame loads but 'roll' does nothing. I get the following

    ArgumentError: Error #2012: LoaderInfo class cannot be instantiated.
    at Main()
    at Example_fla::MainTimeline/frame10()
    ArgumentError: Error #2012: LoaderInfo class cannot be instantiated.
    at snakeTalker()


    Is your game connecting to electroserver?

    I'm mostly there with my desired movement. It's always handy viewing alternate source code form more experienced programmers

+ Reply to Thread

Tags for this Thread

Posting Permissions

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