What am i doing wrong, SWF File

Hello all,
This is driving me crazy!
I  have made a flex app, that imports a swf file, converts it to a movie  clip, and then pulls which frame to display from a XML file, that is  checked every second.  This works fine when using the following SWF file  - http://davidtest.webcastglobal.com/swf/flash.swf
Although  when i tried re-creating my own example - http://davidtest.webcastglobal.com/swf/flash2.swf
my  flex app fails to respond correctly.  THe swf file just loops thru all  the frames in one go, and fails to take into account the XML file  pointing at what frame to look at, and fails to look at the HTTPS  service.
Ok so here is an example of the app with both  examples embeded.
http://davidtest.webcastglobal.com/swfwork/Main.html  - This is using the working swf file,
http://davidtest.webcastglobal.com/swfbroke/Main.html  - This is using the swf file that i have created.
THe  code that i am using to achieve this is as follows -
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" applicationComplete="load()">   
    <mx:Script>
        <![CDATA[
            import mx.rpc.events.ResultEvent;
            [Bindable] public var dataDump:String = "datadump";
            [Bindable] private var myText:String
            private var flashMovie:MovieClip;
            private function initMovie():void{
                flashMovie = loader.content as MovieClip;
            private function load():void{
                flashMovie.gotoAndStop(myText)
                getImage.send();
                setTimeout(load,1000);
            private function handleImage(event:ResultEvent):void
                myText = event.result.framelocation;
        ]]>
    </mx:Script>
    <mx:SWFLoader id="loader" source="flash2.swf" complete="initMovie()" x="-9" y="-3"/>
    <mx:Button label="Next" click="flashMovie.nextFrame()" x="78" y="405"/>
    <mx:Button label="Previous" click="flashMovie.prevFrame()" x="0" y="405"/>
    <mx:Button label="4" click="flashMovie.gotoAndPlay(7)" x="156" y="405"/>
    <mx:HTTPService id="getImage" result="handleImage(event)" url="http://davidtest.webcastglobal.com/change.xml" method="POST">
        <mx:request xmlns="">
            <dataDumping>
                {dataDump}
            </dataDumping>
        </mx:request>
    </mx:HTTPService>
    <mx:Text x="817" y="10" text="Total: {myText}" width="157"/>
</mx:Application>
My question is when creating my own swf file, what am i  doing wrong?  Flex clearly isnt interacting with it in the same way as  the original swf,  by the way, this swf was taken from a tutorial.
If  anyone could point me in a direction or offer help on this i would be  thankful.  Im sure i am just missing something out when i create my swf  in flash

1.  your swf file must be published for as3.
2.  it should consist of a main timeline with more than 1 frame.
3.  it needs as many frames as you're going to reference in the xml.
4.  that main timeline should contain objects on its frames so you can see when the main timeline is on one frame vs another referenced in your xml.
that's it.  those are the only requirements of the swf.
have you confirmed that intiMovie() is called first and then load()?  if so, how did you confirm?

Similar Messages

Maybe you are looking for

  • User exit in enjoy Purchase order transactions -MM06E005

    I am trying to write a code in the enhancement MM06E005 - to check a field in the enjoy PO  transaction me22n when saving and issue a warning message. I am using the function module EXIT_SAPMM06E_012 to do this. It does not work. But when I try to ma

  • Problem with generic data source

    I have a infoset using this infoset I have developed one datasource everything fine,When i see the data on RSA3 it is going to dump. Please help.. what is the problem..... Regards, Sasidhar.

  • I have CS 4 Design Premium CS4 (Mac) and would like to get replacement for my faulty Install DVD

    Any suggestions how I can do this?

  • Why has Dictation stopped working?

    I have been very pleased with the improvement to Dictation in its enhanced mode, including provision for spoken commands in place of Speakable Items.  Just as I have got fully familiar with the feature, Dictation has stopped working.  When I call upo

  • Regex for web page parsing

    I am trying to parse the html output of a web page. I need to grab all the URLs which are in hrefs, actions etc inside. I am using the regex pattern Pattern p = Pattern.compile("http.*?//\\S+[^\"]"); (basically grab anything that starts with http til