Loading HTML in flash

Edit: I have a new new problem: the entirety of the page loads, but not all of it is in the dynamic text box. If I trace the results of the onData, the whole page shows up in the outbox window, but scrolling all the way down (using the attached UIScrollBar component that comes with Flash) only takes me maybe a quarter of the way through. Any ideas?

You can’t load HTML or BODY tags into a textfield, only formatting tags like B, I or hyperlinks… you know, really simple tags.

Yeah, I realize that. I don’t care if it ignores them, I just want it to display what it can display.

If you simply want to duplicate an existing HTML page in Flash, one of the quickest ways is to copy the HTML page (right-click, select all, right-click copy) then paste it into a Word document (Edit, Paste). Then copy it from Word (Edit, Select All, Edit, Copy) and paste it into a blank Flash document (right-click, paste).

All of the text and images should copy across with the bonus that all of the text will appear in static text fields which you can then edit and play around with so that it replicates the original website. It’s certainly easier than trying to replicate the look of the site in Flash first and then trying to import the text to fit.

I appreciate the idea, but that won’t really work for our purposes. First, we need to be able to edit the HTML content without editing the entire .SWF (not everyone who works on this stuff has/knows Flash). Moreover, the page loaded is going to depend on a login (i.e. different logins will display different pages), since otherwise we’re going to end up with a huge .SWF, which means more bandwidth costs for us.

[quote=glosrfc;2337560]If you simply want to duplicate an existing HTML page in Flash, one of the quickest ways is to copy the HTML page (right-click, select all, right-click copy) then paste it into a Word document (Edit, Paste). Then copy it from Word (Edit, Select All, Edit, Copy) and paste it into a blank Flash document (right-click, paste).

All of the text and images should copy across with the bonus that all of the text will appear in static text fields which you can then edit and play around with so that it replicates the original website. It’s certainly easier than trying to replicate the look of the site in Flash first and then trying to import the text to fit.[/quote]

Woot, figured it out. I was trying to load it into the text box onLoad, not onData, so it didn’t have time to get everything in there.

No problem…I wasn’t sure if you were just trying to create a Flash version of an existing HTML site when you said “I’m trying to do a new front-end for a website”, and just wanted a template to work from. I certainly wouldn’t recommend using the technique to try and update the SWF each time there was a change!

Glad you figured out the loading.

Thanks … now, though, I have a new problem: the entirety of the page loads, but not all of it is in the window. If I trace the results of the onData, the whole page shows up in the outbox window, but scrolling all the way down (using the attached UIScrollBar component that comes with Flash) only takes me maybe a quarter of the way through. Any ideas?

[quote=glosrfc;2337611]No problem…I wasn’t sure if you were just trying to create a Flash version of an existing HTML site when you said “I’m trying to do a new front-end for a website”, and just wanted a template to work from. I certainly wouldn’t recommend using the technique to try and update the SWF each time there was a change!

Glad you figured out the loading.[/quote]

Try pasting some dummy text, that exceeds the amount of text that you’re going to be loading, into your scrollbar component. The component is created early on in your SWF but, because you’re loading dynamic text, it doesn’t know how big it has to be or how far it eventually has to scroll…so my guess is that it’s either defaulting to a standard size or else to whatever size it needs to be to accommodate any text you inserted at the design stage. So adding a load more text at the design stage might solve the problem.