PDA

View Full Version : "iframe" on flash


Alt-Ox
09-02-2009, 07:31 AM
Hello everybody

I have a playlist on flash which is generated with an xml content but need list other two playlists (using separeted xml files) on the same "stage".

The "flash page" which displays a playlist should change when pressing a button, but this page should appear always on the same place, like "iframe".

Does anyone know how to do that?

thanks

omega3d12
09-02-2009, 09:54 AM
Hello everybody

I have a playlist on flash which is generated with an xml content but need list other two playlists (using separeted xml files) on the same "stage".

The "flash page" which displays a playlist should change when pressing a button, but this page should appear always on the same place, like "iframe".

Does anyone know how to do that?

thanks

If you have a container object o a playlist object:

var playlistStage:PlayList = new PlayList();

then you can init it with that xml file in whic hyou want to use...

playlistStage.init(xmlFile); // of course, you will have to create this method

And then when you are done, might be kind of cool tod o some tween animation out from

playlistStage.destroy();

and then init the next xml file:

playlistStage.init(newXmlFile); // with all the animate in goodness.

Alt-Ox
09-02-2009, 06:09 PM
tks for replying, but my code is a little bit different
I guess all I need is to specify other xml file (FILE2.xml) when clicking on button, so the function is called again and the result is generated on the same place, you know what I mean?


function readxml()
{
txt_message.text = "";
ldr = new URLLoader();
urq = new URLRequest( "FILE1.xml" );
ldr.addEventListener( IOErrorEvent.IO_ERROR, ldr_error );
ldr.addEventListener( Event.COMPLETE, ldr_complete );
ldr.load( urq );
}

public function ldr_error( _e:Event ):void
{
trace( "slideshow_editor.ldr_error loading: "+ _e.type );
}

private function ldr_complete( _e:Event ):void
{
trace( "slideshow_editor.ldr_complete( " + _e.type +" )" );

state = new XML( _e.target.data );
init_ddt_pool();
}


private function init_ddt_pool()
{
ddt_pool.rowCount = 1;
ddt_pool.rowHeight = 96;
ddt_pool.columnWidth = 128;
ddt_pool.height = (96*1) + 16;
ddt_pool.direction = ScrollBarDirection.HORIZONTAL;

ddt_pool.canDragFrom = true;
ddt_pool.dragRemovesItem = false;
ddt_pool.dropOffRemovesItem = false;
ddt_pool.canDropOn = false;
ddt_pool.dragAlpha = .43;
ddt_pool.autoScroll = false;
ddt_pool.scrollZone = .15;
ddt_pool.scrollSpeed = 3;
ddt_pool.allowDuplicates = false;

dp_pool = new DataProvider( new XML( "<items>"+state..image+"</items>" ) );
ddt_pool.dataProvider = dp_pool;

}

Thanks