A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Discovering legacy issues already with 8

  1. #1

    Discovering legacy issues already with 8

    I wrote a small game a few weeks ago in flash 7. Now I've updated it to flash 8 to benefit from cacheAsBitmap, yet now key commands need to be rewritten. Check it out for yourself. Play the version 7 one first. Spacebar to shoot, 4 arrows to move the ship around. Also notice the performance increase with version 8.

    Flash 7 version

    Flash 8 version

    This isn't the first time I've come across legacy issues. I have another application that uses XML and a few classes wouldn't work with the version 8 player. Had to debug and rewrite code to support 8, yet then wouldn't work under the flash 7 player. MM isn't doing to well with this new player. Beta or not, flash 8 is due out in 3 weeks, which means this beta version is final or near final.

  2. #2
    Senior Moderator
    Join Date
    Apr 2000
    Location
    Sheffield, UK
    Posts
    3,881
    How were your key commands written in the first place?

    If you were using the Key object event broadcast, then there are no legacy issue involved.

  3. #3
    Developer
    Join Date
    Sep 2001
    Location
    The Bluegrass State Will Flash For Food ™
    Posts
    3,786
    Without actually having the IDE I wouldn't automatically say they are bugs, it's in beta so that you can test these things. In your first example your legacy content still works in FP8 when published with MX04 correct? [I assume you're using one of the many workarounds to publish for FP8.] And you logged buggs for any other issues right?

  4. #4
    Quote Originally Posted by gSOLO_01
    Without actually having the IDE I wouldn't automatically say they are bugs, it's in beta so that you can test these things. In your first example your legacy content still works in FP8 when published with MX04 correct? [I assume you're using one of the many workarounds to publish for FP8.] And you logged buggs for any other issues right?
    This is true, the flash 8 IDE may compile differently for player 8. Yet the XML problem I had was with using the player 8 vs the player 7. No workaround used. Just installed the player 8 plugin and noticed my app stopped functioning Properly. My game however needs a workaround for the player 8 to recognize the player 8 commands, and then the key's don't work. So, I guess the two are not similar incidents.

    In case someone can see a flaw, here is the key functionality, but I'm sure its' ok...

    Code:
    function setKeyListner() {
    	keyListener = new Object();
    	keyListener.onKeyDown = onKeyDownHandler;
    	keyListener.onKeyUp = onKeyUpHandler;
    	Key.addListener(keyListener);
    }
    function onKeyDownHandler() {
    	if (Key.getCode() == 37) {
    		shipBank("left");
    	} else if (Key.getCode() == 39) {
    		shipBank("right");
    	} else if (Key.getCode() == 38) {
    		shipThrust("up");
    	} else if (Key.getCode() == 40) {
    		shipThrust("down");
    	} else if (Key.getCode() == 32) {
    		Audio.laser();
    		new Missle();
    	}
    	}
    function onKeyUpHandler() {
    	if(Key.getCode() == 37 || Key.getCode() == 39){
    		shipBank(0);
    	}else if(Key.getCode() == 38 || Key.getCode() == 40){
    		shipThrust(0);
    	}
    }
    Last edited by csdstudio; 08-10-2005 at 01:31 PM.

  5. #5
    Senior Moderator
    Join Date
    Apr 2000
    Location
    Sheffield, UK
    Posts
    3,881
    Strange, cos that code works fine for me. Changing the functions to trace out values. Also your swf's both work fine for me too.

    What exactly is the problem? And what was the problem you were having with XML?

  6. #6
    Quote Originally Posted by FlashGuru
    Strange, cos that code works fine for me. Changing the functions to trace out values. Also your swf's both work fine for me too.

    What exactly is the problem? And what was the problem you were having with XML?
    Did you try the game in fp8? The code itself works fine. Worked fine in fp7 and fp8 as published to fp7. But setting the version bit to 8 and then playing in fp8 causes the game to not release the keys while holding more than one key. Moving the ship while firing causes the ship to move on its own even when releasing the keys. Persists on moer than one machine.

    As far as the XML, I wrote a SortXML class to sort nodes in alphetical order. In short, takes nodes and puts them in an array, then sorts them and appends the data back into the main tree. I will shorten the code and leave most of it out...this worked in fp7 and not fp8....
    Code:
    fileArray.push({ nodeData:i_xml.childNodes[name]});
    //code to sort here
    i_xml.appendChild(folderArray[i].nodeData);
    But then I debugged, and changed code to this in order to get it to work in fp8....

    Code:
    fileArray.push({ nodeData:i_xml.childNodes[name]});
    //code to sort here
    i_xml.appendChild(new XML(folderArray[i].nodeData).firstChild);

  7. #7
    Senior Moderator
    Join Date
    Apr 2000
    Location
    Sheffield, UK
    Posts
    3,881
    Very strange. Did you file these as bugs? Can u attach a Version 8 .swf of the game for me?

  8. #8
    Ok, back to the key thing, here's a quick example. Make sure you are using fp8.

    press and hold down three letters, then release each letter one at a time. You will see flash display which key was released. In fp7, all three keys will list, in fp8 only one key shows up

    try me

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