A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: 'Fixing' old code..

  1. #1
    Member
    Join Date
    Feb 2002
    Posts
    34
    Hey I was looking throught the tutorials when I noticed one I wanted to learn - http://www.flashkit.com/tutorials/Sp...52/index.shtml - but the code doesn't work with 5 or MX. I've tried converting it myself, but I'm stilla dumb newb. The code is

    Set Variable: "index" = 0
    Set Variable: "loop" = Int (Random (10))

    and

    If (index<=loop)
    Set Variable: "index" = index+1
    Go to and Play (2)
    End If
    Any help with making this code MX compatible will be greatly appreciated. Thanks!

  2. #2
    Guest
    Join Date
    Jan 2001
    Location
    Timeline,Frame No.260
    Posts
    1,365
    int index = 0
    int loop = Int(Random (10))


    If (index<=loop)
    {
    index = index+1
    gotoAndPlay(2)
    }
    try it...lemme know if it worked


    by the way this is the wrong board to post.....this would be better off in the action script board..or general help..

  3. #3
    Member
    Join Date
    Feb 2002
    Posts
    34
    Thanks! Sorry bout posting in the wrong board, wont happen again.

    int index = 0
    int loop = Int(Random (10))
    That didn't work though. :-/ I think the rest did.

  4. #4
    Guest
    Join Date
    Jan 2001
    Location
    Timeline,Frame No.260
    Posts
    1,365
    int index = 0;
    int loop = Int(Random (10));

    add th semilcolons
    if it still give the problem..open the action script reference from the flash 5 help..and search for the random script to see the syntax...
    i think this line

    int loop = Int(Random (10))has a problem...
    remove the Int and then try

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center