Re: [Flashcoders] Newbie help with dynamic variable assignment
I couldn't follow your logic exactly, but I figure I could show you some basic looping tricks. Hope this helps... : var linkArray:Array = new Array(); for (var i = 0; i < countyNodes.length; i++) { linkArray[i] = new Array(); // nested array linkArray[i].thisCounty = countyNodes [i].firstChild.firstChild.nodeValue; linkArray[i].thisLink = countyNodes[i].lastChild.firstChild.nodeValue; } ... // i = active movieClip var myMC:MovieClip = this["countyMC"+i]; myColor = new Color(myMC); myColor.setRBG(out_color); if (linkArray[i].thisLink == undefined || Douglas_URL == "") { myMC._visible = false; } On Oct 9, 2006, at 11:59 AM, Deanna Schneider wrote: Hi All, I'm working off of something that someone else coded, and trying to make it read some xml data (it was just reading a static include). Anyway, it loops through 72 county nodes. I've got this part working: //loop through and set all the county vars var countyNodeLength = countyNodes.length; for (var i = 0; i < countyNodeLength; i++) { thisCounty = countyNodes[i].firstChild.firstChild.nodeValue; thisLink = countyNodes[i].lastChild.firstChild.nodeValue // this line sets the vars - I couldn't get it to work properly using the "var" keyword set (thisCounty + "_URL", thisLink); } But, a litte later on, he had hardcoded the following stuff 72 times, where Douglas is one example of a value that would be in the "thisCounty" set in the loop above: Douglas_color = new Color(_root.Douglas.btn_color); Douglas_color.setRGB(out_color); if (Douglas_URL == "undefined" || Douglas_URL == undefined) { Douglas._visible = false; } I haven't been able to figure out a way to set that dynamically as I run through the loop. Is it even possible to do that much dynamic evaluation? Thanks in advance. ___ 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 -- Radley Marx [EMAIL PROTECTED] 310.220.4088 http://www.radleymarx.com -- ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] re: pattern fever
Thanks Reuben. Yes, I think I'll do what you suggest: just parameterize a full-dress Navigation with a custom object, then have the controller retrieve it. It will be make it the Navigation difficult to extend and write, but I see no alternative for now...except maybe using a dynamic class, and building up an object with snapped-on methods? As for patterns--in this case, I'm definitely grasping for a solution. But in my short experience, patterns have been hugely useful, as well as just neat. I think I would eventually have approximated some patterns (state, observer)..but composite, decorator, factory? Never. I'm still excited. >> Why not use a initialization NavigationSettings class for your Navigation that has its own methods that can be interrogated by your controller? ie - new Navigation(new NavigationSettings(params)); The "controller bar" could access the NavigationSettings instance to find out its necessary settings. IMHO, patterns are only useful where they actually solve problems, not create additional ones. "Pattern Fever" does no good for anyone.If you can't find a pattern that fits your requirements, maybe patterns are the wrong way to go about it. You shouldn't need to twist your requirements to try and fit into a particular pattern. Hope this helps. ___ 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] Iterate over all movieclips in a timeline
Pillage through and get nested mc's function pillage(mc) { for (var a in mc) { if (mc[a] instanceof MovieClip) { trace(mc[a]._name); pillage(mc[a]); } } } pillage(_root) Regards, Bjorn Schultheiss Senior Flash Developer QDC Technologies -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Johannes Nel Sent: Tuesday, 10 October 2006 11:38 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] Iterate over all movieclips in a timeline this will only do the current frame, you cannot do the entire timeline (well you can in jsfl :) ) On 10/9/06, Steven Sacks | BLITZ <[EMAIL PROTECTED]> wrote: > > > I feel a bit boneheaded asking this... is there any way of iterating > > over all movie clips in a timeline? > > for (var a in this) { > if (this[a] instanceof MovieClip) { > trace(this[a]._name); > } > } > > BLITZ | Steven Sacks - 310-551-0200 x209 > > ___ > 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 > -- j:pn http://www.lennel.org ___ 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] Iterate over all movieclips in a timeline
Ah, thanks, that's exactly what I needed. Current frame only is fine, as it's only going to do some initialisation at frame 1 anyway. Steven Sacks | BLITZ wrote: I feel a bit boneheaded asking this... is there any way of iterating over all movie clips in a timeline? for (var a in this) { if (this[a] instanceof MovieClip) { trace(this[a]._name); } } BLITZ | Steven Sacks - 310-551-0200 x209 ___ 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 -- Haikal Saadh Applications Programmer ICT Resources, TALSS QUT Kelvin Grove ___ 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] Iterate over all movieclips in a timeline
this will only do the current frame, you cannot do the entire timeline (well you can in jsfl :) ) On 10/9/06, Steven Sacks | BLITZ <[EMAIL PROTECTED]> wrote: > I feel a bit boneheaded asking this... is there any way of iterating > over all movie clips in a timeline? for (var a in this) { if (this[a] instanceof MovieClip) { trace(this[a]._name); } } BLITZ | Steven Sacks - 310-551-0200 x209 ___ 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 -- j:pn http://www.lennel.org ___ 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] Iterate over all movieclips in a timeline
> I feel a bit boneheaded asking this... is there any way of iterating > over all movie clips in a timeline? for (var a in this) { if (this[a] instanceof MovieClip) { trace(this[a]._name); } } BLITZ | Steven Sacks - 310-551-0200 x209 ___ 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] Iterate over all movieclips in a timeline
Hello. I feel a bit boneheaded asking this... is there any way of iterating over all movie clips in a timeline? At the moment, I just have a hard coded array that contains references to the clips I need. This isn't a big problem, but that just means one more thing to edit each time I add or remove clips. (and I'd have to name them as well). Thanks. -- Haikal Saadh Applications Programmer ICT Resources, TALSS QUT Kelvin Grove ___ 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] Flash transparent on top of Windows Media Player
It's easy to get the impression that the video is playing inside the the browser window but it isn't. The ActiveX control in the browser talks to Windows and tells it where to draw the video, which actually plays above the browser window. When you move the browser window around, it's telling the video to move with it. Sometimes, the video will move with it, sometimes you will see a "masking effect" where the video stays in place while the player moves. Both behaviors are good demonstrations that the video and the player are separate components in Windows. Unfortunately, there's nothing you can do about it, AFAIK. ___ 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] Flash transparent on top of Windows Media Player
Is it possible to ditch the windows media player inplace of flash video?, Would make life easier. An answer to your question... I cant provide one :) Regards, Bjorn Schultheiss -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mick G Sent: Tuesday, 10 October 2006 10:27 AM To: Flashcoders mailing list Subject: [Flashcoders] Flash transparent on top of Windows Media Player Does anyone know if there is a way to embed flash transparent (wmode=transparent) on a layer above an embedded Windows Media Player active-x control? So it's like this... --Flash (wmode transparency) ---Windows Media play playing video -HTML page I've made a demo to achieve this and the Media Player itself is below the flash - the video playing is on top of the flash. Any ideas/workarounds? - Mick ___ 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] Accessibility: TextField Reading Twice
Interesting. What version of JAWS are you testing with? What version of the Flash player? Can you post a link? The FLA? Thanks, AWK > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf > Of JerBrand > Sent: Monday, October 09, 2006 12:09 PM > To: Flashcoders mailing list > Subject: [Flashcoders] Accessibility: TextField Reading Twice > > Desperate for help, have been fighting this issue for a week: > > I've been playing with a set of components for non-technical users: > Basic idea is to provide some simple "full page" components > that are accessible without any real effort on the user > building the fla. > > So, they're finished and have been reviewed by a > accessibility place out of VA. Everything seems to be working > perfectly, spare one silly item: > When JAWS is reading the page content, The TextField in one > and only one component reads twice, every time. However, if > you tab from item to item in the flash movie, none of the > items read the text twice. > > I've viewed the movie in the debugger and confirmed that the > text is only set for that TextField and doesn't appear > anywhere else. I've traced out text for every MC on the page, > and I've set the TextField __accProps to be silent and added > the text to the _accProps.name of the containing MovieClip. > Still reads twice. If I strip out the accessibility code for > all items in the component, that bit of text is read. > > Anyone know of a way to figure out what's happening? > > The accessibility code is very simple: > > _textOne._accProps = new Object(); > > _textOne._accProps.name = removeHTML(__text1); > > _textOne._accProps.forcesimple = true; > > _textOne.tabIndex = _loc2.text1; > > > _textOne is a MovieClip with a TextField inside of it at 0,0. > Really the only thing it adds is a setSize() method that > resizes the TextField if the layout changes, and a get/set > "Text" property. The rest is as simple as it sounds. > > Thanks for the help > > Jer Brand > > > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com http://training.figleaf.com > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Flash transparent on top of Windows Media Player
Does anyone know if there is a way to embed flash transparent (wmode=transparent) on a layer above an embedded Windows Media Player active-x control? So it's like this... --Flash (wmode transparency) ---Windows Media play playing video -HTML page I've made a demo to achieve this and the Media Player itself is below the flash - the video playing is on top of the flash. Any ideas/workarounds? - Mick ___ 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] pattern fever: composing dynamic object and knowing them remotely
Why not use a initialization NavigationSettings class for your Navigation that has its own methods that can be interrogated by your controller? ie - new Navigation(new NavigationSettings(params)); The "controller bar" could access the NavigationSettings instance to find out its necessary settings. IMHO, patterns are only useful where they actually solve problems, not create additional ones. "Pattern Fever" does no good for anyone.If you can't find a pattern that fits your requirements, maybe patterns are the wrong way to go about it. You shouldn't need to twist your requirements to try and fit into a particular pattern. Hope this helps. On 10/10/2006, at 4:31 AM, Matt Garland wrote: I have a design problem: A site I'm working up has a shell/module structure. Each module composes an instance of a Navigation class. This instance mixes and matches various navigation functionality. Some modules might have last/next methods, some might have last/ next and direct goto (buttons) methods, some might have just goto (buttons), or buttons and browser-like, history-based forwards/ backwards methods. Some will have pause/play. Some might have no navigation at all. All would have an index property and an abstract "goTo" method, which would be handled/implemented by the module itself. When the module is focused, a controller bar in the shell redraws itself according to the module's navigation. Here's two questions: 1) How do I make this navigation object? It mixes and matches a set of methods almost randomly. It this even a candidate for a class? Having just read Head First Design Patterns, my first thought was that decorator could help. But how do you access added methods if the basic object is wrapped more than once: NextLast(History(new Navigation())).goBackward() wouldn't work because goBackward is not a method of the outermost wrapper, NextLast. Should I then make the decorator specify ALL possible methods? That seems perverse. Instead, it would be easier to supply a full-fledged navigation object and selectively enable parts of it. But then the class would turn into a mess of conditionals: function next() { currentIndex++ if (this navigation instance has a history) { history.push(currentIndex); } This is stumping me. Having pattern fever (I recommend the book), the only alternative I can think of is: turn each piece of navigation functionality into a class (history, nextLast, etc), then compose a navigation object as an array of objects, which would each in term handle a message from the controller in the shell (chain of responsibility?). 2) Once I manage to compose a navigation object, how can the shell's controller bar interrogate it? That is, how to know which methods are defined or enabled for it? Is there a more direct way than looping through the object and looking at its properties and methods (and since I'm doing this in AS3, I'm not sure I can even do this). I suppose I could store a bunch os strings for verification, but as with the last problem, I can't believe that smarter programmers haven't solved this problem in an better way. I should say that the site is mine and the only constraint is the spec I'm giving myself, which is: give every module a navigation module, so that the module's navigation will be easy to create (new History(new Navigation)), without having to create a bunch of new classes (HistoryNextLast extends History). In addition, I want the the navigation object to refer back to other navigations objects so that they form a XML-like nodal structure. This would be convenient for retrieving navigation information, but even more for creating an easy add-on structure. Basically, I want any combination of nav functions to be able to lead to any other kind of combination, module after module. How to achieve this I don't know yet. ___ 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] PSP XML tests
Sorry, I was trying to say that if it is an official Flash player where's the "compile once, run everywhere"? It seems we're not talking about a bug, but about someone decided to not implement the whole API, isn't it? Maybe it's not an Adobe product, but then they should take care about a piece of software that says it runs Flash content when it doesn't. Anyone with more info about it? Thanks On 10/9/06, Zárate <[EMAIL PROTECTED]> wrote: Well, that really amazes me. I mean, I work with mobile devices (mostly PDAs with Windows Mobile 5) almost everyday and I have to say that I haven't found these kind of things... I'm trying to find information about who made that Flash player for the PSP. Is it and Adobe "official" product? If so, where is the On 10/9/06, John Giotta <[EMAIL PROTECTED]> wrote: > Juan, > Yes you will notice alot has been laxed on the PSP Flash Player. > I spent a few weeks testing, but I'm slowly discovering Mobile Flash is just > not robust enough (again). > ___ > 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 > -- Juan Delgado - Zárate http://www.zarate.tv -- Juan Delgado - Zárate http://www.zarate.tv ___ 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] PSP XML tests
Well, that really amazes me. I mean, I work with mobile devices (mostly PDAs with Windows Mobile 5) almost everyday and I have to say that I haven't found these kind of things... I'm trying to find information about who made that Flash player for the PSP. Is it and Adobe "official" product? If so, where is the On 10/9/06, John Giotta <[EMAIL PROTECTED]> wrote: Juan, Yes you will notice alot has been laxed on the PSP Flash Player. I spent a few weeks testing, but I'm slowly discovering Mobile Flash is just not robust enough (again). ___ 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 -- Juan Delgado - Zárate http://www.zarate.tv ___ 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] OT: sold laptop, need to release Studio 8?
I rekon. I just don't see "Transfer this License" under the help menu. I sold the laptop. I just wiped the hard drive and re-installed Windows. So it's moot now. Seems like I had to call Macromedia once before though, back when I had MX2004 stuff. I do reformat my computers every once in a while. No biggie. Calling was a little annoying, but, hey... Thanks. On 10/9/06, John Dowdell <[EMAIL PROTECTED]> wrote: Count Schemula wrote: > I just sold my laptop. > I can't really find how to "release" my serial number for Studio 8 > before I reformat the drive. > Does this still have to be done? > I'm buying another laptop, so, I want intall on that with no hassles. Sorry for my delay; thanks to Ramses for the link. The Macromedia "activation" method mainly checks for many requests made on the same serial number in short succession. If you're installing on a new system, months after the last installation, then this wouldn't usually trigger any notice from the serial-authentication server. But to be sure, you can just choose the "Transfer this License" item from the Help menu, which will tell the server that you've removed the old installation. Should be okay either way, but it's better to hit that menu item if you can. Good...? jd -- count_schemula http://www.thelargeglass.com/flashNo0b/";>files for No0bs ___ 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] Screenweaver 3 and FlashDevelop
Hi there. I'm working with Screenweaver and Flash Develop, making some tests and I would like to know hot to call relative paths from my .exe Projector, when I'm using swFile.saveString() method, for example. Thanks ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] OT: sold laptop, need to release Studio 8?
Count Schemula wrote: I just sold my laptop. I can't really find how to "release" my serial number for Studio 8 before I reformat the drive. Does this still have to be done? I'm buying another laptop, so, I want intall on that with no hassles. Sorry for my delay; thanks to Ramses for the link. The Macromedia "activation" method mainly checks for many requests made on the same serial number in short succession. If you're installing on a new system, months after the last installation, then this wouldn't usually trigger any notice from the serial-authentication server. But to be sure, you can just choose the "Transfer this License" item from the Help menu, which will tell the server that you've removed the old installation. Should be okay either way, but it's better to hit that menu item if you can. Good...? jd -- John Dowdell . Adobe Developer Support . San Francisco CA USA Weblog: http://weblogs.macromedia.com/jd Aggregator: http://weblogs.macromedia.com/mxna Technotes: http://www.macromedia.com/support/ Spam killed my private email -- public record is best, thanks. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] PSP XML tests
Juan, Yes you will notice alot has been laxed on the PSP Flash Player. I spent a few weeks testing, but I'm slowly discovering Mobile Flash is just not robust enough (again). ___ 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] dynamic string color switching
Thank you. This exactly what I was looking for. I didn't know you could pass indexes as arguments to the setTextFormat method. Doug Tangren [EMAIL PROTECTED] On Oct 9, 2006, at 2:33 PM, Michael Bedar wrote: If you want to use TextFormat, you can apply a textformat to a text selection. A quick way to do this without creating a bunch of new textformat objects is to copy the current format into a temp var using tf.getTextFormat(), change the color, and the apply it to the selection with my_textField.setTextFormat(beginIndex:Number, endIndex:Number, textFormat:TextFormat) or of course you can maintain a few TextFormat objects if you have a set of styles you wish to work with. Alternatively you could use a CSS stylesheet, but this may be a rare circumstance where textFormat is better. On Oct 9, 2006, at 2:24 PM, Doug Tangren wrote: I was wondering if if is possible to dynamically change the color of parts of a string within a single text field. I know how to set the color of the whole text by applying a new Text format object to a text field but I was wondering how I might apply a different color to a substring of the target text field while preserving the original text format color for the rest of the text. I am writing a class that loops through the index of a string and changes the case of a character and I would also like to be able to change the color without complicating things by dynamically splitting the text into separate text fields and aligning them based on the text's width. Doug Tangren [EMAIL PROTECTED] ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Newbie help with dynamic variable assignment
Hi All, I'm working off of something that someone else coded, and trying to make it read some xml data (it was just reading a static include). Anyway, it loops through 72 county nodes. I've got this part working: //loop through and set all the county vars var countyNodeLength = countyNodes.length; for (var i = 0; i < countyNodeLength; i++) { thisCounty = countyNodes[i].firstChild.firstChild.nodeValue; thisLink = countyNodes[i].lastChild.firstChild.nodeValue // this line sets the vars - I couldn't get it to work properly using the "var" keyword set (thisCounty + "_URL", thisLink); } But, a litte later on, he had hardcoded the following stuff 72 times, where Douglas is one example of a value that would be in the "thisCounty" set in the loop above: Douglas_color = new Color(_root.Douglas.btn_color); Douglas_color.setRGB(out_color); if (Douglas_URL == "undefined" || Douglas_URL == undefined) { Douglas._visible = false; } I haven't been able to figure out a way to set that dynamically as I run through the loop. Is it even possible to do that much dynamic evaluation? Thanks in advance. ___ 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] dynamic string color switching
If you want to use TextFormat, you can apply a textformat to a text selection. A quick way to do this without creating a bunch of new textformat objects is to copy the current format into a temp var using tf.getTextFormat(), change the color, and the apply it to the selection with my_textField.setTextFormat(beginIndex:Number, endIndex:Number, textFormat:TextFormat) or of course you can maintain a few TextFormat objects if you have a set of styles you wish to work with. Alternatively you could use a CSS stylesheet, but this may be a rare circumstance where textFormat is better. On Oct 9, 2006, at 2:24 PM, Doug Tangren wrote: I was wondering if if is possible to dynamically change the color of parts of a string within a single text field. I know how to set the color of the whole text by applying a new Text format object to a text field but I was wondering how I might apply a different color to a substring of the target text field while preserving the original text format color for the rest of the text. I am writing a class that loops through the index of a string and changes the case of a character and I would also like to be able to change the color without complicating things by dynamically splitting the text into separate text fields and aligning them based on the text's width. Doug Tangren [EMAIL PROTECTED] ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] pattern fever: composing dynamic object and knowing them remotely
I have a design problem: A site I'm working up has a shell/module structure. Each module composes an instance of a Navigation class. This instance mixes and matches various navigation functionality. Some modules might have last/next methods, some might have last/next and direct goto (buttons) methods, some might have just goto (buttons), or buttons and browser-like, history-based forwards/ backwards methods. Some will have pause/play. Some might have no navigation at all. All would have an index property and an abstract "goTo" method, which would be handled/implemented by the module itself. When the module is focused, a controller bar in the shell redraws itself according to the module's navigation. Here's two questions: 1) How do I make this navigation object? It mixes and matches a set of methods almost randomly. It this even a candidate for a class? Having just read Head First Design Patterns, my first thought was that decorator could help. But how do you access added methods if the basic object is wrapped more than once: NextLast(History(new Navigation())).goBackward() wouldn't work because goBackward is not a method of the outermost wrapper, NextLast. Should I then make the decorator specify ALL possible methods? That seems perverse. Instead, it would be easier to supply a full-fledged navigation object and selectively enable parts of it. But then the class would turn into a mess of conditionals: function next() { currentIndex++ if (this navigation instance has a history) { history.push(currentIndex); } This is stumping me. Having pattern fever (I recommend the book), the only alternative I can think of is: turn each piece of navigation functionality into a class (history, nextLast, etc), then compose a navigation object as an array of objects, which would each in term handle a message from the controller in the shell (chain of responsibility?). 2) Once I manage to compose a navigation object, how can the shell's controller bar interrogate it? That is, how to know which methods are defined or enabled for it? Is there a more direct way than looping through the object and looking at its properties and methods (and since I'm doing this in AS3, I'm not sure I can even do this). I suppose I could store a bunch os strings for verification, but as with the last problem, I can't believe that smarter programmers haven't solved this problem in an better way. I should say that the site is mine and the only constraint is the spec I'm giving myself, which is: give every module a navigation module, so that the module's navigation will be easy to create (new History(new Navigation)), without having to create a bunch of new classes (HistoryNextLast extends History). In addition, I want the the navigation object to refer back to other navigations objects so that they form a XML-like nodal structure. This would be convenient for retrieving navigation information, but even more for creating an easy add-on structure. Basically, I want any combination of nav functions to be able to lead to any other kind of combination, module after module. How to achieve this I don't know yet. ___ 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] dynamic string color switching
> I was wondering if if is possible to dynamically change the color of > parts of a string within a single text field. You can do it with an HTML textfield. ___ 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] dynamic string color switching
I was wondering if if is possible to dynamically change the color of parts of a string within a single text field. I know how to set the color of the whole text by applying a new Text format object to a text field but I was wondering how I might apply a different color to a substring of the target text field while preserving the original text format color for the rest of the text. I am writing a class that loops through the index of a string and changes the case of a character and I would also like to be able to change the color without complicating things by dynamically splitting the text into separate text fields and aligning them based on the text's width. Doug Tangren [EMAIL PROTECTED] ___ 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] Error check for parseXML()
Good point. One optional tweak: var xml:XML = new XML(); xml.ignoreWhite = true; xml.parseXML(someTextVar); xml.onLoad = function(success:Boolean):Void { if (this.status == 0) { trace("Success!"); } else { trace("Error in XML! Code: " + this.status); } } The scope should probably be "this" instead of "xml" in this case. ― Mike Keesey > -Original Message- > From: [EMAIL PROTECTED] [mailto:flashcoders- > [EMAIL PROTECTED] On Behalf Of Ray Chuan > Sent: Saturday, October 07, 2006 2:21 AM > To: Flashcoders mailing list > Subject: Re: [Flashcoders] Error check for parseXML() > > Hi, > you should put the conditional in a callback, because when execution > reaches the conditional xml parsing might not have finished parsing. > > var xml:XML = new XML(); > xml.ignoreWhite = true; > xml.parseXML(someTextVar); > xml.onLoad = function(success:Boolean):Void { > if (xml.status == 0) { > trace("Success!"); > } else { > trace("Error in XML! Code: " + xml.status); > } > } > > Note that the "success" argument can be ignored if you're using > functions like parseXML(), because it's got to do with the success of > loading a document using XML.load() or XML.sendAndLoad(). > > On 10/7/06, Mike Keesey <[EMAIL PROTECTED]> wrote: > > Use the XML.status field. > > > > var xml:XML = new XML(); > > xml.ignoreWhite = true; > > xml.parseXML(someTextVar); > > if (xml.status == 0) { > > trace("Success!"); > > } else { > > trace("Error in XML! Code: " + xml.status); > > } > > > > ― > > Mike Keesey > > > -Original Message- > > > From: [EMAIL PROTECTED] [mailto:flashcoders- > > > [EMAIL PROTECTED] On Behalf Of Mendelsohn, Michael > > > Sent: Friday, October 06, 2006 6:50 AM > > > To: Flashcoders mailing list > > > Subject: [Flashcoders] Error check for parseXML() > > > > > > Hi list... > > > > > > According to the help docs, > > > public parseXML(value:String) : Void > > > doesn't return an integer or anything to indicate successful parsing > > of > > > the xml. How can I be certain that I've passed in some error free xml > > > and it was able to parse? > > > > > > Thanks, > > > - Michael M. > > > > > > > > > > > > > > > > > > ___ > > > 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 > > > > > -- > Cheers, > Ray Chuan ___ 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] Accessibility: TextField Reading Twice
Desperate for help, have been fighting this issue for a week: I've been playing with a set of components for non-technical users: Basic idea is to provide some simple "full page" components that are accessible without any real effort on the user building the fla. So, they're finished and have been reviewed by a accessibility place out of VA. Everything seems to be working perfectly, spare one silly item: When JAWS is reading the page content, The TextField in one and only one component reads twice, every time. However, if you tab from item to item in the flash movie, none of the items read the text twice. I've viewed the movie in the debugger and confirmed that the text is only set for that TextField and doesn't appear anywhere else. I've traced out text for every MC on the page, and I've set the TextField __accProps to be silent and added the text to the _accProps.name of the containing MovieClip. Still reads twice. If I strip out the accessibility code for all items in the component, that bit of text is read. Anyone know of a way to figure out what's happening? The accessibility code is very simple: _textOne._accProps = new Object(); _textOne._accProps.name = removeHTML(__text1); _textOne._accProps.forcesimple = true; _textOne.tabIndex = _loc2.text1; _textOne is a MovieClip with a TextField inside of it at 0,0. Really the only thing it adds is a setSize() method that resizes the TextField if the layout changes, and a get/set "Text" property. The rest is as simple as it sounds. Thanks for the help Jer Brand ___ 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] PSP XML tests
Hi, Thanks it seems to work now. However, I was expecting the onLoad method to fire with "false" for the success parameter. I've searched the archives for PSP and haven't found to much information about it after April (release of the 2.7 firmware). But thanks again :) Cheers, Juan On 10/9/06, eric dolecki <[EMAIL PROTECTED]> wrote: I think you have to use full paths on the PSP for the XML load. check the archives On 10/9/06, Zárate <[EMAIL PROTECTED]> wrote: > > Hi all, > > I'm starting testing Flash content on the PSP and I'm not getting > quite far :( I'm trying to read a really simple XML file, but it seems > it doesn't work properly. Just the quick&dirty code bellow. I've tried > both the "old" method and with the Delegate class, but that the onLoad > method doesn't get fired. > > Then, there's a weird thing with the firmware version. If I browse to > Settings > System Settings I see System Software Version 2.81. > However, if I browse to Game > PSP Update it displays that the version > is 2.60. Is that correct? > > And last, I've searched the list archives and I've found the link > bellow, but it doesn't work. Anyone has a copy or know where can I get > the application? Just to see something working on the PSP ¬¬ > > http://jdgiotta.googlepages.com/PSPReader.zip > > Thanks a lot, > > Juan > > - > > function init(){ > > _root.field.text = "step 2"; > > myXML = new XML(); > myXML.owner = this; > myXML.onLoad = function(success){ > this.owner.parseLoadedXML(success); > } > > myXML.load("test.xml"); > > } > > function parseLoadedXML(success){ > > _root.field.text = ">>> " + myXML.toString() + " -- " + success; > > } > > _root.field.text = "loading"; > > init(); > stop(); > > - > > -- > Juan Delgado - Zárate > http://www.zarate.tv > ___ > 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 -- Juan Delgado - Zárate http://www.zarate.tv ___ 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] PSP XML tests
I think you have to use full paths on the PSP for the XML load. check the archives On 10/9/06, Zárate <[EMAIL PROTECTED]> wrote: Hi all, I'm starting testing Flash content on the PSP and I'm not getting quite far :( I'm trying to read a really simple XML file, but it seems it doesn't work properly. Just the quick&dirty code bellow. I've tried both the "old" method and with the Delegate class, but that the onLoad method doesn't get fired. Then, there's a weird thing with the firmware version. If I browse to Settings > System Settings I see System Software Version 2.81. However, if I browse to Game > PSP Update it displays that the version is 2.60. Is that correct? And last, I've searched the list archives and I've found the link bellow, but it doesn't work. Anyone has a copy or know where can I get the application? Just to see something working on the PSP ¬¬ http://jdgiotta.googlepages.com/PSPReader.zip Thanks a lot, Juan - function init(){ _root.field.text = "step 2"; myXML = new XML(); myXML.owner = this; myXML.onLoad = function(success){ this.owner.parseLoadedXML(success); } myXML.load("test.xml"); } function parseLoadedXML(success){ _root.field.text = ">>> " + myXML.toString() + " -- " + success; } _root.field.text = "loading"; init(); stop(); - -- Juan Delgado - Zárate http://www.zarate.tv ___ 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] book suggestions?
There's the industry-standard Robert Penner book: http://www.robertpenner.com/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marcelo de Moraes Serpa Sent: Monday, October 09, 2006 7:37 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] book suggestions? Does anyone know if Flash Math Creativity have a ebook version for sale? I prefer the ebook over the paper as it's cheaper for me and ships instantly :) I've bought FAA as ebook.. it's amazing indeed... too bad I didn't have time to finish reading it yet... Marcelo. On 10/9/06, Ian Thomas <[EMAIL PROTECTED]> wrote: > > Josh, > Danny's book is, indeed, exactly what you're looking for. :-) > > > http://www.amazon.com/Mathematics-Physics-Programmers-Game-Development/d p/1584503300 > > Ian > > On 10/9/06, Danny Kodicek <[EMAIL PROTECTED]> wrote: > > > > If I may self-publicise, you might try my book Mathematics and Physics > for > > Programmers. It's been well reviewed in this forum before, so I don't > feel > > *too* bad for bringing it up :) > > > > 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 ___ 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] PSP XML tests
Hi all, I'm starting testing Flash content on the PSP and I'm not getting quite far :( I'm trying to read a really simple XML file, but it seems it doesn't work properly. Just the quick&dirty code bellow. I've tried both the "old" method and with the Delegate class, but that the onLoad method doesn't get fired. Then, there's a weird thing with the firmware version. If I browse to Settings > System Settings I see System Software Version 2.81. However, if I browse to Game > PSP Update it displays that the version is 2.60. Is that correct? And last, I've searched the list archives and I've found the link bellow, but it doesn't work. Anyone has a copy or know where can I get the application? Just to see something working on the PSP ¬¬ http://jdgiotta.googlepages.com/PSPReader.zip Thanks a lot, Juan - function init(){ _root.field.text = "step 2"; myXML = new XML(); myXML.owner = this; myXML.onLoad = function(success){ this.owner.parseLoadedXML(success); } myXML.load("test.xml"); } function parseLoadedXML(success){ _root.field.text = ">>> " + myXML.toString() + " -- " + success; } _root.field.text = "loading"; init(); stop(); - -- Juan Delgado - Zárate http://www.zarate.tv ___ 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] Rollover states for sub-items
One other option, is NOT nesting the clips. At least not code wise. On 10/9/06, Perdue, Blake <[EMAIL PROTECTED]> wrote: Is there any other work around? I'd prefer to avoid wasting cycles checking the location of the mouse every time it's moved. I was hoping there was some sort of submenu flag or workaround that allowed this. Anyone know of it? -Original Message- From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] On Behalf Of Johan Karlsson Sent: Monday, October 09, 2006 2:29 AM To: Flashcoders mailing list Subject: SV: [Flashcoders] Rollover states for sub-items When a movieclip has a buttonevent placed on it anything inside it will not be able to get any buttonevents. What you need to do is use a mouseMove event and a hitTest to simulate a rollover/rollout event either for the nav or the subitems. E.g: Nav.onMouseMove = function() { if(this.hitTest(_root._xmouse, _root._ymouse, true) && !this.open) { this.open = true; this.gotoAndPlay('expand'); } else if(this.open) { This.open = false; this.gotoAndPlay('collapse'); } } /Johan -Ursprungligt meddelande- Från: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] För Perdue, Blake Skickat: den 9 oktober 2006 01:27 Till: Flashcoders mailing list Ämne: [Flashcoders] Rollover states for sub-items I'm building an expandable/collapsible navigation - on rollover it expands, on rollout it collapses. I've placed event handlers on the navigation container movie clip, like so: nav.onRollOver=function() {this.gotoAndPlay('expand');} nav.onRollOut=function() {this.gotoAndPlay('collapse');} Inside of the navigation movie clip (nav), I have several movie clips that have their own onRollOver and onRollOut event handlers, like so: nav.subitem.onRollOver=function() {this.gotoAndPlay('over');} nav.subitem.onRollOut=function() {this.gotoAndPlay('out');} For some reason, because the container movie clip (nav) has rollover and rollout event handlers, the event handlers for the clips inside the container do not work. In other words, the nav onrollover/out works, but the nav.subitem rollover/out doesn't work. Does anyone know why this happens or a solution to this? Thanks. Blake Perdue | 212.522.1292 | AIM: blakepCNN ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Rollover states for sub-items
Is there any other work around? I'd prefer to avoid wasting cycles checking the location of the mouse every time it's moved. I was hoping there was some sort of submenu flag or workaround that allowed this. Anyone know of it? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Johan Karlsson Sent: Monday, October 09, 2006 2:29 AM To: Flashcoders mailing list Subject: SV: [Flashcoders] Rollover states for sub-items When a movieclip has a buttonevent placed on it anything inside it will not be able to get any buttonevents. What you need to do is use a mouseMove event and a hitTest to simulate a rollover/rollout event either for the nav or the subitems. E.g: Nav.onMouseMove = function() { if(this.hitTest(_root._xmouse, _root._ymouse, true) && !this.open) { this.open = true; this.gotoAndPlay('expand'); } else if(this.open) { This.open = false; this.gotoAndPlay('collapse'); } } /Johan -Ursprungligt meddelande- Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För Perdue, Blake Skickat: den 9 oktober 2006 01:27 Till: Flashcoders mailing list Ämne: [Flashcoders] Rollover states for sub-items I'm building an expandable/collapsible navigation - on rollover it expands, on rollout it collapses. I've placed event handlers on the navigation container movie clip, like so: nav.onRollOver=function() {this.gotoAndPlay('expand');} nav.onRollOut=function() {this.gotoAndPlay('collapse');} Inside of the navigation movie clip (nav), I have several movie clips that have their own onRollOver and onRollOut event handlers, like so: nav.subitem.onRollOver=function() {this.gotoAndPlay('over');} nav.subitem.onRollOut=function() {this.gotoAndPlay('out');} For some reason, because the container movie clip (nav) has rollover and rollout event handlers, the event handlers for the clips inside the container do not work. In other words, the nav onrollover/out works, but the nav.subitem rollover/out doesn't work. Does anyone know why this happens or a solution to this? Thanks. Blake Perdue | 212.522.1292 | AIM: blakepCNN ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] book suggestions?
Does anyone know if Flash Math Creativity have a ebook version for sale? I prefer the ebook over the paper as it's cheaper for me and ships instantly :) I've bought FAA as ebook.. it's amazing indeed... too bad I didn't have time to finish reading it yet... Marcelo. On 10/9/06, Ian Thomas <[EMAIL PROTECTED]> wrote: Josh, Danny's book is, indeed, exactly what you're looking for. :-) http://www.amazon.com/Mathematics-Physics-Programmers-Game-Development/dp/1584503300 Ian On 10/9/06, Danny Kodicek <[EMAIL PROTECTED]> wrote: > > If I may self-publicise, you might try my book Mathematics and Physics for > Programmers. It's been well reviewed in this forum before, so I don't feel > *too* bad for bringing it up :) > > 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] book suggestions?
Josh, Danny's book is, indeed, exactly what you're looking for. :-) http://www.amazon.com/Mathematics-Physics-Programmers-Game-Development/dp/1584503300 Ian On 10/9/06, Danny Kodicek <[EMAIL PROTECTED]> wrote: If I may self-publicise, you might try my book Mathematics and Physics for Programmers. It's been well reviewed in this forum before, so I don't feel *too* bad for bringing it up :) 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] book suggestions?
> My focus in Flash development is more about apps than games, so I've > managed to work around the fact that don't really have the background > in math and science (yay art school) to produce realistic effects > that lend "physicality" to objects, such as realistic physics, > simulated 3d, etc. However I've been fortunate to get on some very > interesting projects lately which are not games, but do require these > sorts of things to render their interfaces. > > I'm wondering if anyone can recommend a book or two which covers > things like vector math, matrices, 2d and 3d geometry, the equations > behind common physical effects, etc. What do you guys use as a > reference on these kinds of topics? If I may self-publicise, you might try my book Mathematics and Physics for Programmers. It's been well reviewed in this forum before, so I don't feel *too* bad for bringing it up :) 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