davidhopkins
05-12-2010, 10:55 AM
Hello all.
I am using the following code to import a swf file that has a number or frames. When i hit next or previous it moves either to the next or previous frame.
The code is as follows
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" applicationComplete="load()">
<mx:Script>
<![CDATA[
private var flashMovie:MovieClip;
private function initMovie():void{
flashMovie = loader.content as MovieClip;
}
private function load():void{
flashMovie.stop()
}
]]>
</mx:Script>
<mx:SWFLoader id="loader" source="flash.swf" complete="initMovie()"/>
<mx:Button label="Next" click="flashMovie.nextFrame()"/>
<mx:Button label="Previous" click="flashMovie.prevFrame()"/>
</mx:Application>
This works fine, everything is as i want, apart from i want what ever SWF frame is being displayed, to be displayed on all web browsers that have the page open.
I imagine i would be able to use an XML file, and pull the frame being displayed from that and have it check the XML file every couple of seconds ?
Although saying that im not 100% sure on how to achieve this.
Can anyone offer some help please?
I am using the following code to import a swf file that has a number or frames. When i hit next or previous it moves either to the next or previous frame.
The code is as follows
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" applicationComplete="load()">
<mx:Script>
<![CDATA[
private var flashMovie:MovieClip;
private function initMovie():void{
flashMovie = loader.content as MovieClip;
}
private function load():void{
flashMovie.stop()
}
]]>
</mx:Script>
<mx:SWFLoader id="loader" source="flash.swf" complete="initMovie()"/>
<mx:Button label="Next" click="flashMovie.nextFrame()"/>
<mx:Button label="Previous" click="flashMovie.prevFrame()"/>
</mx:Application>
This works fine, everything is as i want, apart from i want what ever SWF frame is being displayed, to be displayed on all web browsers that have the page open.
I imagine i would be able to use an XML file, and pull the frame being displayed from that and have it check the XML file every couple of seconds ?
Although saying that im not 100% sure on how to achieve this.
Can anyone offer some help please?