Re: [Flashcoders] NetConnection Debugger not working in Flash 8?
I have exactly the same problem. I have installed a fresh version of 8 and then remoting and components. Do you have Flash 7 and Flash 8 on the same pc? Im wondering if it is possible to install 7 first and then install 8 'over the top of 7' to solve this problem. I read about copying old library files across but as far as I can see I am missing nothing. -- Gavin Lilley. On 1/20/06, Grant Cox [EMAIL PROTECTED] wrote: I have just upgraded my workflow to Flash 8 and the latest MTASC today, and found that while my Remoting calls were working, nothing was printing in the NetConnection Debugger. After some debugging I have found that I cannot get anything to print to the NetConnection Debugger even from within the Flash 8 IDE, and this is with a clean reinstall of Flash 8 (no previous version of Flash installed) and the Remoting components. I have set the Flash 8 security settings to Always Allow, and to trust anything in C:\. The follow code, when applied to the first frame of an empty movie with just the RemotingConnector Component on the stage, works in Flash 7, but does not work in Flash 8. The log messages work fine (and the remoting connection is created and works), but nothing appears in the NetConnection Debugger. Can anyone see a problem with this, or even replicate the error? Regards, Grant Cox /// import mx.remoting.Service; import mx.services.Log; import mx.remoting.debug.NetDebug; NetDebug.initialize(); var myLogger:Log = new Log(Log.DEBUG, logger1); myLogger.onLog = function(message:String) { trace(NetConnection LOG: + message); }; var gatewayURL:String = http://localhost/myproject/gateway.php;; var userService:Service = new Service ( gatewayURL, myLogger, Users, null, null ); trace(gateway at: + gatewayURL + user service: + userService ); NetDebug.trace(testing testing testing); stop(); ___ 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] Documenting my code
Looks good - but sadly doesn't support inheritance: http://www.senocular.com/projects/ZenDoc/doc/#manual_limitations Which is a real shame. The hunt for the perfect documentation tool goes on. :-) (At this rate I might be forced to write one. ;-) ) Ian On 1/20/06, Duncan Reid [EMAIL PROTECTED] wrote: Not sure if this has been mentioned but there is also ZenDoc written in php that has multiple output modes based on templates, i've played a little with the demo and it looks promising, plus it's free and open as far as i can tell... http://www.senocular.com/projects/?project=ZenDocpage=demo Dunc ___ 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] Fire Event Manually
Anybody can helps me with this? I have a collection of checkbox, with their own actionscript code in the on(click) or on(change) region of code to manage events... in one special case, i want to manually (through actionscript code in a class) fire the click event on every checkbox control of my panel. there is any way to make this? to fire click event like if a user interacts with the control and click on it? I'm talking about Checkbox Control (not about HTML checkbox) ... thank u in advance! ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Good Intro to Flash and SCORM?
I need to hand roll some content in flash that can be tracked using SCORM. Anyone have a good online reference I can start with? Thanks! --dan ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Q:Class relationship puzzle
John No, Global can and does function independently of Local. It doesn't 'need' Local. The basic sequence again is this: Application class is instantiated on the main timeline or _root. Global is instantiated from within the 'Application' class which also references the Global class thru a _global variable. Local is instantiated afterwards and references the Global class thru the same _global variable. Local then passes an object to a public method in the Global class. This public method in Global then triggers a public method in Local (a reference to the Local public method was contained in the object passed to the Global public method) Does this make sense? [e] jbach at bitstream.ca [c] 416.668.0034 [w] www.bitstream.ca ...all improvisation is life in search of a style. - Bruce Mau,'LifeStyle' ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Aliased text corruption problem
I love the anti-alias for readability text option in Flash 8 and try and use it all the time but its giving me odd results when I use it with the Futura typeface. What's happening is that the lower case w is becoming corrupted. You can see an example at http://www.joecutting.com/demos/aliasTest.html This only happens with antialias for readability if I choose anti-alias for animation its fine. It happens with both static and dynamic text. I also have two different versions of Futura - one Truetype and one Postscript and it happens with both of them but not with other typefaces. So, - Is this an artifact of the shape of the letter and this particular algorithm - I haven't tried using the custom aliasing settings because I don't really understand them. If anyone's got any suggestions that would be great. - Is is because I'm using badly made typefaces - although it seems unlikely that both the TT and PS ones would give the same problem. - Is this a bug in the text engine that I should tell Macrobe about? Anybody else had this or found a solution? Cheers Joe ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Aliased text corruption problem
I get this with other fonts too...but it's more random - sometimes I get block artefacts as well. M -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joe Cutting Sent: 20 January 2006 13:17 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Aliased text corruption problem I love the anti-alias for readability text option in Flash 8 and try and use it all the time but its giving me odd results when I use it with the Futura typeface. What's happening is that the lower case w is becoming corrupted. You can see an example at http://www.joecutting.com/demos/aliasTest.html This only happens with antialias for readability if I choose anti-alias for animation its fine. It happens with both static and dynamic text. I also have two different versions of Futura - one Truetype and one Postscript and it happens with both of them but not with other typefaces. So, - Is this an artifact of the shape of the letter and this particular algorithm - I haven't tried using the custom aliasing settings because I don't really understand them. If anyone's got any suggestions that would be great. - Is is because I'm using badly made typefaces - although it seems unlikely that both the TT and PS ones would give the same problem. - Is this a bug in the text engine that I should tell Macrobe about? Anybody else had this or found a solution? Cheers Joe ___ 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] Converting amp; in a URL?
Hi list, does ActionScript have any facilities to convert special characters like amp; into just ? I have one Flash movie that reads URLs from an RDF file where all URLs are written with amp; inside the adress. My client would like these special chars to be converted to ''. Does Flash has anything to do that automatically (haven't found anything so far) or do I have to write my own convert method? Thanks for help, Sascha -- Flash Game Programming Wiki http://fgpwiki.corewatch.net/ H1DD3N.R350URC3 http://hiddenresource.corewatch.net/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Converting amp; in a URL?
You write your own or use the %26 escape sequence instead of amp; On 20/01/06, Sascha Balkau [EMAIL PROTECTED] wrote: Hi list, does ActionScript have any facilities to convert special characters like amp; into just ? I have one Flash movie that reads URLs from an RDF file where all URLs are written with amp; inside the adress. My client would like these special chars to be converted to ''. Does Flash has anything to do that automatically (haven't found anything so far) or do I have to write my own convert method? Thanks for help, Sascha -- Flash Game Programming Wiki http://fgpwiki.corewatch.net/ H1DD3N.R350URC3 http://hiddenresource.corewatch.net/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Yotam Laufer | Flash Developer | mobile +44 (0) 79 205 17 212 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Converting amp; in a URL?
Are you outputting these URLs or using them in getURL()? That should work in getURL(). But if you're outputting them, one way to convert them is to use HTML text fields. Or, if you can't change the text fields, try this: str = Sometext with an amp; in.; function convert(str, from, to) { return str.split(from).join(to); } trace(convert(str, amp;, )); Adrian -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Sascha Balkau Sent: 20 January 2006 14:10 To: flashcoders Subject: [Flashcoders] Converting amp; in a URL? Hi list, does ActionScript have any facilities to convert special characters like amp; into just ? I have one Flash movie that reads URLs from an RDF file where all URLs are written with amp; inside the adress. My client would like these special chars to be converted to ''. Does Flash has anything to do that automatically (haven't found anything so far) or do I have to write my own convert method? Thanks for help, Sascha ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Fire Event Manually
myCheckBox.dispatchEvent( {type:cick, target:myCheckBox}); or should work ? Grant. - Original Message - From: julian atienza [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: 1/20/06 5:59 AM Subject: [Flashcoders] Fire Event Manually Anybody can helps me with this? I have a collection of checkbox, with their own actionscript code in the on(click) or on(change) region of code to manage events... in one special case, i want to manually (through actionscript code in a class) fire the click event on every checkbox control of my panel. there is any way to make this? to fire click event like if a user interacts with the control and click on it? I'm talking about Checkbox Control (not about HTML checkbox) ... thank u in advance! ___ 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] Documenting my code
Before you write one, please have a look at writing the filter for Doxygen. Ron Ian Thomas wrote: Looks good - but sadly doesn't support inheritance: http://www.senocular.com/projects/ZenDoc/doc/#manual_limitations Which is a real shame. The hunt for the perfect documentation tool goes on. :-) (At this rate I might be forced to write one. ;-) ) Ian On 1/20/06, Duncan Reid [EMAIL PROTECTED] wrote: Not sure if this has been mentioned but there is also ZenDoc written in php that has multiple output modes based on templates, i've played a little with the demo and it looks promising, plus it's free and open as far as i can tell... http://www.senocular.com/projects/?project=ZenDocpage=demo Dunc ___ 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] Fire Event Manually
unless dispatchEvent is a private method ;) On 20 Jan 2006 14:27:30 -, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: myCheckBox.dispatchEvent( {type:cick, target:myCheckBox}); or should work ? Grant. - Original Message - From: julian atienza [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: 1/20/06 5:59 AM Subject: [Flashcoders] Fire Event Manually Anybody can helps me with this? I have a collection of checkbox, with their own actionscript code in the on(click) or on(change) region of code to manage events... in one special case, i want to manually (through actionscript code in a class) fire the click event on every checkbox control of my panel. there is any way to make this? to fire click event like if a user interacts with the control and click on it? I'm talking about Checkbox Control (not about HTML checkbox) ... thank u in advance! ___ 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 -- Yotam Laufer | Flash Developer | mobile +44 (0) 79 205 17 212 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Good Intro to Flash and SCORM?
http://www.brajeshwar.com/archives/2003/12/scorm-what-is-what-isnt-flash -and-scorm-and-scorm-faq/ http://www.adlnet.org/scorm/articles/2.cfm Jason Merrill | E-Learning Solutions | icfconsulting.com -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of dls Sent: Friday, January 20, 2006 7:18 AM To: Flash Coders Subject: [Flashcoders] Good Intro to Flash and SCORM? I need to hand roll some content in flash that can be tracked using SCORM. Anyone have a good online reference I can start with? Thanks! --dan ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders 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 mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Converting amp; in a URL?
It's used in getURL. Thanks Adrian! Your small function solved it and helped me a ton! Sascha Are you outputting these URLs or using them in getURL()? That should work in getURL(). But if you're outputting them, one way to convert them is to use HTML text fields. Or, if you can't change the text fields, try this: str = Sometext with an amp; in.; function convert(str, from, to) { return str.split(from).join(to); } trace(convert(str, amp;, )); Adrian ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] v2 tab component
I also see there is one in flex, anyone know how to extract that to a swc or something that can be used? You'd need a Flex license to do that legally. 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 mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] grid based progressive image loading ( I don't know what to call it ) in flash?
Hi, http://www.moma.org/ The images load by grid slices, they're zoomable, and they focus when they're zoomed. What tool do I need to accomplish this? cheers, H ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] grid based progressive image loading ( I don't knowwhat to call it ) in flash?
I can't see the example you're talking about, but it sounds like http://www.zoomify.com/ Ade -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of elibol Sent: 20 January 2006 15:22 To: Flashcoders mailing list Subject: [Flashcoders] grid based progressive image loading ( I don't knowwhat to call it ) in flash? Hi, http://www.moma.org/ The images load by grid slices, they're zoomable, and they focus when they're zoomed. What tool do I need to accomplish this? cheers, H ___ 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] RE: Good Intro to Flash and SCORM?
Dan -- Not sure what you need to build or how much, but e-Learning Consulting sells a Flash-based SCORM toolkit for $149. http://www.e-learningconsulting.com/products/authoring/flash.html It's already set up to handle all the SCORM communication and has an easy to use ActionScript API. - John -Original Message- Date: Fri, 20 Jan 2006 07:17:36 -0500 From: dls [EMAIL PROTECTED] Subject: [Flashcoders] Good Intro to Flash and SCORM? To: Flash Coders flashcoders@chattyfig.figleaf.com Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-1; format=flowed I need to hand roll some content in flash that can be tracked using SCORM. Anyone have a good online reference I can start with? Thanks! --dan ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] printJob movieclip positioning
Hi, I'm currently making an application in flash that needs to print any mc that you throw at it in a decent and structured way. This is of course possible with the printJob class but I'm encountering some positioning problems at the moment. Scenario: I have a very big mc (in height) and I want to print it. I decide to cut the mc in half and send each half to the spool. I can't use flash 8 advanced pixel features (must work in f7) so I work with custom white shapes in the mc's that cover the area that belongs to the other half. Also can't use masks but can't remember right now why. :) For example: main mc has a height of 1000 pixels. Part 1 still has a height of 1000 pixels but also has the white shape starting at 500 y-axis that covers the part2 content Part 2: same as part 1 but the white shape starts at 0 y-axis and covers the part 1 content. Now when I print part 1 there is no problem. It will start at the top and you won't see the part 2 content because of the white shape, technically speaking part 1 is still way too large to be printed of course but because of the white shape at the bottom that doesn't matter. Part2, now the problem kicks in. The white space to cover the part 1 content is now on top. When I send part 2 to the spool all I see is white and a small piece of part 2 content. This is normal of course because the white space is the top of the mc so there isn't really a problem because that's how it's supposed to work. So I thought I could fix this by inserting part2_mc in a new movie clip and position it so that the actual content starts at 0, 0 and the white shape lies above it. But apparently this doesn't work, it seems that the printJob class completely ignores that position and just sends the whole mc to the spool including the white shape. I played around with the addPage(xMin,xMax,etc...) margin settings but those settings aren't of any use for my problem. I'm probably forgetting something or doing something wrong. Anyone has an idea on how I might be able to solve this problem. Thanks Yves ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Slice-9 weirdness
Yes, and yes to both questions. I am publishing to 8 and I am testing it in test movie. I have been able to get it to work for a simple test circle MC. I still am unable to get it to work with my caplet shaped MC. The MC in question has 5 layers of MCs. Not only does the root MC have slice-9 turned on but so does each of the nested MCs. Charles P. On 1/19/06, eric dolecki [EMAIL PROTECTED] wrote: are you publishing to flash 8? On 1/19/06, Troy Rollins [EMAIL PROTECTED] wrote: On Jan 19, 2006, at 4:49 PM, Charles Parcell wrote: Is there some magic voodoo mantra that I did not read about?? Is there something that breaks them? Are others having issues with it? Well, it only shows in test movie, you know that right? -- Troy RPSystems, Ltd. http://www.rpsystems.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 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] printJob movieclip positioning
Hi Yves, I'm currently making an application in flash that needs to print any mc that you throw at it in a decent and structured way. This is of course possible with the printJob class but I'm encountering some positioning problems at the moment. Scenario: I have a very big mc (in height) and I want to print it. I decide to cut the mc in half and send each half to the spool. I can't use flash 8 advanced pixel features (must work in f7) so I work with custom white shapes in the mc's that cover the area that belongs to the other half. Also can't use masks but can't remember right now why. :) Without masking this is going to be an impossible task. For example: main mc has a height of 1000 pixels. Part 1 still has a height of 1000 pixels but also has the white shape starting at 500 y-axis that covers the part2 content Part 2: same as part 1 but the white shape starts at 0 y-axis and covers the part 1 content. Now when I print part 1 there is no problem. It will start at the top and you won't see the part 2 content because of the white shape, technically speaking part 1 is still way too large to be printed of course but because of the white shape at the bottom that doesn't matter. There is a problem, and it doesn't have anything to do with your white shape. When printing a large MovieClip in Flash, it will not split that into 2 pages if your MC won't fit onto one page - it will just print what it can and will throw away the rest. Part2, now the problem kicks in. The white space to cover the part 1 content is now on top. When I send part 2 to the spool all I see is white and a small piece of part 2 content. This is normal of course because the white space is the top of the mc so there isn't really a problem because that's how it's supposed to work. This backs up the point I made above. So I thought I could fix this by inserting part2_mc in a new movie clip and position it so that the actual content starts at 0, 0 and the white shape lies above it. But apparently this doesn't work, it seems that the printJob class completely ignores that position and just sends the whole mc to the spool including the white shape. I played around with the addPage(xMin,xMax,etc...) margin settings but those settings aren't of any use for my problem. Indeed, neither of those options will work. The only thing that can save you is masking. Cheers, Steve -- Steve Webster Head of Development Featurecreep Ltd. www.featurecreep.com 14 Orchard Street, Bristol, BS1 5EH 0117 905 5047 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] how does ExternalInterface behave in Flash 7 and earlier
ExternalInterface requires Flash 8, it won't compile back to v7. You can use the integration kit just fine. There is a distinction between extending an open source project and using it as a library. In this case, you are using it unmodified as a library, which does not require you to make your whole project open source. You are thinking of the GPL, while when using an open source project as a library would be covered instead under the LGPL, the lesser GPL. In the case of this kit, the license is much more lenient than either the GPL or the LGPL. The license for the integration kit can be seen at http://weblogs.macromedia.com/flashjavascript/license.txt Nathan http://www.nathanderksen.com On Jan 19, 2006, at 6:40 AM, Manuel Saint-Victor wrote: I've been Googling for a statement about this that I am comfortable with. I am wondering if the externalInterface is an IDE thing or player specific thing. If a user has Flash Player 7 installed does that mean no use of the externalInterface and if so how are people dealing with this? Are you guys waiting for a greater penetration of the Flash8 player? The current project is not open source and I believe that means that I can't use the Flash-Javascript integration kit. Thanks, Mani ___ 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] FileReference: verify file and return status
Hey Folks, I'm uploading files from my SWF with FileReference and I need to verify the file is acceptable on the server (make sure it is a non progressive JPG) and let the SWF client know if the file was accepted by the server or rejected. I've been using ColdFusion for this and it has a handy 'accept' attribute for the cffile tag where you can specify the mime type to allow. Unfortunately using this attribute breaks the upload (even if the mime type is correct) thanks to a bug in the F8 player. So right now I've been forced to make it a 2 step operation, first upload the file, then on completion the SWF client makes a Flash Remoting call to a service that verifys the file and returns a result depending if the file is acceptable or not. I think it would be excellent if FileReference could accept a response from the server alongside the file upload complete so this could be reduced to a 1 step operation. Can't see how that could be done at the moment though. Anyone out there come up with any elegant solutions for uplaoding and verifying in one? ** WISHLIST It would be cool if the FileReference class could access the file mime type in the SWF. Clark www.bayinteractive.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] grid based progressive image loading ( I don't knowwhat to call it ) in flash?
Thanks Adrian, that's right on. H On 1/20/06, Adrian Lynch [EMAIL PROTECTED] wrote: I can't see the example you're talking about, but it sounds like http://www.zoomify.com/ Ade -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of elibol Sent: 20 January 2006 15:22 To: Flashcoders mailing list Subject: [Flashcoders] grid based progressive image loading ( I don't knowwhat to call it ) in flash? Hi, http://www.moma.org/ The images load by grid slices, they're zoomable, and they focus when they're zoomed. What tool do I need to accomplish this? cheers, H ___ 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
[Flashcoders] putting many functions on the main timeline from an external class file
I am trying to update some code and initially it used #include to put a bunch of standard code on the main timeline. While rewriting everything is it a better idea to try to encapsulate things into more relevant objects? For example- There is a video player on the stage and the include adds a set of functions on the main timeline to control that video player. I'm thinking that this is kind of a messy way to go about it but I'm also thinking that pragmatically speaking pulling those functions from the main timeline into a VideoManager class and its methods will mean chasing down every place in the code where a general videoPlay() function is called to change it to videoManager.play() I've used a Singleton for the VideoManager which I subsequently put on the global scope so that a button in any scope can call myVideoManager.play() Am I headed in the right direction by trying to pull these into classes and methods? Am I taking a step backwards by placing them in a global timeline so that people don't have to write videoManager=VideoManager.getInstance() everytime they want to call its methods? I feel as if I'm making good progress with this but it's the first time that I've worked on something of this scope and I would love to hear from some experienced people about the validity of my decisions. Mani ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Maintaining HTML special char codes in a HTML textfield?
Hi, does somebody know if it's somehow possible to get HTML special characters like amp;, quot;, lt; and gt; to be outputted in a Flash HTML enabled textfield without turning them into their conversions? I've tried various ways like using escape sequences with unicode etc. but the textfield still converts them. There is no way to turn this behavior off for a HTML textfield but I'm wondering if there is some magical method to preprocess the string so that the textfield wouldn't recognize the special char sequences. Otherwise can somebody confirm that there is absolutely no way to do that? In that case a textfield property to turn the conversion off would be a welcome feature in 8.5. Thanks for any hint! Sascha -- Flash Game Programming Wiki http://fgpwiki.corewatch.net/ H1DD3N.R350URC3 http://hiddenresource.corewatch.net/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Re: Q:Creating a full spectrum 'rainbow' Gradient
Hi there, If you want a real rainbow gradient, consider translating the fortran code found at the following page, which contains a routine for approximating R/G/B values for a given wavelength of visible light. Then just do a for loop over approximately 380nm and 780nm. http://www.efg2.com/Lab/ScienceAndEngineering/Spectra.htm I knew that minor in physics would be useful at some point.. -Andrew Widdowson ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Maintaining HTML special char codes in aHTMLtextfield?
Yeah, just tried it real quick... This looks like it gives you the output you want (I think): function convertAmp(str1){ newStr = str1.split().join(amp;) return newStr; } var strOriginal = This - amp; - represents an ampersand.; var strConverted = convertAmp(strOriginal); ta1.text = strConverted; -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Chyko Sent: Friday, January 20, 2006 2:23 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] Maintaining HTML special char codes in aHTMLtextfield? If you wanted it to actually output amp; I'm assuming you could capture the amp; in the string and replace it with amp;amp; - which would theoretically output amp; - haven't actually tried this though. Which I guess more generically would boil down to you replacing all your with amp; - that would take care of it for all the cases (amp;, quot;, lt; etc). -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sascha Balkau Sent: Friday, January 20, 2006 1:22 PM To: flashcoders Subject: [Flashcoders] Maintaining HTML special char codes in a HTMLtextfield? Hi, does somebody know if it's somehow possible to get HTML special characters like amp;, quot;, lt; and gt; to be outputted in a Flash HTML enabled textfield without turning them into their conversions? I've tried various ways like using escape sequences with unicode etc. but the textfield still converts them. There is no way to turn this behavior off for a HTML textfield but I'm wondering if there is some magical method to preprocess the string so that the textfield wouldn't recognize the special char sequences. Otherwise can somebody confirm that there is absolutely no way to do that? In that case a textfield property to turn the conversion off would be a welcome feature in 8.5. Thanks for any hint! Sascha -- Flash Game Programming Wiki http://fgpwiki.corewatch.net/ H1DD3N.R350URC3 http://hiddenresource.corewatch.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 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] PDF to Flash
Does anyone know how you can put a PDF into Flash? The only thing I can find is FlashPaper, which is basically a print driver that converts whatever you send to it into a SWF file. Thanks, Loren ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] how to deal with user-choosable skinning
Thanks, Steven... went over my head just a little, but I think I understand what you're saying after reading it a few times :) . I haven't played with the Style class yet, I'll give it a shot. chad On Jan 19, 2006, at 11:18 PM, Steven Sacks wrote: It's easy to do with vector or bitmap graphics. For bitmap, make your buttons color free transparent PNGs, using semi-transparent greyscale shading and shaping. Under the button, mask a movieclip with a rectangle in it - have the button shape be the mask (usually works, you might need to play with it to get it just right). Have that movieclip listen to a style class - just make one movieclip in the library to do this. Do not make components out of these unless you want your movie to run slow. Assign said movieclip to a particular style group, and then send the event onStyleUpdate or whatever, passing the color and the group which that color belongs to, which you then apply using standard movieclip color transform scripts. Done. HTH, Steven -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chad Royer Sent: Thursday, January 19, 2006 11:23 AM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] how to deal with user-choosable skinning Hi all, I've been planning a flash ria for a while, and there are a few things I'd like to do with the interface that I still haven't quite figured out, maybe you can help. The main puzzle I'm trying to work out is how I can set up a selection of alternate graphical skins for the entire site that the end user can choose at runtime. Ultimately, I'd want to have all of my base graphic elements (button over and under states, arrows, whatever) externalized in a library/movieClip that I can duplicate and alter, then import based on a userPrefs variable on the initialization of the site, and apply the graphic elements to the rest of the movieclips in the app. Has anyone done this sort of setup before? It seems like it should be easy enough, but I can't find anything about it. any help is mucho appreciated. chad ___ 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] PDF to Flash
On 1/20/06, John Dowdell [EMAIL PROTECTED] wrote: Group Manager - D-MAG.org wrote: Does anyone know how you can put a PDF into Flash? The only thing I can find is FlashPaper, which is basically a print driver that converts whatever you send to it into a SWF file. Is there a tool that will read a PDF and turn it into a MC or FLA? I think we may have already pursued this conversation elsewhere, or else it's just similar to another thread this week...? Anyway, Macromedia Flash Player does not embed arbitrary external renderers. (Shockwave has an extension mechanism, and Adobe Reader can also invoke ActiveX Controls, but not the smaller Flash Player.) You can convert to SWF via the FlashPaper printer driver: http://www.macromedia.com/software/flashpaper/productinfo/features/static_tour/creation_emailing/ Once you have a SWF, it can be embedded within any other SWF. It won't become a FLA itself (because it's a discrete chunk of material, not a deconstructable authoring file): http://www.macromedia.com/devnet/flashpaper/articles/import_flpaper2.html There's a free command line tool here which will convert a PDF into a SWF file. http://www.swftools.org/about.html It's not perfect, but it works decently most of the time. It also runs on either windows or linux. (It may be possible to compile for mac, but i don't see any ready made binaries) -David R ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[FlashCoders] FSCommand Problems with Mac
Anyone have good experience with FSCommands? We are trying to do some very basic stuff and finding radically inconsistent support across browsers that are supposed to work at least according to Colin Moock: http://www.moock.org/webdesign/flash/fscommand/#methods We are unable to get FSCommands to work at all on the Mac platform. Safari, FireFox = no love. I thought the problem may be a result of us putting the little VBScript call and the JS function in the BODY rather than the HEAD. So, I put the scripts in the HEAD, still no love, but we got the added bonus of PC Internet Explorer not longer working! Any council would be greatly appreciated! Thanks. -Ben ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [FlashCoders] FSCommand Problems with Mac
Yup, fscommand is not supported on many/most Mac browsers: http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_14159 Depending on what you want to do, the alternatives are to use getURL (javascript:foo()); to call a javascript function (no return data allowed), to use the Flash 8 ExternalInterface class, or to use the Flash-JavaScript integration kit (http://weblogs.macromedia.com/ flashjavascript/). Nathan http://www.nathanderksen.com On Jan 20, 2006, at 1:01 PM, Ben Wakeman wrote: Anyone have good experience with FSCommands? We are trying to do some very basic stuff and finding radically inconsistent support across browsers that are supposed to work at least according to Colin Moock: http://www.moock.org/webdesign/flash/fscommand/#methods We are unable to get FSCommands to work at all on the Mac platform. Safari, FireFox = no love. I thought the problem may be a result of us putting the little VBScript call and the JS function in the BODY rather than the HEAD. So, I put the scripts in the HEAD, still no love, but we got the added bonus of PC Internet Explorer not longer working! Any council would be greatly appreciated! Thanks. -Ben ___ 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] Optimize html text function?
Hi, is there a function to optimize htmlText after text_tf.htmlText = text_tf.htmlText + text_tf1.htmlText; to reduce tags number and combine text, which have the same formatting, for example: TEXTFORMAT LEADING=2P ALIGN=LEFT FONT FACE=Arial SIZE=16 COLOR=#00you have plenty of tim/FONT/P/TEXTFORMAT TEXTFORMAT LEADING=2P ALIGN=LEFT FONT FACE=Arial SIZE=16 COLOR=#00e to kick the t/FONT/P /TEXTFORMAT TEXTFORMAT LEADING=2P ALIGN=LEFT FONT FACE=Arial SIZE=16 COLOR=#00ires and shape the feature set, ultimately ensuring that it works the way you do, not the other way around. Don't delay. Download now and send us your feedback. Adobe Lightroom Beta expires at the end of June 2006./FONT/P/TEXTFORMAT Serge ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] BitmapData dump ?
It is true, There's been a few workarounds developed like using an interval to get all the pixels and then save them out as a hex string. You can then save to a webserver which can encode it into a real image file and save accordingly. You might be able to save a very small image to a local shared object but be aware that the local SO has a data limit. Unfortunately it is a slow process not really implemented in Flash 8. Flash 8.5 should fix this though. Until then the solutions aren't great but they do work. I'll see if I can dig up my links to examples. -Ralph -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Yehia Shouman Sent: Friday, January 20, 2006 2:59 PM To: Flashcoders mailing list Subject: [Flashcoders] BitmapData dump ? Hi all, I just don't believe its true, so I thought I'd ask here as a last resort. Is there any way I could store or get the data inside the bitmapData instances ? I dream of a way I could save locally several bitmap layers. I wouldn't go for getPixel because its too freaking slow ! I don't know what use is it if we can't have it scan the bitmap quickly, is there a Dump bitmap data anything like this, something I could use to reconstruct the bitmapData instance when the flash movie runs again on the client's machine ? thanks for your help in advance Yehia ___ 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] BitmapData dump ?
Try this: http://www.ifbin.com/news/2005/09/flash-8-webcam-snapshot-by-robert-m.ht ml Costs money :( Or this: http://www.m3style.lv/bo/experiments/flash2jpg/ Sorry, I just should have posted this in my last email. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Yehia Shouman Sent: Friday, January 20, 2006 2:59 PM To: Flashcoders mailing list Subject: [Flashcoders] BitmapData dump ? Hi all, I just don't believe its true, so I thought I'd ask here as a last resort. Is there any way I could store or get the data inside the bitmapData instances ? I dream of a way I could save locally several bitmap layers. I wouldn't go for getPixel because its too freaking slow ! I don't know what use is it if we can't have it scan the bitmap quickly, is there a Dump bitmap data anything like this, something I could use to reconstruct the bitmapData instance when the flash movie runs again on the client's machine ? thanks for your help in advance Yehia ___ 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] multiline RadioButton in Flash 8
Anyone know why attempting to make a RadioButton label multiline in Flash 8 will not work? The following code snippet results in totally different behavior: import mx.controls.RadioButton; var rad:RadioButton = this.createClassObject( RadioButton, rad, 1 ); rad.setSize( 100, 44 ); rad.label = So Far, So Good, So What; rad.labelPath.multiline = true; rad.labelPath.wordWrap = true; rad.labelPath.autoSize = left; I have a subclass of RadioButton that adds multiline behavior I created over a year ago and its exhibiting the same behavior. Any thoughts out there? Regards, Brooks ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] File upload with PHP example
Anyone know of a good to great File Upload example using PHP? Or does anyone have any of their own working examples they can send me? If it supports Remoting (amfphp) that would be even better. Judah PS I'd be willing to buy something if it has been in a production enviornment and works around many of the bugs I've seen (onComplete event not always firing on mac? or pc?, file uploads page requested twice, any php issues, etc. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] RE: multiline RadioButton in Flash 8
The code in question exhibits different behavior when published for Flash 7 (works) vs Flash 8 (doesn't work). _ From: Brooks Andrus [mailto:[EMAIL PROTECTED] Sent: Friday, January 20, 2006 7:35 PM To: 'Flashcoders mailing list' Subject: multiline RadioButton in Flash 8 Anyone know why attempting to make a RadioButton label multiline in Flash 8 will not work? The following code snippet results in totally different behavior: import mx.controls.RadioButton; var rad:RadioButton = this.createClassObject( RadioButton, rad, 1 ); rad.setSize( 100, 44 ); rad.label = So Far, So Good, So What; rad.labelPath.multiline = true; rad.labelPath.wordWrap = true; rad.labelPath.autoSize = left; I have a subclass of RadioButton that adds multiline behavior I created over a year ago and its exhibiting the same behavior. Any thoughts out there? Regards, Brooks ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] FFMPEG Controller Request
Hi guys, Working on some flash video and have an urgent request for a FFMPEG controller that handles all formats to FLV. I have heard using it raw poses issues. Looking for something that already works and implemented. As this is not my area of expertise willing to dish out some dough for it and if you are the right person to talk to, please get ahold of me off list. Thanks! -Sophie ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] File upload with PHP example
I saw this: http://www.betriebsraum.de/blog/2006/01/15/update-flash-8-file-browser-11/ maybe it will be useful. -David R On 1/20/06, Judah Frangipane [EMAIL PROTECTED] wrote: Anyone know of a good to great File Upload example using PHP? Or does anyone have any of their own working examples they can send me? If it supports Remoting (amfphp) that would be even better. Judah PS I'd be willing to buy something if it has been in a production enviornment and works around many of the bugs I've seen (onComplete event not always firing on mac? or pc?, file uploads page requested twice, any php issues, etc. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Another Class Error Message
Hi, Working away on the renamed hello class, now time stamp. However getting the following errors: **Error** BushidoDeep:Users:chris:Desktop:classes:timeStamp:com:bushidodeep:TimeSt amp.as: Line 23: Type mismatch in assignment statement: found Void where TextField is required. greeting_txt = container_mc.createTextField (messageText, 0, 0, 0, 400, 25); **Warning** Scene=Scene 1, layer=ACTIONSCRIPT:, frame=1:Line 2: There is no class or package with the name 'com.bushidodeep' found in package 'com'. var myTimeStamp:TimeStamp = new TimeStamp(this, 0, 0); Total ActionScript Errors: 2 Reported Errors: 2 from the FLA, timeStmap [code] import com.bushidodeep.*; var myTimeStamp:TimeStamp = new TimeStamp(this, 0, 0); [/code] [code] /** A class that assigns a custom message to a text field based upon time of day. **/ class com.bushidodeep.TimeStamp{ private var now:Date; private var greeting_txt:TextField; // Movie clip that will contain visual // elements of the hello. private var container_mc:MovieClip; // // public function TimeStamp(target:MovieClip, x:Number, y:Number) { init(target, x, y); } private function init(target:MovieClip, x:Number, y:Number):TextField { now = new Date(); container_mc = target.createEmptyMovieClip(container, 1); container_mc._x = x; container_mc._y = y; greeting_txt = container_mc.createTextField(messageText, 0, 0, 0, 400, 25); greeting_txt.setNewTextFormat(createFormat()); greeting_txt.text = createGreeting(); } private function createGreeting():String { var greets:String = now.getHours()12 ? Good morning! : Good afternoon... or night.; var fullGreeting:String = The time is now +formatTime(now) +greets; return fullGreeting; } private function createFormat():TextFormat { var messageFormat:TextFormat = new TextFormat(); messageFormat.font = Verdana; messageFormat.color = 0xff; messageFormat.bold = true; return messageFormat; } private function formatTime(theDate:Date):String { var hour:Number = theDate.getHours(); var minute:String = theDate.getMinutes()9 ? theDate.getMinutes ().toString() : 0+theDate.getMinutes(); var timeString:String = hour12 ? (hour-12)+:+minute+PM. : hour+:+minute+AM.; return timeString; } } [/code] ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Another Class Error Message
**Error** BushidoDeep:Users:chris:Desktop:classes:timeStamp:com:bushidodeep:TimeSt amp.as: Line 23: Type mismatch in assignment statement: found Void where TextField is required. greeting_txt = container_mc.createTextField (messageText, 0, 0, 0, 400, 25); simple, and exactly as it says in the error message: createTextField does *not* return a reference to the textfield created, so it's Void instead of the TextField you expected. i wish it would, like createEmptyMovieClip or attachMovie do so conveniently. but as it is, you have to work around it: container_mc.createTextField(messageText, 0, 0, 0, 400, 25); greeting_txt = container_mc[ messageText ]; hth, mark On 1/21/06, Chris Kennon [EMAIL PROTECTED] wrote: Hi, Working away on the renamed hello class, now time stamp. However getting the following errors: **Error** BushidoDeep:Users:chris:Desktop:classes:timeStamp:com:bushidodeep:TimeSt amp.as: Line 23: Type mismatch in assignment statement: found Void where TextField is required. greeting_txt = container_mc.createTextField (messageText, 0, 0, 0, 400, 25); **Warning** Scene=Scene 1, layer=ACTIONSCRIPT:, frame=1:Line 2: There is no class or package with the name 'com.bushidodeep' found in package 'com'. var myTimeStamp:TimeStamp = new TimeStamp(this, 0, 0); Total ActionScript Errors: 2 Reported Errors: 2 from the FLA, timeStmap [code] import com.bushidodeep.*; var myTimeStamp:TimeStamp = new TimeStamp(this, 0, 0); [/code] [code] /** A class that assigns a custom message to a text field based upon time of day. **/ class com.bushidodeep.TimeStamp{ private var now:Date; private var greeting_txt:TextField; // Movie clip that will contain visual // elements of the hello. private var container_mc:MovieClip; // // public function TimeStamp(target:MovieClip, x:Number, y:Number) { init(target, x, y); } private function init(target:MovieClip, x:Number, y:Number):TextField { now = new Date(); container_mc = target.createEmptyMovieClip(container, 1); container_mc._x = x; container_mc._y = y; greeting_txt = container_mc.createTextField(messageText, 0, 0, 0, 400, 25); greeting_txt.setNewTextFormat(createFormat()); greeting_txt.text = createGreeting(); } private function createGreeting():String { var greets:String = now.getHours()12 ? Good morning! : Good afternoon... or night.; var fullGreeting:String = The time is now +formatTime(now) +greets; return fullGreeting; } private function createFormat():TextFormat { var messageFormat:TextFormat = new TextFormat(); messageFormat.font = Verdana; messageFormat.color = 0xff; messageFormat.bold = true; return messageFormat; } private function formatTime(theDate:Date):String { var hour:Number = theDate.getHours(); var minute:String = theDate.getMinutes()9 ? theDate.getMinutes ().toString() : 0+theDate.getMinutes(); var timeString:String = hour12 ? (hour-12)+:+minute+PM. : hour+:+minute+AM.; return timeString; } } [/code] ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- http://snafoo.org/ jabber: [EMAIL PROTECTED] ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Maintaining HTML special char codes inaHTMLtextfield?
Thanks alot Robert for pointing into the right direction! Haven't thought that it's actually so easy. Using just str1.split().join(amp;) would however also replace the of all other special chars but the way how you described in the first answer works well. Finally to replace all special chars and HTML braces while keeping other chars untouched I came up with this method which seems to work well so far: private function convertTags(txt:String):String { return (txt.split(amp;).join(amp;amp;)).split(quot;).join(amp;quot;)).split(lt;).join(amp;lt;)).split(gt;).join(amp;gt;)).split().join(lt;)).split().join(gt;); } -Sascha - Original Message - From: Robert Chyko [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Saturday, January 21, 2006 4:39 AM Subject: RE: [Flashcoders] Maintaining HTML special char codes inaHTMLtextfield? Yeah, just tried it real quick... This looks like it gives you the output you want (I think): function convertAmp(str1){ newStr = str1.split().join(amp;) return newStr; } var strOriginal = This - amp; - represents an ampersand.; var strConverted = convertAmp(strOriginal); ta1.text = strConverted; -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Chyko Sent: Friday, January 20, 2006 2:23 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] Maintaining HTML special char codes in aHTMLtextfield? If you wanted it to actually output amp; I'm assuming you could capture the amp; in the string and replace it with amp;amp; - which would theoretically output amp; - haven't actually tried this though. Which I guess more generically would boil down to you replacing all your with amp; - that would take care of it for all the cases (amp;, quot;, lt; etc). -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sascha Balkau Sent: Friday, January 20, 2006 1:22 PM To: flashcoders Subject: [Flashcoders] Maintaining HTML special char codes in a HTMLtextfield? Hi, does somebody know if it's somehow possible to get HTML special characters like amp;, quot;, lt; and gt; to be outputted in a Flash HTML enabled textfield without turning them into their conversions? I've tried various ways like using escape sequences with unicode etc. but the textfield still converts them. There is no way to turn this behavior off for a HTML textfield but I'm wondering if there is some magical method to preprocess the string so that the textfield wouldn't recognize the special char sequences. Otherwise can somebody confirm that there is absolutely no way to do that? In that case a textfield property to turn the conversion off would be a welcome feature in 8.5. Thanks for any hint! Sascha -- Flash Game Programming Wiki http://fgpwiki.corewatch.net/ H1DD3N.R350URC3 http://hiddenresource.corewatch.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 ___ 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