<mx:HTML top="0" bottom="0" left="0" right="0" location="test.pdf"/>
<mx:Canvas top="0" bottom="0" left="0" right="0" initialize="canvasInit(event)">
</mx:Canvas>
in canvasinit event i did drawing the line in mouse using mouse.
if i try to set pdf as background to the canvas, it is not set as background. it will be in the foreground. how to send pdf as a background of canvas.
i tried lot. i am not able to set pdf as background. it comes to foreground.
so please if anybody is having an idea on tht please hlep me
If i load the html page instead of pdf. it works fines. i.e html page in background of canvas. i used following code
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"layout="absolute">
<mx:Script>
<![CDATA[
import mx.containers.Canvas;
private var drawing:Boolean = false;
private function canvasInit(e:Event):void {
var c:Canvas = Canvas(e.target);
c.graphics.lineStyle(2, 0xff0000, 1);
c.addEventListener(MouseEvent.MOUSE_UP, onMouseEvent);
c.addEventListener(MouseEvent.MOUSE_DOWN, onMouseEvent);
c.addEventListener(MouseEvent.MOUSE_MOVE, onMouseEvent);
}
private function onMouseEvent(e:MouseEvent):void {
//trace(e.type);
if (e.type == MouseEvent.MOUSE_DOWN)
drawing = true;
else if (e.type == MouseEvent.MOUSE_UP)
drawing = false;
else if (e.type == MouseEvent.MOUSE_MOVE) {
var c:Canvas = Canvas(e.target);
//trace((drawing ? "drawing to " : "moving to ") + e.localX + "," + e.localY);
if (drawing)
c.graphics.lineTo(e.localX, e.localY);
else
c.graphics.moveTo(e.localX, e.localY);
}
}
]]>
</mx:Script>
<mx:HTML top="0" bottom="0" left="0" right="0" location="http://labs.adobe.com/technologies/afcs/"/>
<mx:Canvas top="0" bottom="0" left="0" right="0" initialize="canvasInit(event)">
</mx:Canvas>
</mx:WindowedApplication>
instead of html page, if i put any pdf file. it is not in background. it comes to the foreground. i don't know how to set pdf as background. please help me