dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: attachMovie Issue

  1. #1
    Junior Member
    Join Date
    Nov 2007
    Posts
    3

    attachMovie Issue

    I'm working on a small multiplayer project, and I've run into a pretty big issue.
    Suppose User A is logged on, waiting to play. His character is on the map.
    Then, User B logs on. User B's character shows up on his screen AND User A's screen. However, User A's character does not show up on User B's screen.
    Whew.
    Anyways, I cornered the problem down to this. I ran this code:
    Code:
    npuID = npud+1; 
    npuX = "npu"+npuID;
    if(game.clip.attachMovie("char", npuX, npu.depth)) {
    trace("Working"); 
    } else {
     trace("AWWW"); 
    }
    The code Traces "Working" when User B logs on for user A, however, it Traces "AWWW" for User B's screen when trying to create User A's character.
    I really do not know what is wrong, any help would be appreciated.
    If I'm not explaining it well, tell me, and I will try my best to elaborate.

  2. #2
    Heli Attack! iopred's Avatar
    Join Date
    Jun 2003
    Location
    Sydney, Australia
    Posts
    923
    try using:

    npuID instead of npu.depth.
    Christopher Rhodes
    squarecircleco.

  3. #3
    Junior Member
    Join Date
    Nov 2007
    Posts
    3
    Thanks!
    That was part of the problem. The other issue was I needed to add Thread.sleep(100); to the server end.

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