FORUMS: list search recent posts

updating flash text box with coding from a different website

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Benjamin Howard
updating flash text box with coding from a different website
on Dec 5, 2009 at 11:50:21 pm

Hello, I currently design band layouts for myspace. I am having trouble.

I want to consistently do full div overlays for bands. The only thing that is stopping me is being able to move the shows around.

Then I had an idea of making a flash document that would be basically be a text box, but where the content is updated from a section of myspace code. More specifically the upcoming shows section on myspace. So bands could just add shows the normal way, but the box would reflect it.

Anyone know the action script I could use for it? Or point me in a direction where I could find/learn how to make the code for it.

Thanks for any information.

Return to posts index

Marcus Geduld
Re: updating flash text box with coding from a different website
on Dec 6, 2009 at 6:07:57 pm

Are you saying that you want to pull text off a myspace page and display it in a Flash text box?

Here's how you can pull a web page into Flash:

var loader : URLLoader = new URLLoader();
loader.addEventListener( Event.COMPLETE, loadComplete );
loader.load( new URLRequest( "" ) );

function loadComplete( event : Event ) : void
trace( );

That's the easy part. The hard part is parsing the returned data to get the part you want. If you paste the above code into frame 1 and the run the swf, you'll see the html from in the output window. It's just as if you'd surfed to the page yourself and viewed the source.

To get the part of the page you want, you'll have to write specific xml or regexp parsing code. You can do this in Actionscript but I would recommend doing it in a server-scripting language, such as PHP, Perl or Python. Flash would contact the server script instead of directly pulling from the myspace page.

Author "After Effects Expressions"
Co-author "After Effects For Flash, Flash For After Effects"
Artistic Director, Folding Chair Classical Theatre, Inc
Senior Flash Developer,

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved