Flash - PWM works on Duemilanove, on Mega - no?

Hi there,
I have problem interfacing flash with Arduino Mega board.
Ok the code I use is from Arduino.cc tutorials (“/* Arduino communication with Flash
* Use Arduino as an interfaceboard for Flash applications.
*
* This code should be used with the following flash files :
* Flash_arduino.fla
* ArduinoFO.as
* ArduinoXML.as???and so on?”
and works just fine for Duemilanove board. PWM works correct when command it from flash program.
My problem is with Mega board. I use the same code as the Duemilanove with slide modifications because of increased number of pins. Everything else works fine (Digital Input. Digital Output, Analog Input) interfacing with flash except PWMs. Same flash movie (with small modification) gives strange output on PWMs. I use slider to control PWM from 0 to 254. When I move slider output voltage, from PWM pin, just jump to random values from 0 to 5 V, also never the same value on same position of the slider. Also I notice on scope that for 5 V generated from any PWM pin it never gives straight line for 5 V. It’s always gives rectangles with huge 5 V segment and small 0 V segment. The same configuration works very nice with Duemilanove (picture on scope is what it should be).
So what’s wrong here? Where is my mistake?
Thank you!