Search Results

Search found 4 results on 1 pages for 'chunk1978'.

Page 1/1 | 1 

  • Actionscript: Why is drawRoundRectComplex() not documented?

    - by Chunk1978
    in studying actionscript 3's graphics class, i've come across the undocumented drawRoundRectComplex() method. it's a variant of drawRoundRect() but with 8 parameters, the final four being the diameter of each corner (x, y, width, height, top left, top right, bottom left, bottom right). //example var sp:Sprite = new Sprite(); sp.graphics.lineStyle(1, 0x000000); sp.graphics.drawRoundRectComplex(0, 0, 100, 50, 10, 20, 0, 10); addChild(sp); this seems to be a pretty useful method, so i'm just curious if anyone knows of any reasons why adobe chose not to document it?

    Read the article

  • Actionscript Receiving Mouse Events For Lower Indexed And Partially Covered Display Objects?

    - by Chunk1978
    i have 2 sprites on stage. bottomSprite is added to the display list first, followed by topSprite. topSprite partially covers bottomSprite. i've added an event listener to bottomSprite for MouseEvent.MOUSE_MOVED notifications to simply trace the mouseX and mouseY coordinates. however, the notification doesn't work for the parts of bottomSprite that are covered by topSprite. var bottomSprite:Sprite = new Sprite(); bottomSprite.graphics.beginFill(0x666666, 0.5); bottomSprite.graphics.drawRect(150,150, 150, 150); bottomSprite.graphics.endFill(); addChild(bottomSprite); var topSprite:Sprite = new Sprite(); topSprite.graphics.beginFill(0x00FFFF, 0.5); topSprite.graphics.drawRect(250,50, 150, 150); topSprite.graphics.endFill(); addChild(topSprite); bottomSprite.addEventListener(MouseEvent.MOUSE_MOVE, traceCoords); function traceCoords(evt:MouseEvent):void { trace ("Coord = X:" + bottomSprite.mouseX + ", Y:" + bottomSprite.mouseY); }

    Read the article

  • ActionScript shiftKey Not Working In Full Screen Mode?

    - by Chunk1978
    i've drawn an ellipse sprite and added it to the display list of a container, which is added to the display list of the stage. to move the sprites with the keyboard arrows, it appears that my shiftModifier:Number variable is not working when the stage's display state is set to full screen. shiftModifier works as it should when the stage's display state is set to Normal. stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyboardDown); function onKeyboardDown(evt:KeyboardEvent):void { var shiftModifier:Number = 0.25; if (evt.shiftKey) {shiftModifier = 10;} if (evt.keyCode == Keyboard.UP) {ellipse1.y -= shiftModifier;} if (evt.keyCode == Keyboard.DOWN) {ellipse1.y += shiftModifier;} if (evt.keyCode == Keyboard.LEFT) {ellipse1.x -= shiftModifier;} if (evt.keyCode == Keyboard.RIGHT) {ellipse1.x += shiftModifier;} } fsm.addEventListener(MouseEvent.CLICK, toggleFullScreenMode); function toggleFullScreenMode(evt:MouseEvent):void { if (stage.displayState == StageDisplayState.FULL_SCREEN) {stage.displayState = StageDisplayState.NORMAL;} else {stage.displayState = StageDisplayState.FULL_SCREEN;} } full screen is tested in Safari and Firefox.

    Read the article

  • Actionscript Removing Display Objects

    - by Chunk1978
    i don't understand why none of my display objects are not being removed. when i press the button, i'm expecting a trace and removal of both shapes and the button, but nothing happens: import fl.controls.Button; var shape1:Shape = new Shape(); shape1.name = "Shape1"; shape1.graphics.lineStyle(4, 0x000000); shape1.graphics.beginFill(0x000055, 0.5); shape1.graphics.drawRoundRect(50, 50, 100, 75, 20, 30); shape1.graphics.endFill(); addChild(shape1); var shape2:Shape = new Shape(); shape2.name = "Shape2"; shape2.graphics.lineStyle(4, 0xFFFF99); shape2.graphics.beginFill(0x550000, 0.5); shape2.graphics.drawRoundRect(100, 75, 200, 175, 50, 10); shape2.graphics.endFill(); addChild(shape2); button1.addEventListener(MouseEvent.CLICK, pushButton); function pushButton(evt:MouseEvent):void { for(var amount:int = numChildren; amount == 0; amount--) { trace(amount); var disObj:DisplayObject = getChildAt(amount); trace("Removing " + disObj.name); removeChildAt(amount); } }

    Read the article

1