4 Replies Latest reply on Mar 9, 2007 1:17 PM by Anti-Girl

    where can i find swfLoader examples?

    Anti-Girl
      i need to load a swf flash 8 movie, would emedd tag be better?
      anyway i need the movie to dissappear on my canvas [flex] after its played through its timeline?
        • 1. Re: where can i find swfLoader examples?
          ntsiii Level 3
          Thee are issues using flash Player 8 (AS2) swfs inside a Flex 2 FlashPlayer 9 (AS3). Specifically, communication must be via localConnection.

          Google this for lots more info.

          Tracy
          • 2. Re: where can i find swfLoader examples?
            JohnLeger Level 1
            This is how I incorporated mine.

            First I created a SWFLoader component in a folder I called 'view' with the following code...

            <?xml version="1.0" encoding="utf-8"?>
            <!-- FlashIntroSWFLoader.mxml Component(Version 1.0.0.0[Build 2.13.07]) -->

            <!-- No known bugs -->
            <mx:SWFLoader
            xmlns:mx=" http://www.adobe.com/2006/mxml"
            maintainAspectRatio="true"
            width="100%"
            height="209"
            scaleContent="true">
            </mx:SWFLoader>

            Note: You'll need to set the properties according to your needs.


            Then I placed an instance of the component in my Main.mxml code with the following code...

            <view:FlashIntroSWFLoader
            id="flashIntroSWFLoader"
            source="@Embed(source='assets/swf/flash_intro.swf')"/>


            Note: You can not set the ID property directly inside the component. Instead you set the ID property inside the instance of the component. I hope I am saying this right! :) Also be sure to set the source URL to point to your .swf file.

            The LAST thing to do is to add the following to the opening Application tag of your Main.mxml, or the opening tag of another component if the instance is being placed in that component.

            xmlns:view="view.*"

            Note: You'll need to change the namespace above according to your folder structure.

            I do not have any issues whatsoever with loading my flash intro, which I created in Flash 8, into Flex 2.

            Please let me know if this helps!

            John






            • 3. Re: where can i find swfLoader examples?
              Anti-Girl Level 1
              hey john, i dont have any problems with loading the swf file, im wondering it it would be possibly to destroy/kill/ unload? it after it finishes playing?

              the following swf embedding techniques work aswell
              http://www.adobe.com/devnet/flex/quickstart/embedding_assets/#EmbeddingSwfFiles

              • 4. Re: where can i find swfLoader examples?
                Anti-Girl Level 1
                never mind, ugh silly me
                click="SWFID.visible=false"/>