RE: [Flashcoders] Advice on creating dynamic crossword cluesth resize function
Thanks Kevin - it is working now and does exactly what I need. Many thanks for your patience! Cheers Paul -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Kevin Bath Sent: 21 May 2009 16:03 To: 'Flash Coders List' Subject: RE: [Flashcoders] Advice on creating dynamic crossword cluesth resize function Now Glen's suggestion will work - just stick a dynamic textfield offscreen, set font to Times New Roman, and embed fonts in that. That seems to make the font available to FP8 9. -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul Steven Sent: 21 May 2009 14:32 To: 'Flash Coders List' Subject: RE: [Flashcoders] Advice on creating dynamic crossword cluesth resize function Bah - added the txtClue.embedFonts = true; but still no text. Is there a particular font I need to have? I can't see any reference to any particular font -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Kevin Bath Sent: 21 May 2009 13:50 To: 'Flash Coders List' Subject: RE: [Flashcoders] Advice on creating dynamic crossword cluesth resize function Yay! Will work with FP9 and 8 if you add... txtClue.embedFonts = true; (doh - sorry) -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul Steven Sent: 21 May 2009 12:41 To: 'Flash Coders List' Subject: RE: [Flashcoders] Advice on creating dynamic crossword cluesth resize function There are no fonts mentioned in the code. And no fonts appear in font mapping. I have even tried adding txtClue.font = Times New Roman; But the text just doesn't seem to want to display:( -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Glen Pike Sent: 21 May 2009 12:38 To: Flash Coders List Subject: Re: [Flashcoders] Advice on creating dynamic crossword cluesth resize function You are probly missing a font... Paul Steven wrote: Kev, when I publish this for Flash Player 8 or 9 the text does not appear. It is definitely there as the highlights are the correct position and size. Any idea why the text is not actually visible? Also out of curiousity what is the XMP metadata? Thanks Paul -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Kevin Bath Sent: 21 May 2009 11:33 To: 'Flash Coders List' Subject: RE: [Flashcoders] Advice on creating dynamic crossword cluesth resize function Paul - I've knocked up a quick example of moving a masked movieclip which contains textfields populated by xml data. It should work with any length clue and demonstrates how to get a list of clues/textfields to autoscroll to a position - and resizes the highlight to match height of clue textfield. Just click on the numbers to get it to move. It's not pretty and the code is a bit rough (and in AS2) - but it demonstrates the principle. You may be well ahead of this by now - but I fancied a fiddle! You can grab it here. www.flowdigital.co.uk/download/crosswordclues.zip Kev. -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Paul Steven Sent: 21 May 2009 08:44 To: 'Flash Coders List' Subject: RE: [Flashcoders] Advice on creating dynamic crossword cluesth resize function Thanks Kerry Yes I do have the Advanced Lingo for Games book that has a crossword puzzle example which has proven very helpful for the main engine behind the crossword. I also have ActionScript 3.0 Game Programming University but that only has a word search. My main problem is being able to highlight individual clues and ensure they are visible within the scrollable area. I need to be able to put a highlight over the entire clue (which can be one or more lines long). If I put all the clues in one text field, the scrolling works fine - I am just not sure how to determine how high the highlight should be - especially as this will change if the text size is toggled. If someone clicks on a word on the crossword, if the corresponding clue is not currently visible (due to the need to scroll to get to it) I need to adjust the scroll to ensure this clue is visible and then also highlight the clue. So I effectively need to know what the scroll position is to display each clue and also how to determine the top and bottom of this clue. The highlight will extend the entire width of the clue text field so there is no need to work out widths. Any suggestions most welcome. Thanks Paul -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com
[Flashcoders] Using Tab key as a game control
Is it a bad idea to use the Tab key as a game control. Basically in a crossword game I am creating, I was going to use TAB to move to the next word and SHIFT TAB to move to the previous word. I notice however that when I press the TAB key all the buttons on my game screen are appearing with yellow boxes around them. I assume this is some kind of accessibility thing? I believe I can disable this using tabEnabled = false however I do not want to do this if it will reduce the accessibility of my crossword. Any advice appreciated! Thanks Paul ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Using Tab key as a game control
Paul Steven wrote: Is it a bad idea to use the Tab key as a game control. Basically in a crossword game I am creating, I was going to use TAB to move to the next word and SHIFT TAB to move to the previous word. I notice however that when I press the TAB key all the buttons on my game screen are appearing with yellow boxes around them. I assume this is some kind of accessibility thing? Yes, it is an accessibility issue. People with compromised muscle control use the tab key to navigate to buttons, URLs, etc. I've built accessible programs a lot in the past, and I've disabled the auto-tab feature. The programs I've written have been tailored to work with specific hardware tools like switches and programmable flat-panel keyboard substitutes. If you're not building alternate accessibility features, though, you might be in a bind. Tab is the way most people navigate crosswords, but I've done crossword games where you can click on the clue or in a blank space in the puzzle. On the other hand, you might be able to get away with disabling Tab. There are other Web tools, like Shockwave, that don't implement Tab for accessibility. However, I'm not an expert on current accessibility requirements. I would recommend you find out more about what the law (and your client) require. Others on this list, and on Flash Tiger, can probably help you with that. Cordially, Kerry Thompson ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Using Tab key as a game control
Hi, Your tab key is part of the Accessibility stuff - you can set the tab-indexes on components which you may be able to do dynamically - this would make the accessibility thing work automatically. Trouble is you might be stuck with that beautiful yellow outline :) HTH Glen Paul Steven wrote: Is it a bad idea to use the Tab key as a game control. Basically in a crossword game I am creating, I was going to use TAB to move to the next word and SHIFT TAB to move to the previous word. I notice however that when I press the TAB key all the buttons on my game screen are appearing with yellow boxes around them. I assume this is some kind of accessibility thing? I believe I can disable this using tabEnabled = false however I do not want to do this if it will reduce the accessibility of my crossword. Any advice appreciated! Thanks Paul ___ 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] FlashVars - place data in a variable
Hi everyone, I have added a text string to my swf using FlashVars. I can output the import text string to a text field just fine. However when I try to put it into a variable that is used for criteria to contact a database, it doesn't work. The text string is loading into the swf, the database query works when the text string is hard coded in and the text string can be displayed on the stage via a text field. How do I place the imported text string into a variable? I am overlooking something simple no doubt, but that simple item is eluding me. Example: //loads into a text field but won't stay in a variable keyStr = stage.loaderInfo.parameters.itemID; //loads into a text field but won't stay in a variable var paramObj:Object = stage.loaderInfo.parameters; for (keyStr in paramObj) { strValue = String(paramObj[keyStr]); myText.text = strValue; } I also tried putting it into a Global variable but no success All feedback is welcome! -Mack ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] FlashVars - place data in a variable
So you are trying access strValue after your loop? It may be a scope issue, try casting the var before the loop and trace after the loop. Also, you may want to access your flash var one by one to help debug: //quick example var strValue:String = LoaderInfo(this.root.loaderInfo).parameters.strValue trace(strValue) B. On Fri, May 22, 2009 at 1:04 PM, webmastermack webmasterm...@yahoo.com wrote: Hi everyone, I have added a text string to my swf using FlashVars. I can output the import text string to a text field just fine. However when I try to put it into a variable that is used for criteria to contact a database, it doesn't work. The text string is loading into the swf, the database query works when the text string is hard coded in and the text string can be displayed on the stage via a text field. How do I place the imported text string into a variable? I am overlooking something simple no doubt, but that simple item is eluding me. Example: //loads into a text field but won't stay in a variable keyStr = stage.loaderInfo.parameters.itemID; //loads into a text field but won't stay in a variable var paramObj:Object = stage.loaderInfo.parameters; for (keyStr in paramObj) { strValue = String(paramObj[keyStr]); myText.text = strValue; } I also tried putting it into a Global variable but no success All feedback is welcome! -Mack ___ 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] Author Time RadioButtonGroups
My .fla has auto declare unchecked and a radio button group on the stage. Each of their property panels have the groupName param set to myRBG How do I reference the group in my document class other than recording the .group property of one of the radio buttons? trace(myRBG) does not work. For anything else I'm used to declaring the display object in my document class but I don't know what scope radiobuttongroups have so I'm a little confused. -- --Joel Stransky stranskydesign.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] FlashVars - place data in a variable
This works just fine for me, I have an entire list of flashVars I have to access and set to variables to run an application. I wouldn't be able to loop them and know what I was accessing since they are all just string values. What you may want to do is trace the keyStr in your loop as well to see what is being looped: for (keyStr in paramObj){ trace(keyStr+ : +paramObj[keyStr]) } Still, you should be able to get to the loader info object and directly grab the flash var you want w/o looping through to get values. B. On Fri, May 22, 2009 at 2:03 PM, webmastermack webmasterm...@yahoo.com wrote: Hi Bob, Thanks for the code. Unfortunately the code you gave me didn't work for my AS3/CS3 file. However I can trace out the data via for loop or through stage.loaderInfo.parameters directly. But the only thing I can do with the data is print it out. (If I use the for loop I have the print is out inside the loop). This is really frustrating! I don't need to print it out, I need to use it as a variable in a database query and it just won't go in! Were you able to use your variable data in this way? -Mack --- On Fri, 5/22/09, Bob Wohl bob.w...@gmail.com wrote: From: Bob Wohl bob.w...@gmail.com Subject: Re: [Flashcoders] FlashVars - place data in a variable To: Flash Coders List flashcoders@chattyfig.figleaf.com Date: Friday, May 22, 2009, 1:17 PM So you are trying access strValue after your loop? It may be a scope issue, try casting the var before the loop and trace after the loop. Also, you may want to access your flash var one by one to help debug: //quick example var strValue:String = LoaderInfo(this.root.loaderInfo).parameters.strValue trace(strValue) B. On Fri, May 22, 2009 at 1:04 PM, webmastermack webmasterm...@yahoo.com wrote: Hi everyone, I have added a text string to my swf using FlashVars. I can output the import text string to a text field just fine. However when I try to put it into a variable that is used for criteria to contact a database, it doesn't work. The text string is loading into the swf, the database query works when the text string is hard coded in and the text string can be displayed on the stage via a text field. How do I place the imported text string into a variable? I am overlooking something simple no doubt, but that simple item is eluding me. Example: //loads into a text field but won't stay in a variable keyStr = stage.loaderInfo.parameters.itemID; //loads into a text field but won't stay in a variable var paramObj:Object = stage.loaderInfo.parameters; for (keyStr in paramObj) { strValue = String(paramObj[keyStr]); myText.text = strValue; } I also tried putting it into a Global variable but no success All feedback is welcome! -Mack ___ 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
[Flashcoders] FlashVars - place data in a variable
Hi Bob, Thanks for the code. Unfortunately the code you gave me didn't work for my AS3/CS3 file. However I can trace out the data via for loop or through stage.loaderInfo.parameters directly. But the only thing I can do with the data is print it out. (If I use the for loop I have the print is out inside the loop). This is really frustrating! I don't need to print it out, I need to use it as a variable in a database query and it just won't go in! Were you able to use your variable data in this way? -Mack --- On Fri, 5/22/09, Bob Wohl bob.w...@gmail.com wrote: From: Bob Wohl bob.w...@gmail.com Subject: Re: [Flashcoders] FlashVars - place data in a variable To: Flash Coders List flashcoders@chattyfig.figleaf.com Date: Friday, May 22, 2009, 1:17 PM So you are trying access strValue after your loop? It may be a scope issue, try casting the var before the loop and trace after the loop. Also, you may want to access your flash var one by one to help debug: //quick example var strValue:String = LoaderInfo(this.root.loaderInfo).parameters.strValue trace(strValue) B. On Fri, May 22, 2009 at 1:04 PM, webmastermack webmasterm...@yahoo.com wrote: Hi everyone, I have added a text string to my swf using FlashVars. I can output the import text string to a text field just fine. However when I try to put it into a variable that is used for criteria to contact a database, it doesn't work. The text string is loading into the swf, the database query works when the text string is hard coded in and the text string can be displayed on the stage via a text field. How do I place the imported text string into a variable? I am overlooking something simple no doubt, but that simple item is eluding me. Example: //loads into a text field but won't stay in a variable keyStr = stage.loaderInfo.parameters.itemID; //loads into a text field but won't stay in a variable var paramObj:Object = stage.loaderInfo.parameters; for (keyStr in paramObj) { strValue = String(paramObj[keyStr]); myText.text = strValue; } I also tried putting it into a Global variable but no success All feedback is welcome! -Mack ___ 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] FlashVars - place data in a variable
Hi Bob, Thanks for looking at my code. I really appreciate it! Below are the two scenarios that result in printing the string to the stage via a text field. //Version 1 var keyStr:String; keyStr = stage.loaderInfo.parameters.itemID; texty.text = keyStr; addChild(texty); //Version 2 var keyStr:String; var paramObj:Object = stage.loaderInfo.parameters; var path_course:String; for (keyStr in paramObj) { keyStr = String(paramObj[keyStr]); texty.text = keyStr; } If I reference keyStr outsided of text field, there is no response. Example: gw.connect(http://www.mysite.com/amfphp/gateway.php;); gw.call(load_data.my_data, res, keyStr); -Mack --- On Fri, 5/22/09, Bob Wohl bob.w...@gmail.com wrote: From: Bob Wohl bob.w...@gmail.com Subject: Re: [Flashcoders] FlashVars - place data in a variable To: Flash Coders List flashcoders@chattyfig.figleaf.com Date: Friday, May 22, 2009, 2:15 PM This works just fine for me, I have an entire list of flashVars I have to access and set to variables to run an application. I wouldn't be able to loop them and know what I was accessing since they are all just string values. What you may want to do is trace the keyStr in your loop as well to see what is being looped: for (keyStr in paramObj){ trace(keyStr+ : +paramObj[keyStr]) } Still, you should be able to get to the loader info object and directly grab the flash var you want w/o looping through to get values. B. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] inserting object into swf
A few days ago I made a post with the subject unexpected result with linked classes in embedded swf. The lesson I learned from this is that an object is only imported into a movie player once, regardless of how many swfs it occurs in. Well, I'm dealing with a situation where I forgot to back up my source code following the most recent official release of a product. I made about a month of changes as we were adding a bunch of features before I realized this. Anyway, we haven't had an official release in a while, but we've found a rather critical problem that is affecting a customer. I just need to add one line to one object to make the problem go away. So, is there a way to insert the corrected object into the last official release of the compiled swf? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] FlashVars - place data in a variable
Hi Mack, The variable should still be holding the value. When you trace keyStr right before you do your call, does it come back null? B. On Fri, May 22, 2009 at 2:34 PM, webmastermack webmasterm...@yahoo.com wrote: Hi Bob, Thanks for looking at my code. I really appreciate it! Below are the two scenarios that result in printing the string to the stage via a text field. //Version 1 var keyStr:String; keyStr = stage.loaderInfo.parameters.itemID; texty.text = keyStr; addChild(texty); //Version 2 var keyStr:String; var paramObj:Object = stage.loaderInfo.parameters; var path_course:String; for (keyStr in paramObj) { keyStr = String(paramObj[keyStr]); texty.text = keyStr; } If I reference keyStr outsided of text field, there is no response. Example: gw.connect(http://www.mysite.com/amfphp/gateway.php;); gw.call(load_data.my_data, res, keyStr); -Mack --- On Fri, 5/22/09, Bob Wohl bob.w...@gmail.com wrote: From: Bob Wohl bob.w...@gmail.com Subject: Re: [Flashcoders] FlashVars - place data in a variable To: Flash Coders List flashcoders@chattyfig.figleaf.com Date: Friday, May 22, 2009, 2:15 PM This works just fine for me, I have an entire list of flashVars I have to access and set to variables to run an application. I wouldn't be able to loop them and know what I was accessing since they are all just string values. What you may want to do is trace the keyStr in your loop as well to see what is being looped: for (keyStr in paramObj){ trace(keyStr+ : +paramObj[keyStr]) } Still, you should be able to get to the loader info object and directly grab the flash var you want w/o looping through to get values. B. ___ 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] FlashVars - place data in a variable
I was so sure I had it but it looks like I have to accept defeat on this. I can trace the variable from everywhere in, out and around the code. If hard coded the db call works but it simply will not accept the variable. I'm so very disappointed but enough is enough. It just doesn't work. Period. Thanks for all your help. -Mack --- On Fri, 5/22/09, Bob Wohl bob.w...@gmail.com wrote: From: Bob Wohl bob.w...@gmail.com Subject: Re: [Flashcoders] FlashVars - place data in a variable To: Flash Coders List flashcoders@chattyfig.figleaf.com Date: Friday, May 22, 2009, 3:58 PM Hi Mack, The variable should still be holding the value. When you trace keyStr right before you do your call, does it come back null? B. On Fri, May 22, 2009 at 2:34 PM, webmastermack webmasterm...@yahoo.com wrote: Hi Bob, Thanks for looking at my code. I really appreciate it! Below are the two scenarios that result in printing the string to the stage via a text field. //Version 1 var keyStr:String; keyStr = stage.loaderInfo.parameters.itemID; texty.text = keyStr; addChild(texty); //Version 2 var keyStr:String; var paramObj:Object = stage.loaderInfo.parameters; var path_course:String; for (keyStr in paramObj) { keyStr = String(paramObj[keyStr]); texty.text = keyStr; } If I reference keyStr outsided of text field, there is no response. Example: gw.connect(http://www.mysite.com/amfphp/gateway.php;); gw.call(load_data.my_data, res, keyStr); -Mack --- On Fri, 5/22/09, Bob Wohl bob.w...@gmail.com wrote: From: Bob Wohl bob.w...@gmail.com Subject: Re: [Flashcoders] FlashVars - place data in a variable To: Flash Coders List flashcoders@chattyfig.figleaf.com Date: Friday, May 22, 2009, 2:15 PM This works just fine for me, I have an entire list of flashVars I have to access and set to variables to run an application. I wouldn't be able to loop them and know what I was accessing since they are all just string values. What you may want to do is trace the keyStr in your loop as well to see what is being looped: for (keyStr in paramObj){ trace(keyStr+ : +paramObj[keyStr]) } Still, you should be able to get to the loader info object and directly grab the flash var you want w/o looping through to get values. B. ___ 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