A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Is anyone else having trouble with web browsers?

Hybrid View

  1. #1
    Member
    Join Date
    Nov 2005
    Posts
    42

    Is anyone else having trouble with web browsers?

    Hi guys, I am desperate for some help any advice much appreciated! I would be
    interested to hear if anyone else has had this problem and how they solved it?
    I am working in MX pro 2004 and Learning Action Script and behaviours and have
    created a moving character based on these bits of code.

    onClipEvent(enterFrame){
    if (Key.isDown(Key.RIGHT)) {
    _root.sprite._x += 10;
    }
    (and so on for the up, right and left)

    onClipEvent (keyDown) {
    if (Key.getCode() == Key.DOWN) {
    _root.sprite.gotoAndStop(1);
    _root.sprite.down.play();
    }
    (and so on for the up, right and left)

    onClipEvent (keyUp) {
    if (Key.getCode() == Key.DOWN) {
    _root.sprite.down.stop();
    }

    Now when I publish it and view it through a browser the character "locks" she doesn't
    move properly or play the correct walking animations for each key press until I click
    on her! Runs fine as far as I can see when I test the movie or play it through the flash
    player, but really wanted it to be eventually uploaded onto the web.

    Thanks in advance

  2. #2
    Moderator enpstudios's Avatar
    Join Date
    Jun 2001
    Location
    Tampa, Fl.
    Posts
    11,282
    You need to use the flashObject to embed your .swf the right way:

    http://www.flashkit.com/board/showthread.php?t=682691

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