[flexcoders] Having trouble using createTextField
I am trying to create a textfield when you click inside a canvas at the x and y coordinates and it continues not to work. My understanding is that the canvas extends movieclip so I could add a textfield to it. It would help to possibly get a better understanding of how this all works. Here is my code: mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; mx:Script ![CDATA[ function onMouseDownEvent() { var point = {x:mouseX, y:mouseY}; canvasText.createTextField(mytext,0,point.x,point.y, 40, 40, {text:'this is a test'}); }; ]] /mx:Script mx:Canvas id=canvasText mouseDown=onMouseDownEvent(); width=300 height=300/ /mx:Application I also cannot define properties when the app starts for instance canvasText.mytext.border can not be defined in the function. I modified this slightly and it work well in flash. Please help. Thanks. Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] getting text out of swf in flex
Hi, I am trying to get a better understanding of how swf files work in flex and I have a little swf file that contains a textinput field with some text in it. I want to hit a button and the text contained in that swf textinput field shows up in the textinput field in my flex application. Here is my fuction: function foo() { flextext.text = text1.text; } where flextest is the id of a textinput box in Flex and text1 refers to the text box in the swf file Now, here is the problem, flex tells me that there is no property with the name text1. Of course there is, but it is in my swf file? Any ideas on how to fix this? Thanks. Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: getting text out of swf in flex
I have a mx:image tag in my flex application that references the swf file. the swf file contains this information. this.createClassObject(mx.controls.TextInput, text1, this.getNextHighestDepth(), {_x:10, _y:10, text:'check this out'}); Inside Flex Builder it actually shows me a box with my swf file that contians the textinput box with the sample text. Below that I have an simple button that when click runs the function: function foo() { flextext.text = text1.text; } then below the button I have another mx:textInput with an id of flextext. It all seems right to me but i seem to be missing something because I continue to get the error that text1 does not exist... Thanks. --- In flexcoders@yahoogroups.com, Abdul Qabiz [EMAIL PROTECTED] wrote: Hi, You mean you have have a separate SWF file which you embedding in Flex app and trying to communicate with Flex components? Please make it more clear by providing more details... -abdul -Original Message- From: carmhuntress [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 13, 2005 9:57 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] getting text out of swf in flex Hi, I am trying to get a better understanding of how swf files work in flex and I have a little swf file that contains a textinput field with some text in it. I want to hit a button and the text contained in that swf textinput field shows up in the textinput field in my flex application. Here is my fuction: function foo() { flextext.text = text1.text; } where flextest is the id of a textinput box in Flex and text1 refers to the text box in the swf file Now, here is the problem, flex tells me that there is no property with the name text1. Of course there is, but it is in my swf file? Any ideas on how to fix this? Thanks. Yahoo! Groups Links Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Editing Text
Hi, I am trying to dynamically getnerate text with an embeded swf file and enabe the thing to be editable when you click on it. Here is what I have so far. import mx.controls.TextInput; _root.onMouseDown = function() { _root.createTextField(mytext,1,_xmouse,_ymouse,200,100); mytext.type = input; mytext.multiline = true; mytext.type = input; mytext.border = false; mytext.background = false; }; Mouse.addListener(mouseListener); Right now when I click on the text it re-creates the textfield. How do I set up something so when I click on it it becomes editable. Thanks. Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/