Crappy quality in Flex versus CS3!

i setup a camera streaming app to FMS … it works great with awesome quality when i’ve developed it in adobe cs3 … however … when i ported it to flex 2 … i can’t get the quality nowhere near the cs3 app … im not sure where to go from here …

my cs3 code:

    mycam = Camera.get();
mycam.setMode (300,240,20);
    mycam.setKeyFrameInterval (28);
    mycam.setQuality (40000,85);
ns.attachVideo(mycam);

flex 2:

cam.setMode(300,240,15,false);
cam.setKeyFrameInterval (4);
cam.setQuality (0,100);

cam = Camera.getCamera();

mic = new Microphone();
mic = Microphone.getMicrophone();
mic.rate = 15;

nsBroadcast = new NetStream(ncBroadcast);
nsBroadcast.attachCamera(cam);
nsBroadcast.attachAudio(mic);

bandwdith is not a factor and this has been tested with several cameras from different users for a couple of months … please let me know what you guys think could be the issue!

thanks!