Re: [Flashcoders] hen's teeth...
I started with ActionScript and learned some PHP along the way. I found PHP pretty simple to learn but I always found it tedious to work with. I eventually picked up Ruby and really fell in love with it. The concepts were easy to learn coming from an AS background. Recently I've started to learn Objective-C and found the learning curve a little hard given what I was used to in AS but eventually it clicked. ActionScript is still my favorite, I wish it weren't so tied in to Flash. Jamie On Mon, Jan 4, 2010 at 4:40 PM, Paul Andrews p...@ipauland.com wrote: Dave Watts wrote: I would get comfortable with AS3 and programming in general before attempting to tackle a second language. I don't really agree with this. Learning a domain-specific language like AS3 teaches a fairly narrow view of programming and how it works. Perhaps you can explain how AS3 is narrow. For years Pascal was THE language to learn programming then eventually it migrated to Java and I don't consider AS3 to be a limited language or narrow in it's outlook. I think it's rather a good and accessible first language to learn. Your main point may be that AS3 is really a client side language, I'm really not sure what you perceive as a limitation. As a language it supports just about all the notions of a modern OO language, so I don't think it's really limiting at all. Most of the programming principles from Java and the like are easily implemented in AS3, so I have no idea where the problem is. It's always useful to learn other languages, but choose something complimentary such a server-side scripting language - PHP, C# whatever. A general-purpose programming language (C#, Python) complements anything. My problem with recommending PHP is that it's another domain-specific language. I would suggest PHP, not as an AS3 look-alike, but as a good compliment to AS3 - as good as C# as a companion to As3 in the real-world. Paul Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ___ 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 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] can Flex classes be used within (Flash CS3) along with ActionScript?
Most flex classes have dependancies in the Flex Framework which means that before you know it you are importing half of the framework to get one class or component to work. But here's a good blog post that describes how to import the Flex classes you need into a swc so at least you can keep it tidy. http://labs.wichers.nu/2007/12/25/using-flex-compiled-code-within-flash/ Jamie On Wed, Nov 26, 2008 at 12:57 PM, Eric E. Dolecki [EMAIL PROTECTED] wrote: Using a SWC, yes. But it's nasty work IMO. Use Flex Builder if you have it. On Wed, Nov 26, 2008 at 3:47 PM, BOYD SPEER [EMAIL PROTECTED] wrote: can Flex classes be imported and used within (Flash CS3) along with ActionScript? -Boyd ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- http://ericd.net Interactive design and development ___ 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] How do gain access to loaded swf? AS3 Flash
Security? try allowDomain() in the loaded swf On Fri, Sep 5, 2008 at 5:20 PM, Vayu Robins [EMAIL PROTECTED] wrote: Hi. I am struggling with this one. I am loading an external swf file that has a Document class into my main class/movie. So far so good, but I would like to make this external file into a button and interact with it from the main movie. I cant do anything to it though. It just loads and sits there. Thanks. Vayu ___ 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] Technical - assets question
You could also try setting the ActionScript export frame to 2 and put your preloader on frame 1. Jamie On Fri, May 2, 2008 at 5:08 PM, Omar Fouad [EMAIL PROTECTED] wrote: Well I'll give it a try and feedback On Sat, May 3, 2008 at 2:37 AM, Kenneth Kawamoto [EMAIL PROTECTED] wrote: Yes, why wouldn't? ...but I suppose root would change to the base SWF if you're using it to access the main timeline of the loadee. Kenneth Kawamoto http://www.materiaprima.co.uk/ Omar Fouad wrote: Than calling its classes normally? It will work? On Sat, May 3, 2008 at 1:38 AM, Kenneth Kawamoto [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: One way to tackle this is to load your SWF into an empty base SWF. By the way this is not a CS3 specific issue but existed since Flash 5. Kenneth Kawamoto http://www.materiaprima.co.uk/ Omar Fouad wrote: Hi list, I am starting a website, and I am using Flash CS3 (document Class) with Flash Develop, and I am using an .FLA File just to put the assets into the library. Now I am wondering how could I create a root preloader which will pop up at the beginning of the SWF file (there is only one swf file). How could I achieve this, if all the assets are loaded in the first frame of the swf file? at this case the preloader wont show unless all the library is loaded on runtime. Is there a way to load the library items in a second shot? Thanks for the help. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Omar M. Fouad - Digital Emotions http://www.omarfouad.net This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. ___ 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] How do you tell if an Object is dynamic?
I realized the moment i encountered the problem that dynamically adding a property to an argument was bad form so I went another direction with it (thanks to all who suggested creating a subclass), but I asked the question because I thought it was an interesting problem. The original function was used to add a unique token to an Object containing a set of arbitrary parameters. ( here's a simplified version ) function (theObject:Object) { theObject.__token = Math.random(); sendVarsToServer(theObject); } In the above function, you get an error if a non-dynamic subclass of Object is passed in. I think the suggestion to use flash.utils.describeType() was probably what I was looking for. Jamie On Jan 7, 2008 1:59 AM, Sunil Jolly [EMAIL PROTECTED] wrote: Have you got an example Jamie? Sunil -Original Message- From: Jamie S [mailto:[EMAIL PROTECTED] Sent: 05 January 2008 01:51 To: Flash Coders List Subject: [Flashcoders] How do you tell if an Object is dynamic? I ran into a particular situation where i had a function that took an Object as a parameter. I needed that Object to be an actual Object i.e. dynamic because the function was going to add properties to it. But since everything in ActionScript is an Object I had trouble enforcing this. Is there a way to check to see if an Object is dynamic? Or is there a way to enforce something as an Object rather than a subclass of in Object (which is everthing else)? Jamie ___ 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
[Flashcoders] How do you tell if an Object is dynamic?
I ran into a particular situation where i had a function that took an Object as a parameter. I needed that Object to be an actual Object i.e. dynamic because the function was going to add properties to it. But since everything in ActionScript is an Object I had trouble enforcing this. Is there a way to check to see if an Object is dynamic? Or is there a way to enforce something as an Object rather than a subclass of in Object (which is everthing else)? Jamie ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] load flex swf into flash CS3 project
I guess i'm thinking specifically of mx.core.Container Objects. Although you can use addChild() to add any DisplayObject, unless that DisplayObject implements IUIConponent, it wont work. Jamie On Dec 20, 2007 7:23 AM, Merrill, Jason [EMAIL PROTECTED] wrote: Also I've found that when trying to add a MovieClip instance to a UIComponent in Flex, the whole app just quits. Though technically there is nothing wrong with doing this, Flex components react badly to display objects that are not desensants of UIComponent. Interesting, I haven't encountered that in Flex (yet) - I have added Sprite instances to UIComponent instances with no problems. Knock on wood. Jason Merrill Bank of America LLD GTO eTools Multimedia Research Development ___ 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] load flex swf into flash CS3 project
Though i've never tried loading a Flex swf in Flash, I have done the opposite and ran into similar issues. Ultimately all of the problems I encountered were related to either security issues or incompatibilities in the loaded swf making the whole app fail with no indication why. To solve security problems make sure that if the loaded swf needs to communicate with the main movie or vice versa, that they are both in the same SecurityDomain AND ApplicationDomain, or that you make liberal use of flash.system.Security.allowDomain(). For general incompatibilities remember that the Flex app doesn't run on the stage but inside of a mx.managers.SystemManager instance. references to Application inside the Flex app will reference this class. Also remember that the SystemManager class is a MovieClip with two frames. The first frame is just a preloader so if you load a Flex swf into Flash, you will have to wait until the SystemManager gets to frame 2 and initializes everything before you can access it within Flash. Also I've found that when trying to add a MovieClip instance to a UIComponent in Flex, the whole app just quits. Though technically there is nothing wrong with doing this, Flex components react badly to display objects that are not desensants of UIComponent. I don't think there is no reason why what you are doing shouldn't work, you just have to work through it. Jamie On Dec 19, 2007 2:41 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello- I need to load a compiled AS3 based Flex 3 swf (a simple form with data validation) into an AS3 based Flash project I'm working on in CS3. I tried importing the .swf into the library pre-compile as well as loading it at runtime and nothing shows up. Can this be done? Any ideas? ___ 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] toString(aArray[i]) ?? does this work
toString() is a method of the Object class and it doesn't have any arguments. So while every object in Flash has a toString method, by default it returns [object Object]. From your code it looks like what you're actually doing is calling this.toString(), you probably want to do something like myStr:String = aArray[i].toString(); but that still might not give you what you're looking for. If the items in the array are references to movieclips and you want the instance names of those clips, you should try aArray[i]._name (AS2) or aArray[i].name (AS3) Jamie On 9/10/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Quick question, can I toString an array element. ie: var myStr:String = toString(aArray[i]);// where 'i' is the increment. I am having an issue with this. when I trace myStr it traces [object object] instead of what I intended/expected mcMovieClipName14 as a string. Any insite would be appreciated. Thanks in advance, Paul V. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] JumpShip Framework, version for AS3 and major update to AS2 version
I'm encouraging you all to check out the latest release of the JumpShip Framework for AS3. JumpShip is an ActionScript application framework that implements an MVC design pattern and adheres to the Ruby on Rails philosophy of Convention over Configuration i.e. making a few logical assumptions and adhering to a few basic standards will grand you a 10x improvement in development time. It attempts to be as Agile as you can be in Flash. Anyway. I'm the project lead and I would love if some of you take a look at it for the first time or revisit it if you've seen jumpShip before. Best, Jamie Scanlon ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Text blurry when behind a mask
If you're using Flash 8 try setting the anit-alias settings for Bitmap text (no anti-alias) J On 3/15/07, Johan Nyberg [EMAIL PROTECTED] wrote: Anybody know how to solve this annoying problem? Whenever I put text behind a mask, and then move the text - like for example if you want to make a simple scroller - the text gets blurry. Even when I use bitmap text. On the odd pixel the text is blurry, on the other sharp. -- Johan Nyberg Web Guide Partner Sergels Torg 12, 8 tr 111 57 Stockholm 070 - 407 83 00 ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Problem: Safari and dynamic loading?
I had a similar problem a while back with a project that required a lot of stuff (xml, swf's, and jpg's) to load all at once. It worked fine in publishing and in IE on Windows but Firefox (Mac and PC) and Safari (it was the wost with safari) would tend to miss stuff just as you have discribed. I the only way I was able to put the problem to bed for sure was to build a load manager class that would make sure everything loaded up one at a time. So all of the stuff that needed to be loaded would be put into a queue and the class would go through and load stuff, making sure not to load the next thing in the queue until the previous thing had finished. It did slow things down a little bit, but better that then having unpredictable results. Since I saw the problem in multiple browsers, I suspect it was more of a bug in the Flash Player. But it's clear that loading in tons of stuff at once can cause problems. Email me if you want me to send the load manager class. Best, Jamie On 11/22/06, Seb L [EMAIL PROTECTED] wrote: I've had this problem recently. I found it was an issue when the swf and the html file aren't in the same directory. Either put them both in the same directory, or give the full path in your filename. Let me know how you get along! Seb Lee-Delisle sebleedelisle.com On 22/11/06, Haydn [EMAIL PROTECTED] wrote: Hi, I'm pretty sure this is an issue with Safari as a similar problem somethings occurs when loading HTML pages. From what I can tell it's completely random. I'm using Safari 1.3.1 so maybe an update to 1.3.2 would fix the problem? Haydn. On 21/11/2006, at 9:08 PM, Daniel Forslund|Lists wrote: Hi everyone! I've researched this - apologies if I've missed the answer somewhere. Anyways: I have a flash application that reads an XML-file and then proceeds to load lots of content dynamically - a common situation. Everything works very well, except now and then in Safari. Safari will then miss loading an element and my preload bar for that object will hang indefinitely. A simple reload of the page solves the problem. This happens regardless of whether I've cleared Safari's cache etc. The problem *never* occurs in other browsers (Firefox for example) or offline. So I'm starting to suspect Safari as the culprit rather than my code. - Has anyone experienced the same problem? - Any idea what may be causing it? - Any pitfalls in using Moviecliploader that may cause this? I would be very thankful for advice as I want to pin down the problem before it causes problems for the client. Thanks in advance! Regards, Dan ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Multiple FLV files playing as only one
This may help you out. http://chattyfig.figleaf.com/pipermail/flashcoders/2006-May/165858.html Jamie On 11/15/06, Matheus Araujo [EMAIL PROTECTED] wrote: Hi, Is there any way to play multiple FLV files in sequence as if they are only one, with only one visual buffer? The sound will be a separated random file. The FLV and sound file names will be on a XML file. Thanks ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] create and save flv's dynamically
Hi All, I've been interested in developing an online video editing tool similar to jumpcut.com, eyespot.com etc. I know how to upload video clips trough the flash client, convert them to flv's with ffmpeg and display them back in the client with cute thumbnails. But how do I let people combine the clips and add transitions and effects and then save it out again as a new flv? Is this even possible? I thought about saving the new edited clip to a server running Flash Media Server as a shared object but then from there is there any way to save it out as an flv? I also though about exporting each frame as an image and re-combining it on the server but this seems like a hell of a lot of work. Any ideas? Thanks, J ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Still need help-Can't reference library font from class
Although I have had my fair share of headaches with TextFormat, I think I may know what is going on here. There are two methods for assigning a textFormat to a textField. These are setTextFormat() and setNewTextFormat(). The way I understand it setTextFormat() sets the style of the text that is currently assigned to the textField BUT any new text assigned by actionscript, by replaceSel() or by the user (in the case of input text) is styled according to the setNewTextFormat() method and if none is given, as in your class, the new text is given some default style, which, as you've noticed, is not necessarily the same as the style you defined by setTextFormat(). so I would try using setNewTextFormat() also and see if that works. J On 3/10/06, Merrill, Jason [EMAIL PROTECTED] wrote: I finally did get this to work by trying it in a fresh .fla, but now I'm seeing this issue: When I do this: import com.icfconsulting.objects.SimpleTextField; tf=SimpleTextField.create(this) It's fine, the text field show and with the right font. But when I try and set the text on the text field it returns, like this: import com.icfconsulting.objects.SimpleTextField; tf=SimpleTextField.create(this) tf.text=hello, hello! It just shows blank, like setting the text on the text field my class returns screws it up somehow. Any idea what's up? The class code is the same, and I am trying this in a new fresh .fla with a Swis font in the library. Why would adding that one line screw it up again? My simple class test file is as follows: class com.icfconsulting.objects.SimpleTextField{ public static function create(target_mc:MovieClip):TextField{ var my_fmt:TextFormat = new TextFormat(); my_fmt.font = Swis; my_fmt.color = 0x00; my_fmt.size = 16; target_mc.createTextField(tf_txt,0,20,20,200,20); target_mc.tf_txt.embedFonts = true; target_mc.tf_txt.text=Hello world; target_mc.tf_txt.setTextFormat(my_fmt); return target_mc.tf_txt; } } Jason Merrill | E-Learning Solutions | icfconsulting.com NOTICE: This message is for the designated recipient only and may contain privileged or confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of this e-mail by you is prohibited. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Still need help-Can't reference library font fromclass
Jason, try this... it worked for me. target_mc.tf_txt.setTextFormat(my_fmt); applies to the text in the textField before you apply setTextFormat i.e. Hello world and target_mc.tf_txt.setNewTextFormat(my_fmt); applies to all text after the setTextFormat call i.e. hi J class SimpleTextField{ public static function create(target_mc:MovieClip):TextField{ var my_fmt:TextFormat = new TextFormat(); my_fmt.font = Swis; my_fmt.color = 0x00; my_fmt.size = 16; target_mc.createTextField(tf_txt,0,20,20,200,20); target_mc.tf = target_mc.tf_txt target_mc.tf_txt.embedFonts = true; target_mc.tf_txt.text=Hello world; target_mc.tf_txt.setTextFormat(my_fmt); target_mc.tf_txt.setNewTextFormat(my_fmt); return target_mc.tf_txt; } } On 3/10/06, Merrill, Jason [EMAIL PROTECTED] wrote: Thanks Jamie - yeah, I thought of that, and Duncan also suggested it offlist, but any combination of setNextTextFormat doesn't seem to work for me either. My problem IS easily testable: 1. Create a font in your library - export it for actionscript, call it Swis. 2. Make your SimpleTextField.as class file next to your .fla like this: class SimpleTextField{ public static function create(target_mc:MovieClip):TextField{ var my_fmt:TextFormat = new TextFormat(); my_fmt.font = Swis; my_fmt.color = 0x00; my_fmt.size = 16; target_mc.createTextField(tf_txt,0,20,20,200,20); target_mc.tf = target_mc.tf_txt target_mc.tf_txt.embedFonts = true; target_mc.tf_txt.text=Hello world; target_mc.tf_txt.setTextFormat(my_fmt);//or setNewTextFormat return target_mc.tf_txt; } } 3. Put this code on the timeline: import SimpleTextField; tf=SimpleTextField.create(this) tf.text=hi If I remove the last line: tf.text=hi it works fine. If I leave it in, nothing appears on the stage. This is driving me nutz. Jason Merrill | E-Learning Solutions | icfconsulting.com -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Jamie S Sent: Friday, March 10, 2006 4:13 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] Still need help-Can't reference library font fromclass Although I have had my fair share of headaches with TextFormat, I think I may know what is going on here. There are two methods for assigning a textFormat to a textField. These are setTextFormat() and setNewTextFormat(). The way I understand it setTextFormat() sets the style of the text that is currently assigned to the textField BUT any new text assigned by actionscript, by replaceSel() or by the user (in the case of input text) is styled according to the setNewTextFormat() method and if none is given, as in your class, the new text is given some default style, which, as you've noticed, is not necessarily the same as the style you defined by setTextFormat(). so I would try using setNewTextFormat() also and see if that works. J On 3/10/06, Merrill, Jason [EMAIL PROTECTED] wrote: I finally did get this to work by trying it in a fresh .fla, but now I'm seeing this issue: When I do this: import com.icfconsulting.objects.SimpleTextField; tf=SimpleTextField.create(this) It's fine, the text field show and with the right font. But when I try and set the text on the text field it returns, like this: import com.icfconsulting.objects.SimpleTextField; tf=SimpleTextField.create(this) tf.text=hello, hello! It just shows blank, like setting the text on the text field my class returns screws it up somehow. Any idea what's up? The class code is the same, and I am trying this in a new fresh .fla with a Swis font in the library. Why would adding that one line screw it up again? My simple class test file is as follows: class com.icfconsulting.objects.SimpleTextField{ public static function create(target_mc:MovieClip):TextField{ var my_fmt:TextFormat = new TextFormat(); my_fmt.font = Swis; my_fmt.color = 0x00; my_fmt.size = 16; target_mc.createTextField(tf_txt,0,20,20,200,20); target_mc.tf_txt.embedFonts = true; target_mc.tf_txt.text=Hello world; target_mc.tf_txt.setTextFormat(my_fmt); return target_mc.tf_txt; } } Jason Merrill | E-Learning Solutions | icfconsulting.com NOTICE: This message is for the designated recipient only and may contain privileged or confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of this e-mail by you