AS2 and AS3 are similar, but incompatible. You'd have to spend some time tweaking the AS2 version you have to get it to compile in AS3, so just try Manish's AS3 version instead: http://tasmania.globat.com/~mannu.info/flex/sprintf.as
-d Rick Root wrote: > I found an actionscript class to do Sprintf functionality... it works in > AS2... > > http://natecook.com/downloads/sprintf.html > > However, I'm not sure how to use it in my Flex app - or if I can use it. > > Any suggestions? > > I tried creating a new AS class and copying the code into it but it doesn't > work... I essentially nested it inside a package statement so I have this... > > package > { > public class com.natecook.Sprintf > { > } > } > > I use import "com.natecook.Sprintf"; to bring it in... But then I get > "packages cannot be nested... > > If I do it just in a plain old actionscript file... and do "import Sprintf" > I get this error: > > Severity Description Resource In Folder Location Creation Time Id > 2 A file found in a source-path must have an externally visible definition. > If a definition in the file is meant to be externally visible, please put > the definition in a package. Sprintf.as ResearchRequests March 22, 2007 > 11:58:01 AM 2767 > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Upgrade to Adobe ColdFusion MX7 The most significant release in over 10 years. Upgrade & see new features. http://www.adobe.com/products/coldfusion?sdid=RVJR Archive: http://www.houseoffusion.com/groups/Flex/message.cfm/messageid:3787 Subscription: http://www.houseoffusion.com/groups/Flex/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.37
