?php $s = new SWFShape(); $s - setRightFill($s - addFill(0xff, 0, 0)); $s - drawLine(1000,0); $s - drawLine(0,1000); $s - drawLine(-1000,0); $s - drawLine(0,-1000); $b = new SWFButton(); $b - addShape($s, SWFBUTTON_HIT _BAR_ SWFBUTTON_UP _BAR_ SWFBUTTON_DOWN _BAR_ SWFBUTTON_OVER); $b - addAction(new SWFAction("startDrag(' / test', 0) ;"), / / '0 'means don't lock to mouse SWFBUTTON_MOUSEDOWN); $b - addAction(new SWFAction("stopDrag() ;"), SWFBUTTON_MOUSEUP _BAR_ SWFBUTTON_MOUSEUPOUTSIDE); $p = new SWFSprite(); $p - add($b); $p - nextFrame(); $m = new SWFMovie(); $i = $m - add($p); $i - setName('test'); $i - moveTo(1000,1000); header('Content-type: application / x-shockwave-flash'); $m - output();?
?php $s = new SWFShape(); $s - setRightFill($s - addFill(0xff, 0, 0)); $s - drawLine(1000,0); $s - drawLine(0,1000); $s - drawLine(-1000,0); $s - drawLine(0,-1000); $b = new SWFButton(); $b - addShape($s, SWFBUTTON_HIT _BAR_ SWFBUTTON_UP _BAR_ SWFBUTTON_DOWN _BAR_ SWFBUTTON_OVER); $b - addAction(new SWFAction("startDrag(' / test', 0) ;"), SWFBUTTON_MOUSEDOWN); / / '0 'signifie: ne pas verrouiller la souris $b - addAction(new SWFAction("stopDrag() ;"), SWFBUTTON_MOUSEUP _BAR_ SWFBUTTON_MOUSEUPOUTSIDE); $p = new SWFSprite(); $p - add($b); $p - nextFrame(); $m = new SWFMovie(); $i = $m - add($p); $i - setName('test'); $i - moveTo(1000,1000); header('Content-type: application / x-shockwave-flash'); $m - output();?