PDA

View Full Version : DIVs in Flash


BlueInkAlchemist
11-26-2008, 03:53 PM
Just a brief, conjectural question...

If I have an HTML file containing text separated by DIV tags, can I use those tags within Flash the way JavaScript would use them? In other words, can I display/hide or load/unload specific sections of an HTML source using ActionScript?

Thanks in advance.

CyanBlue
11-26-2008, 04:18 PM
I'd say you'll need to come up with your own function to achieve that... Flash simply have no idea what the DIV means...

BlueInkAlchemist
11-27-2008, 01:58 PM
So is it possible for us to "teach" Flash to parse for DIVs? ;)

Basically what I want to do is use Flash to display formatted text stored in external files and loaded on demand. I've been told that this might be possible with a php script, but unfortunately my domain is hosted with Microsoft Office Live, which of course is gestapo-like in its demands that pages be coded in ASP. I can still display Flash movies using ASP, giving me more flexibility, but I'd really like to get this to work...

CyanBlue
11-28-2008, 02:33 AM
This should have nothing to do with the ASP or PHP since you want to render the DIV inside the Flash movie which Flash does not support... That's why I said that you have to come up with a routine that reads all the DIVs and lays them out properly...

BlueInkAlchemist
11-28-2008, 05:39 PM
Would it look something like this?


String cont; //Or whatever the name of your content variable is

temp=cont.split("<div>");
temp2=temp[1].split("</div>");
cont=temp2[0];

CyanBlue
11-28-2008, 10:12 PM
Well... That's a start of parsing the DIV data, but it is another story to make it render the way you want it or the way it is supposed to work in HTML page...

BlueInkAlchemist
12-01-2008, 03:14 PM
Well... That's a start of parsing the DIV data, but it is another story to make it render the way you want it or the way it is supposed to work in HTML page...

Indeed. Mostly what I'd want to do there is preserve text formatting, such as boldface and italicized and the like. I'm not looking to replicate functional tables or (eewwww) frames. I mean, I'm using Flash for my layout and navigation, what do I need those for? :p