Hi Amanda

There's a reasonably simple javascript solution for you.

Javascript
<!--
//sends var to form from your swf
function setFormText(XYpos) {
  textobject = document.myForm.XYlocation; //change myForm to the name of
your form
  textobject.value = XYpos;
}
//-->

Add a hidden textfield to your form named XYlocation


In Flash swf
//--------------------------------------------
var xStyle_fmt = new TextFormat();
xStyle_fmt.font = "_sans";
xStyle_fmt.bold = true;
xStyle_fmt.size = 16;
//----------------------------------------------
this.onMouseDown = function() {
        this.createEmptyMovieClip("x_mc", 9999);
        with (this.x_mc) {
                this.createTextField("x_txt", 1200, _parent._xmouse-10,
_parent._ymouse-10, 20, 20);
                        //_xmouse-10 and _ymouse-10 places the centre of the
text X at the mouse arrow point
                this.x_txt.setNewTextFormat(_parent.xStyle_fmt);
                this.x_txt.text = "X";
                this.x_txt.textColor = 0xFF0000;
        }
};
this.onMouseUp = function() {
        var XYpos = "X=" + this._xmouse + " Y+" + this._ymouse;
        trace("XY+" + XYpos);
        getURL("javascript:setFormText(XYpos)")
};
//--------------------------------------------------------------------------
----


HTH

Richard
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to