RE: [Flashcoders] inserting an MC in a TextField (and speaking to it)
Interesting, I'll have to give it a whirl. Thanks. Regards, -Keith http://keithreinfeld.home.comcast.net > -Original Message- > From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders- > boun...@chattyfig.figleaf.com] On Behalf Of Matt S. > Sent: Wednesday, January 28, 2009 6:41 AM > To: Flash Coders List > Subject: Re: [Flashcoders] inserting an MC in a TextField (and speaking to > it) > > It did work, actually, in terms of inserting it into the TextField, i > guess because the class name effectively functions as the Library > identifier. However, your tip regarding "ID" did the trick for > communicating with it, since I still couldnt modify it, the way I had > it. :) > > thanks, > > .matt ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] inserting an MC in a TextField (and speaking to it)
It did work, actually, in terms of inserting it into the TextField, i guess because the class name effectively functions as the Library identifier. However, your tip regarding "ID" did the trick for communicating with it, since I still couldnt modify it, the way I had it. :) thanks, .matt On Wed, Jan 28, 2009 at 12:31 AM, Keith Reinfeld wrote: > Matt, > > I s'pose I focused too much on the second part of your question in my > previous message. So anyway, if this > >> src='com.myclasses.DropCap' > > actually works then more power to ya! > > If not: > > ActionScript 3.0 Language and Components Reference: > > src: Specifies the URL to an image or SWF file, or the linkage identifier > for a movie clip symbol in the library. > > So, if you have a movieclip in your library with a linkage identifier of > 'DropCap' (associated with a class 'com.myclasses.DropCap') you would use: > > var tString:String = " style='padding:0px;margin:0px'/>Lorem ipsom yadda yadda..."; > myTextField.htmlText = tString; > myTextField.DC0.txt.text = "Z"; > > > Regards, > > -Keith > http://keithreinfeld.home.comcast.net > > > > > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] inserting an MC in a TextField (and speaking to it)
Matt, I s'pose I focused too much on the second part of your question in my previous message. So anyway, if this > src='com.myclasses.DropCap' actually works then more power to ya! If not: ActionScript 3.0 Language and Components Reference: src: Specifies the URL to an image or SWF file, or the linkage identifier for a movie clip symbol in the library. So, if you have a movieclip in your library with a linkage identifier of 'DropCap' (associated with a class 'com.myclasses.DropCap') you would use: var tString:String = "Lorem ipsom yadda yadda..."; myTextField.htmlText = tString; myTextField.DC0.txt.text = "Z"; Regards, -Keith http://keithreinfeld.home.comcast.net ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] inserting an MC in a TextField (and speaking to it)
Matt, You need to set the img tag's id attribute: var tString:String = "Lorem ipsom yadda yadda..."; Then it's: myTextField.htmlText = tString; myTextField.DC0.txt.text = "Z"; HTH Regards, -Keith http://keithreinfeld.home.comcast.net > -Original Message- > From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders- > boun...@chattyfig.figleaf.com] On Behalf Of Matt S. > Sent: Tuesday, January 27, 2009 12:06 PM > To: Flash Coders List > Subject: [Flashcoders] inserting an MC in a TextField (and speaking to it) > > So I want to do a dynamic drop cap in a text field, and I know I can do > this: > > var tString:String = " style='padding:0px;margin:0px'/> Cras sit amet arcu. Vestibulum > condimentum risus ac metus. Vivamus in purus id leo molestie > convallis. Donec ipsum. Sed vulputate urna sed erat. Vivamus tellus > elit, accumsan non, sodales quis, semper sit amet, risus. Phasellus eu > augue sit amet libero facilisis pretium. Nullam urna massa, adipiscing > a, lobortis nec, vehicula ut, lorem. Ut imperdiet elit nec sapien. In > hac habitasse platea dictumst. Quisque congue. In a velit. Praesent > interdum purus a diam. Ut turpis justo, viverra quis, dignissim at, > aliquam sit amet, turpis. Morbi non lacus at lacus commodo dignissim. > Nulla in quam eu massa scelerisque elementum. Curabitur mollis egestas > leo. Morbi pulvinar nisl sed lacus. Quisque eu orci."; > > myTextField.htmlText = tString; > > > In which DropCap is an MC in the library with a Class of > com.myclasses.DropCap. > > What I cant figure out is, how (if its even possible) can I speak to > that Movieclip once its in the Textfield? I want to set the character > that appears in the DropCap, so do something like DropCap.txt.text = > "Z", but if I try that it throws an error. Does anyone know of a way > to make this work? > > tia, > > .matt > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders