RE: [Flashcoders] Flash CS4 very slow
Hmm. I don't know what you guys are talking about. I am also using a 2.2 ghz duo core laptop, and it's been plenty fast for me. Perhaps it helps that I have 4 GB of ram? Not sure. But I really enjoy the upgrade--things feel a lot more efficient and consistent. Thanks, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com www.cramcrew.com One Student At A Time -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Glen Pike Sent: Wednesday, June 10, 2009 3:16 AM To: Flash Coders List Subject: Re: [Flashcoders] Flash CS4 very slow Guess the great Adobe resource hogging feature has been added, just like with PhotoShop. Anthony Pace wrote: CS4 is totally slow and on a 2.2 ghz duo core laptop; yet, mx was lightening fast on a 633 mhz system. What the hell happened to all the great coders at Macromedia? did they get lost in the acquisition? Alan Neilsen wrote: Does Flash CS4 run very slowly for everyone, or might there be something wrong with my installation? Just about anything I do takes ages to happen. For instance, if I open Properties to type in an Instance Name, when I click somewhere else after that it takes 4 or 5 seconds before I can do anything - it just locks up for those seconds. 4 or 5 seconds does not sound much, but when it happens again and again and again day after day it really slows my work down. Alan Neilsen This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or; lost by any mistransmission. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not directly or indirectly, use, disclose, distribute, print or copy any part of this message if you are not the intended recipient. GOULBURN OVENS INSTITUTE OF TAFE and any of its subsidiaries each reserve the right to monitor all e-mail communications through its networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of any such entity. # This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal # ___ 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 The information transmitted is intended only for the person or entity to which it is addressed and may contain proprietary, business-confidential and/or privileged material. If you are not the intended recipient of this message you are hereby notified that any use, review, retransmission, dissemination, distribution, reproduction or any action taken in reliance upon this message is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of the company. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] How do I flow text from an XML/XHTML file into twocolumns?
Here is a sample of the XHTML from inside the copy div: div id=copy div id=body pDeepak Thadhani is the founder and President of Cram Crew. He has extensive experience and a real passion for education-based businesses. Deepak completed his undergraduate degrees in Mathematics and Biology, with a minor in Chemistry at the University of Houston. He did follow-up work at Ben Taub Hospital and while there, completed the MCAT with the intentions of a career in medicine. He decided that medicine was not his real passion and returned to the University of Houston. He received his MBA in Marketing along with a certificate of entrepreneurship at the Center for Entrepreneurship in the Bauer School of Business. This broad educational background turned out to be the perfect combination for an education-based business.br /br /Deepak began more than 14 years ago under the name 'Academic Solutions Group.' He changed the name to Cram Crew in 2005 to better align the brand with his market.br /br /Prior to Cram Crew, Deepak marked success by creating other service-based businesses. He has always harbored a love for tutoring, having provided academic services in the midst of his own educational experience and business ventures.br /br /With his extensive educational experience, Deepak possesses a unique combination of educational exposure, teaching acumen, and a genuine interest in the achievement of every student. Together these three elements not only give an edge over the competition but also provide the solid foundation on which Cram Crew is built. By combining professionalism and vision with a focus on trusted relationships with customers and partners, he has achieved success in building and growing Cram Crew, Inc./p /div /div Basically, all I want is this (which sounds simpler than it is, I suppose!): Two columns of text with basic HTML formatting (as discussed earlier, which I mostly figured out), from an SEO-friendly XHTML file. I wouldn't mind manually setting up separate span tags, but when I played with that method I was even more confused. I guess what really confused me was this portion that I borrowed from the code you showed as an example: var label:TextLabel = new TextLabel(); label.htmlText = xml.toString(); columns.addChild(label); } columns.y = 95; The first thing that confuses me with that method is that TextLabel doesn't seem to be supported. Is that your own function? That might be why. The second thing that confused me is what columns must refer to. Is that the instance name of the MC, or would the instance name have to be label? I was researching on google what the structure of x.addChild(x) means, and I get the second part, but the first part, where columns goes, is throwing me through a loop. In any case, you don't have to waste your time teaching me AS if this is more complicated than necessary; again, all I want is two columns fed from the XHTML file with some basic HTML properties. Whatever method you think would be easiest/best, I'm all ears. Thanks! Best, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com www.cramcrew.com One Student At A Time -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Steven Sacks Sent: Tuesday, May 26, 2009 6:17 PM To: Flash Coders List Subject: Re: [Flashcoders] How do I flow text from an XML/XHTML file into twocolumns? Could you show some sample of the XHTML you are reading in? Specifically, what does body.p trace out? On May 26, 2009, at 4:00 PM, Jonathan Wing wrote: Using Gaia, I am trying to load content within flash from an XHTML file, and have the text flow from a p into two columns. This is what I have so far (AS3): In the .fla file, I have two columns set as dynamic text, with the instance names column1 and column2, respectively. In the corresponding .as file, here is my code, including only the relevant portions: package pages { import flash.display.*; import flash.events.*; import flash.text.*; import flash.external.*; import flash.xml.*; public class AboutPage extends AbstractPage { public var column1:TextField; public var column2:TextField; public function AboutPage() { super(); alpha = 0; } override public function transitionIn():void { super.transitionIn(); var value:XML = XMLList(copy.innerHTML)[0]; var body:XML = value.div.(@id == body)[0]; var i:int = 1; column1.htmlText = body.p; addChild(column1); if (body.length() 13) { column2.htmlText = column1
RE: [Flashcoders] How do I flow text from an XML/XHTML file into twocolumns?
Oh, sorry, and body.p traces out: pDeepak Thadhani is the founder and President of Cram Crew. He has extensive experience and a real passion for education-based businesses. Deepak completed his undergraduate degrees in Mathematics and Biology, with a minor in Chemistry at the University of Houston. He did follow-up work at Ben Taub Hospital and while there, completed the MCAT with the intentions of a career in medicine. He decided that medicine was not his real passion and returned to the University of Houston. He received his MBA in Marketing along with a certificate of entrepreneurship at the Center for Entrepreneurship in the Bauer School of Business. This broad educational background turned out to be the perfect combination for an education-based business.br/br/Deepak began more than 14 years ago under the name 'Academic Solutions Group.' He changed the name to Cram Crew in 2005 to better align the brand with his market.br/br/Prior to Cram Crew, Deepak marked success by creating other service-based businesses. He has always harbored a love for tutoring, having provided academic services in the midst of his own educational experience and business ventures.br/br/With his extensive educational experience, Deepak possesses a unique combination of educational exposure, teaching acumen, and a genuine interest in the achievement of every student. Together these three elements not only give an edge over the competition but also provide the solid foundation on which Cram Crew is built. By combining professionalism and vision with a focus on trusted relationships with customers and partners, he has achieved success in building and growing Cram Crew, Inc./p Just as it is in the XHTML file... Thanks, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com www.cramcrew.com One Student At A Time -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Steven Sacks Sent: Tuesday, May 26, 2009 6:17 PM To: Flash Coders List Subject: Re: [Flashcoders] How do I flow text from an XML/XHTML file into twocolumns? Could you show some sample of the XHTML you are reading in? Specifically, what does body.p trace out? On May 26, 2009, at 4:00 PM, Jonathan Wing wrote: Using Gaia, I am trying to load content within flash from an XHTML file, and have the text flow from a p into two columns. This is what I have so far (AS3): In the .fla file, I have two columns set as dynamic text, with the instance names column1 and column2, respectively. In the corresponding .as file, here is my code, including only the relevant portions: package pages { import flash.display.*; import flash.events.*; import flash.text.*; import flash.external.*; import flash.xml.*; public class AboutPage extends AbstractPage { public var column1:TextField; public var column2:TextField; public function AboutPage() { super(); alpha = 0; } override public function transitionIn():void { super.transitionIn(); var value:XML = XMLList(copy.innerHTML)[0]; var body:XML = value.div.(@id == body)[0]; var i:int = 1; column1.htmlText = body.p; addChild(column1); if (body.length() 13) { column2.htmlText = column1.htmlText; for(i=0; icolumn1.bottomScrollV; i++) { column2.htmlText += br /; } column2.scrollV = column1.bottomScrollV + 1; addChild(column2); } TweenLite.to(this, 0.1, {alpha:1, onComplete:transitionInComplete}); } So far, the text is indeed loading fine into column1, but then that's it. The remainder of the content disappears, and does not load into column2. I took some of Steven's suggestions and looked around Google, but I still cannot get it to work. Does anyone else have any advice? Thanks, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com mailto:jw...@cramcrew.com www.cramcrew.com http://www.cramcrew.com/ One Student At A Time The information transmitted is intended only for the person or entity to which it is addressed and may contain proprietary, business-confidential and/or privileged material. If you are not the intended recipient of this message you are hereby notified
RE: [Flashcoders] How do I flow text from an XML/XHTML file into twocolumns?
By the way, if anyone is curious, there is a half-solution here: http://danielmclaren.net/2008/03/multi-column-layouts-in-flash-and-flex It works for me, but only with .text, not .htmlText, which I definitely need. The developer of this method says he still can't figure out how to get it to work with html. Perhaps someone out there might have a clue? Thanks, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com www.cramcrew.com One Student At A Time -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Steven Sacks Sent: Tuesday, May 26, 2009 6:17 PM To: Flash Coders List Subject: Re: [Flashcoders] How do I flow text from an XML/XHTML file into twocolumns? Could you show some sample of the XHTML you are reading in? Specifically, what does body.p trace out? On May 26, 2009, at 4:00 PM, Jonathan Wing wrote: Using Gaia, I am trying to load content within flash from an XHTML file, and have the text flow from a p into two columns. This is what I have so far (AS3): In the .fla file, I have two columns set as dynamic text, with the instance names column1 and column2, respectively. In the corresponding .as file, here is my code, including only the relevant portions: package pages { import flash.display.*; import flash.events.*; import flash.text.*; import flash.external.*; import flash.xml.*; public class AboutPage extends AbstractPage { public var column1:TextField; public var column2:TextField; public function AboutPage() { super(); alpha = 0; } override public function transitionIn():void { super.transitionIn(); var value:XML = XMLList(copy.innerHTML)[0]; var body:XML = value.div.(@id == body)[0]; var i:int = 1; column1.htmlText = body.p; addChild(column1); if (body.length() 13) { column2.htmlText = column1.htmlText; for(i=0; icolumn1.bottomScrollV; i++) { column2.htmlText += br /; } column2.scrollV = column1.bottomScrollV + 1; addChild(column2); } TweenLite.to(this, 0.1, {alpha:1, onComplete:transitionInComplete}); } So far, the text is indeed loading fine into column1, but then that's it. The remainder of the content disappears, and does not load into column2. I took some of Steven's suggestions and looked around Google, but I still cannot get it to work. Does anyone else have any advice? Thanks, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com mailto:jw...@cramcrew.com www.cramcrew.com http://www.cramcrew.com/ One Student At A Time The information transmitted is intended only for the person or entity to which it is addressed and may contain proprietary, business-confidential and/or privileged material. If you are not the intended recipient of this message you are hereby notified that any use, review, retransmission, dissemination, distribution, reproduction or any action taken in reliance upon this message is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of the company. ___ 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 The information transmitted is intended only for the person or entity to which it is addressed and may contain proprietary, business-confidential and/or privileged material. If you are not the intended recipient of this message you are hereby notified that any use, review, retransmission, dissemination, distribution, reproduction or any action taken in reliance upon this message is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Any views
[Flashcoders] How do I flow text from an XML/XHTML file into two columns?
Using Gaia, I am trying to load content within flash from an XHTML file, and have the text flow from a p into two columns. This is what I have so far (AS3): In the .fla file, I have two columns set as dynamic text, with the instance names column1 and column2, respectively. In the corresponding .as file, here is my code, including only the relevant portions: package pages { import flash.display.*; import flash.events.*; import flash.text.*; import flash.external.*; import flash.xml.*; public class AboutPage extends AbstractPage { public var column1:TextField; public var column2:TextField; public function AboutPage() { super(); alpha = 0; } override public function transitionIn():void { super.transitionIn(); var value:XML = XMLList(copy.innerHTML)[0]; var body:XML = value.div.(@id == body)[0]; var i:int = 1; column1.htmlText = body.p; addChild(column1); if (body.length() 13) { column2.htmlText = column1.htmlText; for(i=0; icolumn1.bottomScrollV; i++) { column2.htmlText += br /; } column2.scrollV = column1.bottomScrollV + 1; addChild(column2); } TweenLite.to(this, 0.1, {alpha:1, onComplete:transitionInComplete}); } So far, the text is indeed loading fine into column1, but then that's it. The remainder of the content disappears, and does not load into column2. I took some of Steven's suggestions and looked around Google, but I still cannot get it to work. Does anyone else have any advice? Thanks, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com mailto:jw...@cramcrew.com www.cramcrew.com http://www.cramcrew.com/ One Student At A Time The information transmitted is intended only for the person or entity to which it is addressed and may contain proprietary, business-confidential and/or privileged material. If you are not the intended recipient of this message you are hereby notified that any use, review, retransmission, dissemination, distribution, reproduction or any action taken in reliance upon this message is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of the company. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Parsing HTML tags within flash from an XHTML file?
Well, I have actually searched over and over and I have read and re-read Steven's article as well, but I can't seem to get it just right. I think the problem is, Steven's article is written to an audience of more experienced AS coders (at least it seems so), and I'm pretty new to AS, so I don't get the context. The article does not state exactly *where* to put such code in my files, just that I need to do it. So I took some guesses and tried multiple ways, yet still to no avail. Yet I didn't want to bother him, as I've already asked him so many noob questions! Mostly what I'm concerned about are parsing the h1 and a tags. Do you have any suggestions as to how and where I can implement Steven's points in his article? Thanks, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com www.cramcrew.com One Student At A Time -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Glen Pike Sent: Thursday, May 21, 2009 3:21 AM To: Flash Coders List Subject: Re: [Flashcoders] Parsing HTML tags within flash from an XHTML file? Hi, This article written by Steven looks just like what you are looking for... http://www.stevensacks.net/2008/07/02/parsing-xhtml-with-e4x-in-as3/ To keep your formatting, you can use css - the TextField in Flash supports a subset of css that allows you to apply bold, colours and link formatting... Not sure if you are searching for EX4 or E4X! HTH Glen Jonathan Wing wrote: Hi, I'm new to this group, so forgive me if I'm going about asking this the wrong way. Is there a practical way to search old questions? Anyway, I'm using the Gaia Framework and I'm trying to parse basic tags such as h1 and a in flash via an XHTML file. Steven over at the Gaia forum suggests I make use of EX4, but I've spent two days searching google and reading up on it and I'm honestly confused where to start. To show you what I mean, view the source on this page Steven created: http://stevensacks.net/clients/hello/press.html#/agency/press Note how those columns are set using HTML tags, and pulled into flash from that XHTML file. How do I maintain the formatting such as bold and also the links, just the way he has done (strictly in terms of functionality)? Thank you! Thanks, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com mailto:jw...@cramcrew.com www.cramcrew.com http://www.cramcrew.com/ One Student At A Time The information transmitted is intended only for the person or entity to which it is addressed and may contain proprietary, business-confidential and/or privileged material. If you are not the intended recipient of this message you are hereby notified that any use, review, retransmission, dissemination, distribution, reproduction or any action taken in reliance upon this message is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of the company. ___ 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 The information transmitted is intended only for the person or entity to which it is addressed and may contain proprietary, business-confidential and/or privileged material. If you are not the intended recipient of this message you are hereby notified that any use, review, retransmission, dissemination, distribution, reproduction or any action taken in reliance upon this message is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of the company. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Parsing HTML tags within flash from an XHTML file?
Well, I think I know how to import XML. var loader:URLLoader = new URLLoader(); loader.addEventListener(Event.COMPLETE, getXML); loader.load(new URLRequest(http://xmlfeedURL;)); function getXML(event:Event):void { var xmlData:XML = new XML(event.target.data); trace(xmlData); } At least, that is the code I picked up while doing research, though I'm not entirely sure how to use any of that to apply to what I'm doing in the Gaia Framework. This is what I have now, minus the irrelevant code: package pages { import flash.xml.*; import flash.text.TextField; XML.ignoreWhitespace = false; XML.prettyPrinting = false; public class HomePage extends AbstractPage { public var dynamic_text:TextField; override public function transitionIn():void { super.transitionIn(); TweenLite.to(this, 0.3, {alpha:1, onComplete:transitionInComplete}); dynamic_text.text = this.copy.intro; } [there's a lot more code, but I'm only focusing on the relevant parts from the XHTML page] } } So what it does is pull info from this content in my XHTML page: div id=copy p id=introLorem ipsum/p /div And places that Lorem ipsum in my corresponding MC with an instance name of dynamic_text. But then, if I want to do something like: div id=copy p id=introh1Lorem ipsum/h1 a href=page.swfClick here/a to learn more. /p/div It will not parse the HTML tags; it will treat them like a regular string of text, even though my text box has render text as HTML selected. Now, Steven's suggestions in his article seem helpful, but since I am pretty new to this sort of code, I am still unsure as to where things should go, and how to make it work for h1 and a tags. I'm not planning to use many other tags, as I am trying to keep things simple. Thanks, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com www.cramcrew.com One Student At A Time -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Merrill, Jason Sent: Thursday, May 21, 2009 10:13 AM To: Flash Coders List Subject: RE: [Flashcoders] Parsing HTML tags within flash from an XHTML file? If it's truly XHTML, you can in theory parse it as XML - but if it's not, meaning they mixed case and didn't close tags, then you're out of luck. First things first, do you know how to load in XML? Jason Merrill Bank of America Global Learning Shared Services Solutions Development Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Jonathan Wing Sent: Thursday, May 21, 2009 11:08 AM To: Flash Coders List Subject: RE: [Flashcoders] Parsing HTML tags within flash from an XHTML file? Well, I have actually searched over and over and I have read and re-read Steven's article as well, but I can't seem to get it just right. I think the problem is, Steven's article is written to an audience of more experienced AS coders (at least it seems so), and I'm pretty new to AS, so I don't get the context. The article does not state exactly *where* to put such code in my files, just that I need to do it. So I took some guesses and tried multiple ways, yet still to no avail. Yet I didn't want to bother him, as I've already asked him so many noob questions! Mostly what I'm concerned about are parsing the h1 and a tags. Do you have any suggestions as to how and where I can implement Steven's points in his article? Thanks, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com www.cramcrew.com One Student At A Time -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Glen Pike Sent: Thursday, May 21, 2009 3:21 AM To: Flash Coders List Subject: Re: [Flashcoders] Parsing HTML tags within flash from an XHTML file? Hi, This article written by Steven looks just like what you are looking for... http://www.stevensacks.net/2008/07/02/parsing-xhtml-with-e4x-in-as3/ To keep your formatting, you can use css - the TextField in Flash supports a subset of css that allows you to apply bold, colours and link formatting... Not sure if you are searching for EX4 or E4X! HTH Glen Jonathan Wing wrote: Hi, I'm new to this group, so forgive me if I'm going about asking this the wrong way. Is there a practical way to search old questions? Anyway, I'm using the Gaia
RE: [Flashcoders] Parsing HTML tags within flash from an XHTML file?
Jason, The funny thing is, Steven said that my question was a bit off-topic for the Gaia forum, and recommended I try this place. ;) I know it's possible as I've seen it done, for example, on Steven's page here: http://stevensacks.net/clients/hello/press.html#/agency/press (if you look at the code, it's pretty straightforward HTML tags, without CDATA around them) And also: http://flashden.net/item/elite-html-content-page-with-scroller/full_scre en_preview/27908 (but that is using AS2, and I'm coding the site in AS3). If I may explain, basically all I'm trying to do is create SEO-friendly XHTML pages on which the written content for each page is stored and that is where I will pull the content from. On occasion, I will need to provide links to other pages. If anyone knows of a better way of doing this, I'm all ears! Thanks, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com www.cramcrew.com One Student At A Time -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Merrill, Jason Sent: Thursday, May 21, 2009 12:29 PM To: Flash Coders List Subject: RE: [Flashcoders] Parsing HTML tags within flash from an XHTML file? Well, part of your question is a Gaia framework question which is off-topic for this forum. I don't know much about that framework other than it's purpose and creator. As for your question about the tags parsing: It will not parse the HTML tags; it will treat them like a regular string of text, even though my text box has render text as HTML selected. Two issues: 1) Flash only has a limited set of tags it supports in HTML for text. Tags like div and h1 I don't believe are one of them. You could read the XHTML in as a string (not XML right away) and use a Regular Expression to remove those tags from the text and insert something else if you like, however: 2) The entire XHTML should be treated as XML, so that means tags like p will be treated as an XML node, not a new HTML text paragraph. So you may have to use some Regular Expressions to at least add a ![CDATA[ before and ]] to wrap around the text you want to read in the HTML so it escapes the characters. THEN convert the string to XML once it's clean. In short, what you're asking to do is pretty challenging. Flash isn't really set up to read and render HTML pages. It's mean to take the place of them. :) Jason Merrill Bank of America Global Learning Shared Services Solutions Development Monthly meetings on the Adobe Flash platform for rich media experiences - join the Bank of America Flash Platform Community -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Jonathan Wing Sent: Thursday, May 21, 2009 1:14 PM To: Flash Coders List Subject: RE: [Flashcoders] Parsing HTML tags within flash from an XHTML file? Well, I think I know how to import XML. var loader:URLLoader = new URLLoader(); loader.addEventListener(Event.COMPLETE, getXML); loader.load(new URLRequest(http://xmlfeedURL;)); function getXML(event:Event):void { var xmlData:XML = new XML(event.target.data); trace(xmlData); } At least, that is the code I picked up while doing research, though I'm not entirely sure how to use any of that to apply to what I'm doing in the Gaia Framework. This is what I have now, minus the irrelevant code: package pages { import flash.xml.*; import flash.text.TextField; XML.ignoreWhitespace = false; XML.prettyPrinting = false; public class HomePage extends AbstractPage { public var dynamic_text:TextField; override public function transitionIn():void { super.transitionIn(); TweenLite.to(this, 0.3, {alpha:1, onComplete:transitionInComplete}); dynamic_text.text = this.copy.intro; } [there's a lot more code, but I'm only focusing on the relevant parts from the XHTML page] } } So what it does is pull info from this content in my XHTML page: div id=copy p id=introLorem ipsum/p /div And places that Lorem ipsum in my corresponding MC with an instance name of dynamic_text. But then, if I want to do something like: div id=copy p id=introh1Lorem ipsum/h1 a href=page.swfClick here/a to learn more. /p/div It will not parse the HTML tags; it will treat them like a regular string of text, even though my text box has render text as HTML selected. Now, Steven's suggestions in his article seem helpful, but since I am pretty new to this sort of code, I am still unsure as to where things should go, and how to make it work for h1 and a tags. I'm not planning to use many other tags
RE: [Flashcoders] Parsing HTML tags within flash from an XHTML file?
Thanks Steven! That clears a few things up, and like you suggest, I will experiment with it until I get it just right. The only reason I've been so anxious is that I'm working on a deadline; so, for the time being, may I simply ask you this? What is the best (and most SEO-friendly) way of presenting links within the copy content? Should I be doing this within the XHTML using a tags to other swf files, or is there a better method? I guess that is the only thing I'm getting hung up on, as my pages will occasionally have links within the body paragraphs. Okay, so I figured out one thing that helps, which is to set my text fields to htmlText (it was only text before). That helps a lot, and it appears that the links are showing up and they function--sorta. They actually want to open a new page, even if a swf, and even if the target is set to _self. Really, all I want to do (on my deadline) is have links from one swf to another in the website, but have it all be SEO-friendly. Should be pretty simple, right? I bet I'm making it more complicated for myself than it probably needs to be. ;) My I present my own guess, and you could tell me if I'm wrong? I'm guessing it has something to do with the following, which I found in the Gaia demo site (I'm pasting only what I assume is the relevant code): public var textContent:TextField; var myStyleSheet = new StyleSheet as StyleSheet; var myURL:String; var mySection:XMLList; myURL = Gaia.api.getCurrentBranch(); myStyleSheet = IStyleSheet(Gaia.api.getPage(index).assets.xmlCss).style; textContent.styleSheet = myStyleSheet for each ( var u:XML in mySection) { if (myURL == u...@url) { textContent.htmlText = u.copy; } Could I use this in tandem with my Gaia-produced XHTML pages? I do not see where the actual copy node is included in the instance from the demo site's XML, but only the url part. How is the rest of the text being included? Sorry to be impatient! I just did not expect this specific aspect of development to feel like starting from scratch! Thanks, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com www.cramcrew.com One Student At A Time -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Steven Sacks Sent: Thursday, May 21, 2009 1:43 PM To: Flash Coders List Subject: Re: [Flashcoders] Parsing HTML tags within flash from an XHTML file? http://www.gaiaflashframework.com/index.php/topic,1847.msg7817.html#msg7 817 Just so everyone is familiar with the context here, the above is the thread on the forum about this. The question is about how to use E4X to parse XHTML. I provide a code example of how easy it is to do this, but Jonathan's question is more of a general one about how to use E4X to parse nodes. Flash doesn't support div in its htmlText, so that's why you use E4X to grab the node content like var value:XML = XMLList(copy.innerHTML)[0]; var body:XML = value.div.(@id == body)[0]; I believe the challenge for Jonathan is what the above lines of code mean and how they work. value is the XHTML. value.div returns an XMLList of all div nodes on the first level within the XHTML. value.div.(@id == body) means give me an XMLList of the div nodes that have an attribute id=body. valid.div.(@id == body)[0] means give me the first XML node in that XMLList. This is how E4X works. A lesson on E4X is out of scope of my forum. However, there are lots of resources out there for E4X in AS3. I highly recommend Colin Moock's Essential Actionscript 3.0 book, which is how I learned it. That and the internet. And Jason, you do not need to complicate things with RegEx. E4X does enough. XHTML is technically XML and can be parsed the same using E4X. Also, while Flash doesn't SEEM to support newer HTML tags like strong and em for b and i, it actually DOES if you write css to do it. strong { font-family: FFScala-Bold; display: inline; } em { font-family: FFScala-Italic; display: inline; } In this case, I am using a bold and italic font to show them, and by defining the node types in css (and setting them to display: inline), it works like a champ! Here's a detailed code sample: http://www.gaiaflashframework.com/wiki/index.php?title=Runtime_Font_Load ing#StyleSheet_Example Now, I can keep my valid XHTML and use it directly in Flash. It's really straightforward. The challenge is learning how to parse the nodes using E4X, which, once you get your head around it (and it took me a lot of experimenting to learn how awesome and powerful E4X is and how to leverage it), you can do stuff like this easily. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com
[Flashcoders] Problem with footer fixed to bottom of page
This is probably a silly question, but I've searched google and can't seem to find the right answer, which is strange as this is seems to be a common thing on pages. Basically, I have a footer that is fixed to the bottom of a page and for the width of a page, so that no matter what size a user sets a window for, it will always fix to the bottom. This is what I have so far (using AS3): In my .fla, I have a long gray bar with the instance name footer. Then, over in my .as file, I have the following: import flash.display.*; footer.y = stage.stageHeight - footer.height; stage.addEventListener(Event.RESIZE, resizeHandler); public function resizeHandler(e:Event):void { footer.y = stage.stageHeight - footer.height; footer.width = stage.stageWidth; } All of this works without a hitch. However, my problem arises when I want to add text. If I add text in its own mc, then it won't adjust with the page. If I add text inside the footer mc, it will stretch with the width of the page when I resize. So then I thought maybe I could make them two mc's embedded in one main mc, and only define the width for the bar. That is, something like: footer.y = stage.stageHeight - footer.height; footer_bar.width = stage.stageWidth; With footer as the main mc, and footer_bar as the long gray bar embedded inside. However, this results in a mess of errors. Any ideas? This seems so common, I'm surprised I can't find anything via Google. Thanks, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com mailto:jw...@cramcrew.com www.cramcrew.com http://www.cramcrew.com/ One Student At A Time The information transmitted is intended only for the person or entity to which it is addressed and may contain proprietary, business-confidential and/or privileged material. If you are not the intended recipient of this message you are hereby notified that any use, review, retransmission, dissemination, distribution, reproduction or any action taken in reliance upon this message is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of the company. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Problem with footer fixed to bottom of page
Thanks Pinatti! That was the problem exactly--nesting not properly defined. Works great now. Thanks, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com www.cramcrew.com One Student At A Time -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Fabio Pinatti Sent: Thursday, May 21, 2009 2:53 PM To: Flash Coders List Subject: Re: [Flashcoders] Problem with footer fixed to bottom of page I suppose it should be: footer.y = stage.stageHeight - footer.height; footer[footer_bar].width = stage.stageWidth; since footer_bar is nested into footer. Kind Regards, Pinatti On Thu, May 21, 2009 at 4:41 PM, Jonathan Wing jw...@cramcrew.com wrote: This is probably a silly question, but I've searched google and can't seem to find the right answer, which is strange as this is seems to be a common thing on pages. Basically, I have a footer that is fixed to the bottom of a page and for the width of a page, so that no matter what size a user sets a window for, it will always fix to the bottom. This is what I have so far (using AS3): In my .fla, I have a long gray bar with the instance name footer. Then, over in my .as file, I have the following: import flash.display.*; footer.y = stage.stageHeight - footer.height; stage.addEventListener(Event.RESIZE, resizeHandler); public function resizeHandler(e:Event):void { footer.y = stage.stageHeight - footer.height; footer.width = stage.stageWidth; } All of this works without a hitch. However, my problem arises when I want to add text. If I add text in its own mc, then it won't adjust with the page. If I add text inside the footer mc, it will stretch with the width of the page when I resize. So then I thought maybe I could make them two mc's embedded in one main mc, and only define the width for the bar. That is, something like: footer.y = stage.stageHeight - footer.height; footer_bar.width = stage.stageWidth; With footer as the main mc, and footer_bar as the long gray bar embedded inside. However, this results in a mess of errors. Any ideas? This seems so common, I'm surprised I can't find anything via Google. Thanks, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com mailto:jw...@cramcrew.com www.cramcrew.com http://www.cramcrew.com/ One Student At A Time The information transmitted is intended only for the person or entity to which it is addressed and may contain proprietary, business-confidential and/or privileged material. If you are not the intended recipient of this message you are hereby notified that any use, review, retransmission, dissemination, distribution, reproduction or any action taken in reliance upon this message is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of the company. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- Fabio Pinatti :: web.developer www.pinatti.com.br :: 19. 9184.3745 / 3342.1130 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders The information transmitted is intended only for the person or entity to which it is addressed and may contain proprietary, business-confidential and/or privileged material. If you are not the intended recipient of this message you are hereby notified that any use, review, retransmission, dissemination, distribution, reproduction or any action taken in reliance upon this message is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of the company. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Parsing HTML tags within flash from an XHTML file?
Steven, It does make sense for the most part, except that I'm not sure if I'm placing it in the right place. I have it in my HomePage.as file (just using this page as an example, as I assumed that was what you might have meant when you said parsing code), and I guess I need to define a or put it in the right place? Because right now, it gives me an error #1120: Access of undefined property a. This is how I put it in my code (minus some of the extra stuff): public class HomePage extends AbstractPage { public var dynamic_text:TextField; public function HomePage() { super(); alpha = 0; } override public function transitionIn():void { super.transitionIn(); TweenLite.to(this, 0.3, {alpha:1, onComplete:transitionInComplete}); var href:String = a...@href; href = href.substr(0, href.length - 4); var internalTitle:String = href.toUpperCase(); Gaia.api.goto(Pages[internalTitle]); dynamic_text.htmlText = this.copy.intro; } } Sorry to paste it directly into my code like that; it's just that I can only guess where it might go... Thanks, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com www.cramcrew.com One Student At A Time -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Steven Sacks Sent: Thursday, May 21, 2009 2:57 PM To: Flash Coders List Subject: Re: [Flashcoders] Parsing HTML tags within flash from an XHTML file? Do you mean you want to have links in your a tags that call Gaia.api.goto()? You can do that, but obviously, those links wouldn't work in the XHTML. After thinking about it a bit, I think what might work is this a href=contact.htmlGo to contact page/a With that being the link to the SEO XHTML page that is generated for that page. In your parsing code, you would change the href to call an actionscript method that would take page.html and convert it to var href:String = a...@href; href = href.substr(0, href.length - 4); var internalTitle:String = href.toUpperCase(); Gaia.api.goto(Pages[internalTitle]); That is just an example, but basically you're converting contact.html to CONTACT and, there should be a public static const in Pages called CONTACT which has the branch for that title. Does this make sense? (this part of the question is definitely appropriate for the Gaia forum, too) On May 21, 2009, at 12:29 PM, Jonathan Wing wrote: Thanks Steven! That clears a few things up, and like you suggest, I will experiment with it until I get it just right. The only reason I've been so anxious is that I'm working on a deadline; so, for the time being, may I simply ask you this? What is the best (and most SEO-friendly) way of presenting links within the copy content? Should I be doing this within the XHTML using a tags to other swf files, or is there a better method? I guess that is the only thing I'm getting hung up on, as my pages will occasionally have links within the body paragraphs. Okay, so I figured out one thing that helps, which is to set my text fields to htmlText (it was only text before). That helps a lot, and it appears that the links are showing up and they function--sorta. They actually want to open a new page, even if a swf, and even if the target is set to _self. Really, all I want to do (on my deadline) is have links from one swf to another in the website, but have it all be SEO-friendly. Should be pretty simple, right? I bet I'm making it more complicated for myself than it probably needs to be. ;) My I present my own guess, and you could tell me if I'm wrong? I'm guessing it has something to do with the following, which I found in the Gaia demo site (I'm pasting only what I assume is the relevant code): public var textContent:TextField; var myStyleSheet = new StyleSheet as StyleSheet; var myURL:String; var mySection:XMLList; myURL = Gaia.api.getCurrentBranch(); myStyleSheet = IStyleSheet(Gaia.api.getPage(index).assets.xmlCss).style; textContent.styleSheet = myStyleSheet for each ( var u:XML in mySection) { if (myURL == u...@url) { textContent.htmlText = u.copy; } Could I use this in tandem with my Gaia-produced XHTML pages? I do not see where the actual copy node is included in the instance from the demo site's XML, but only the url part. How is the rest of the text being included? Sorry to be impatient! I just
[Flashcoders] Parsing HTML tags within flash from an XHTML file?
Hi, I'm new to this group, so forgive me if I'm going about asking this the wrong way. Is there a practical way to search old questions? Anyway, I'm using the Gaia Framework and I'm trying to parse basic tags such as h1 and a in flash via an XHTML file. Steven over at the Gaia forum suggests I make use of EX4, but I've spent two days searching google and reading up on it and I'm honestly confused where to start. To show you what I mean, view the source on this page Steven created: http://stevensacks.net/clients/hello/press.html#/agency/press Note how those columns are set using HTML tags, and pulled into flash from that XHTML file. How do I maintain the formatting such as bold and also the links, just the way he has done (strictly in terms of functionality)? Thank you! Thanks, Jonathan Wing Graphic Designer Cram Crew, Inc. mobile: (713) 298-2738 office: (713) 464-CRAM (2726) email: jw...@cramcrew.com mailto:jw...@cramcrew.com www.cramcrew.com http://www.cramcrew.com/ One Student At A Time The information transmitted is intended only for the person or entity to which it is addressed and may contain proprietary, business-confidential and/or privileged material. If you are not the intended recipient of this message you are hereby notified that any use, review, retransmission, dissemination, distribution, reproduction or any action taken in reliance upon this message is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Any views expressed in this message are those of the individual sender and may not necessarily reflect the views of the company. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders