RE: [Flashcoders] weirdness passing string to text field
How are the variables being generated and set? Are you getting those values from external source such as xml or text file? I haven't followed the thread... sorry. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rick Lecoat Sent: Wednesday, July 05, 2006 8:23 AM To: FlashCoders list Subject: Re: [Flashcoders] weirdness passing string to text field Back again. Well, I *thought* it was working... What do you guys make of a situation where a movie works in Test Movie but not from the web server? Here's the deal: variable1:String populates textField1 (initial value = " ") variable2:String populates textField2 (initial value = " ") variable3:String populates textField3 (initial value = "Click on a photo to learn more about the person") Variables get changed according to button clicks. When I run Test Movie, the first two fields are blank as expected and the third one shows the instructional text as set by the variable. Publish... upload to server... clear browser cache to be sure... But now: first two fields say "ee" third one says "undefined" Clicking buttons, which should rewrite the text fields, also gives the same results. For the record, text fields one and two just have uppercase glyphs embedded, whilst the third one has upper and lower case, numerals, and punctuation. These choices are appropriate to the text that the button clicks will enter. So, why will it work in test but not online? Hlp! -- Rick Lecoat -- Original message: Received from Adrian Park on 5/7/06 at 10:54 >Glad to be of help Rick. > >On the font embedding thing v. the font being installed on your machine, I'm >pretty sure that if you specify a font but don't embed any characters then >Flash will use the installed font but if you embed then Flash will only look >to the embedded characters for display and will ignore the installed version >of the font. Hope that makes sense! > >Good luck with your deadline! > >A. ___ 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] weirdness passing string to text field
Call off the hounds, I've solved it. it turns out that when the a nested movie clip called the variables it called them from one nesting level up, and I'd coded that as _root.variable. Flash was fine with that in testing, but the browser plugin didn't like it. Once I'd changed the path to _parent.variable it was all working as planned again. Odd that the Test Movie behaved differently though. -- Rick Lecoat -- Original message: Received from Rick Lecoat on 5/7/06 at 13:23 >Back again. > >Well, I *thought* it was working... >What do you guys make of a situation where a movie works in Test Movie >but not from the web server? Here's the deal: > >variable1:String populates textField1 (initial value = " ") >variable2:String populates textField2 (initial value = " ") >variable3:String populates textField3 (initial value = "Click on a >photo to learn more about the person") > >Variables get changed according to button clicks. > >When I run Test Movie, the first two fields are blank as expected and >the third one shows the instructional text as set by the variable. > >Publish... upload to server... clear browser cache to be sure... >But now: > >first two fields say "ee" >third one says "undefined" > >Clicking buttons, which should rewrite the text fields, also gives the >same results. > >For the record, text fields one and two just have uppercase glyphs >embedded, whilst the third one has upper and lower case, numerals, and >punctuation. These choices are appropriate to the text that the button >clicks will enter. > >So, why will it work in test but not online? >Hlp! > >-- >Rick Lecoat ___ 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] weirdness passing string to text field
Back again. Well, I *thought* it was working... What do you guys make of a situation where a movie works in Test Movie but not from the web server? Here's the deal: variable1:String populates textField1 (initial value = " ") variable2:String populates textField2 (initial value = " ") variable3:String populates textField3 (initial value = "Click on a photo to learn more about the person") Variables get changed according to button clicks. When I run Test Movie, the first two fields are blank as expected and the third one shows the instructional text as set by the variable. Publish... upload to server... clear browser cache to be sure... But now: first two fields say "ee" third one says "undefined" Clicking buttons, which should rewrite the text fields, also gives the same results. For the record, text fields one and two just have uppercase glyphs embedded, whilst the third one has upper and lower case, numerals, and punctuation. These choices are appropriate to the text that the button clicks will enter. So, why will it work in test but not online? Hlp! -- Rick Lecoat -- Original message: Received from Adrian Park on 5/7/06 at 10:54 >Glad to be of help Rick. > >On the font embedding thing v. the font being installed on your machine, I'm >pretty sure that if you specify a font but don't embed any characters then >Flash will use the installed font but if you embed then Flash will only look >to the embedded characters for display and will ignore the installed version >of the font. Hope that makes sense! > >Good luck with your deadline! > >A. ___ 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] weirdness passing string to text field
Glad to be of help Rick. On the font embedding thing v. the font being installed on your machine, I'm pretty sure that if you specify a font but don't embed any characters then Flash will use the installed font but if you embed then Flash will only look to the embedded characters for display and will ignore the installed version of the font. Hope that makes sense! Good luck with your deadline! A. On 7/5/06, Danny Kodicek <[EMAIL PROTECTED]> wrote: > Chris: Thanks for elaborating on the restrict issue. Looks like I won't > need to explore it just yet, but it's good to know about. (Since I'm > very new to the Flash/Actionscript thing and am learning 'on the job' > with a project deadline looming I'm being pragmatic and just learning > the bits of AS that I need to make the project work. I'll flesh out my > knowledge afterward). Just to clarify: I'm pretty sure the restrict property only affects user-typed input, not text that you add dynamically with code. Danny ___ 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] weirdness passing string to text field
Danny Kodicek schrieb: Chris: Thanks for elaborating on the restrict issue. Looks like I won't need to explore it just yet, but it's good to know about. (Since I'm very new to the Flash/Actionscript thing and am learning 'on the job' with a project deadline looming I'm being pragmatic and just learning the bits of AS that I need to make the project work. I'll flesh out my knowledge afterward). Just to clarify: I'm pretty sure the restrict property only affects user-typed input, not text that you add dynamically with code. Danny Thats correct: _root.createTextField("txt", 1, 0, 0, 100, 100); _root.txt.type = "input"; _root.txt.restrict = "abc"; _root.txt.text = "hallo"; // complete hallo is written into the TextField Janosch ___ 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] weirdness passing string to text field
> Chris: Thanks for elaborating on the restrict issue. Looks like I won't > need to explore it just yet, but it's good to know about. (Since I'm > very new to the Flash/Actionscript thing and am learning 'on the job' > with a project deadline looming I'm being pragmatic and just learning > the bits of AS that I need to make the project work. I'll flesh out my > knowledge afterward). Just to clarify: I'm pretty sure the restrict property only affects user-typed input, not text that you add dynamically with code. Danny ___ 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] weirdness passing string to text field
Ian and Adrian; You hit the nail on the head; it was indeed a lack of embedded characters and my own stupid fault because whilst I *had* embedded the characters for the intended usage (uppercase only) I neglected to stick to those when I was running my trouble shooting tests, and included lowercase as well. There also turned out to be a secondary (or maybe primary) problem -- targets not yet being instantiated at point-of-code -- that needed fixing before the font embedding issue made itself known. And of course when more than one thing is giving trouble simultaneously it's hard to figure out just what is going wrong. Now that that both are fixed it's working fine. However, I'm still slightly confused, because I thought that if the font was installed on the machine that is testing the movie then it would still show up okay whether embedded or not. The fact that it doesn't is, of course, a benefit because it gives early warning of non-embedded fonts but it does run contrary to what I thought I understood. Live and learn. Chris: Thanks for elaborating on the restrict issue. Looks like I won't need to explore it just yet, but it's good to know about. (Since I'm very new to the Flash/Actionscript thing and am learning 'on the job' with a project deadline looming I'm being pragmatic and just learning the bits of AS that I need to make the project work. I'll flesh out my knowledge afterward). Thanks to everyone for all your help. I'm sure I'll be back again with more questions *very* soon... -- Rick Lecoat -- Original message: Received from Adrian Park on 5/7/06 at 09:24 >This sounds to me like what happens if you embed a certain set of characters >in the field but then pass it a String including characters you haven't >explicitly embedded. I'm guessing you may have pasted a string into the >"Include these characters:" field in the "Character Embedding" window? If >so, only those characters will be embedded with the field and you'd probably >be better off just selecting Basic Latin in the predefined character sets. > >HTH >A. ___ 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] weirdness passing string to text field
textfield has a retrict value that acts as a filter. Chris is saying that it may have a value in there already, probably something with the following letters: "M J O E" as the Executive is being filtered down to only e's as the other letters are not in the filter. btw, what is output when you trace the value? It may also be a font character thing. textfield.restrict http://www.adobe.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary762.html Embedded fonts http://www.flash-mx.com/news/archives/000136.cfm On 05/07/06, Rick Lecoat <[EMAIL PROTECTED]> wrote: Chris, thanks for your speedy reply (I guess that if I was going to get a reply at 8.30 in the morning UK time it would have been from Australia!) Like I said in my initial post, I'm completely new to Actionscript (and all of Flash, really) and so your response, whilst I am sure it is the correct answer, is a bit cryptic to me. Could you maybe flesh out your reply with a bit of 'idiot guide' stuff so that I can take it and run with it? Many many thanks. -- Rick Lecoat -- Original message: Received from Chris Velevitch on 5/7/06 at 08:45 >Sounds like restrict is not null. > > >Chris ___ 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 -- === neilhighley.com === 0784 324 7878 ___ 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] weirdness passing string to text field
There's an attibute on TextField called restrict. It takes a regular expression of all the characters that are allowed to be entered into the field. Try setting it to null. Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group www.flashdev.org.au ___ 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] weirdness passing string to text field
This sounds to me like what happens if you embed a certain set of characters in the field but then pass it a String including characters you haven't explicitly embedded. I'm guessing you may have pasted a string into the "Include these characters:" field in the "Character Embedding" window? If so, only those characters will be embedded with the field and you'd probably be better off just selecting Basic Latin in the predefined character sets. HTH A. On 7/5/06, Chris Velevitch <[EMAIL PROTECTED]> wrote: Sounds like restrict is not null. Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group www.flashdev.org.au ___ 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] weirdness passing string to text field
One possibility might be that you're using an embedded font, but haven't embedded all the characters in that font. HTH, Ian On 7/5/06, Rick Lecoat <[EMAIL PROTECTED]> wrote: Hi, I'm trying to pass a sting variable (var teamName:String) to a dynamic text field nested inside a couple of layers of MCs. The path is correct because the text field is being changed by the variable, but the string itself is corrupted or something because the variable's contents seems to be being altered. Trying to send the string "Mr Jones" results in the text field showing "M Joe". Trying to send the string "Executive" results in the text field displaying "Eee". As you can see, it is not even a simple truncation of the string (such as perhaps might have been the case if the text field were not big enough to hold the string); it is as if Flash is just choosing a few letters and ignoring the rest. Can anybody shed any light on this? I'm new to Actionscript and every (probably simple) stumbling block like this throws me completely out of the ring. Many thanks. -- Rick Lecoat ___ 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] weirdness passing string to text field
Chris, thanks for your speedy reply (I guess that if I was going to get a reply at 8.30 in the morning UK time it would have been from Australia!) Like I said in my initial post, I'm completely new to Actionscript (and all of Flash, really) and so your response, whilst I am sure it is the correct answer, is a bit cryptic to me. Could you maybe flesh out your reply with a bit of 'idiot guide' stuff so that I can take it and run with it? Many many thanks. -- Rick Lecoat -- Original message: Received from Chris Velevitch on 5/7/06 at 08:45 >Sounds like restrict is not null. > > >Chris ___ 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] weirdness passing string to text field
Sounds like restrict is not null. Chris -- Chris Velevitch Manager - Sydney Flash Platform Developers Group www.flashdev.org.au ___ 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