BlueInkAlchemist 0 Report post Posted November 26, 2008 Since ActionScript.org appears to be down, I'm going to annoy you all with more design questions. :)I know I can use the getURL and URLLoader classes to bring HTML content into Flash. But can these also be used if I only want to show part of an HTML page? For example, if the content I want to show is in a <div> tag, and that's all I want to show, how would I go about calling for that part of the HTML source?Thanks in advance... Share this post Link to post Share on other sites
Nabb 0 Report post Posted November 26, 2008 (edited) Using javascript, it's something like document.documentElement.innerHTML=document.getElementById('lolz').innerHTML (could be wrong though)I'm not sure how you'd integrate that into Flash though..But if you have the source as a string, can't you use indexOf and substr to get that? Or something... Edited November 26, 2008 by Nabb (see edit history) Share this post Link to post Share on other sites
galexcd 0 Report post Posted November 26, 2008 I think it would be easier to make a php page to load the html page you want to, parse out everything except the contents in the div, and then have flash load your php page. Perhaps if you were a bit more specific I could whip up a php script to do this for you. Share this post Link to post Share on other sites
BlueInkAlchemist 0 Report post Posted November 26, 2008 (edited) I think it would be easier to make a php page to load the html page you want to, parse out everything except the contents in the div, and then have flash load your php page. Perhaps if you were a bit more specific I could whip up a php script to do this for you.Basically, what I want to do is, within a Flash movie, when a navigation button is selected, a content area (a MovieClip more than likely) should be populated with formatted text from an outside page.Also, this is going to be hosted on my domain which is currently held by Microsoft Office Live, meaning it's an ASP-based site. It'll be ASP wrapped around Flash, but still. Edited November 26, 2008 by BlueInkAlchemist (see edit history) Share this post Link to post Share on other sites
galexcd 0 Report post Posted November 27, 2008 Well I'm not that familiar with ASP, but you should be able to do the same thing. Basically instead of having flash load that certain external page, have flash load an ASP page you created, which loads and parses the external page. Share this post Link to post Share on other sites
BlueInkAlchemist 0 Report post Posted November 27, 2008 Well I'm not that familiar with ASP, but you should be able to do the same thing. Basically instead of having flash load that certain external page, have flash load an ASP page you created, which loads and parses the external page.What about XML? For example, within Flash, ActionScript will read the nodes of an XML file which contain external file names, corresponding variables, etc. On an event (a Mouse Click more than likely), the selected variable will load the corresponding external file in a content area. That's the rough idea. Share this post Link to post Share on other sites
galexcd 0 Report post Posted November 28, 2008 Well if you are planning to do it like that you would be better off using actionscript string parsing function such as split.For example: String cont; //Or whatever the name of your content variable istemp=cont.split("<div>");temp2=temp[1].split("</div>");cont=temp2[0]; Share this post Link to post Share on other sites
actuarymath 1 Report post Posted November 28, 2008 Since ActionScript.org appears to be down, I'm going to annoy you all with more design questions. I know I can use the getURL and URLLoader classes to bring HTML content into Flash. But can these also be used if I only want to show part of an HTML page? For example, if the content I want to show is in a <div> tag, and that's all I want to show, how would I go about calling for that part of the HTML source?Thanks in advance... How about flashprobe?http://www.flashprobe.com/ Share this post Link to post Share on other sites
galexcd 0 Report post Posted November 28, 2008 How about flashprobe?http://www.flashprobe.com/ BlueInkAlchemist is trying to get html into flash dynamically, not extract text and images from flash, which is what this tool seems to do. He would need to either have flash or some other server side script parse the html and have flash load the content when the swf is played. Share this post Link to post Share on other sites
BlueInkAlchemist 0 Report post Posted December 1, 2008 Well if you are planning to do it like that you would be better off using actionscript string parsing function such as split.For example: String cont; //Or whatever the name of your content variable istemp=cont.split("<div>");temp2=temp[1].split("</div>");cont=temp2[0]; I'll have to try this out, see if it will preserve HTML text formatting when taken from the source page into Flash... Share this post Link to post Share on other sites