简体   繁体   中英

how to make swf player with flex builder?

I make Sampal.swf with adobe flash. It has some external links to load some swf files into this main Sampal.swf. Now I want to run this main swf with flex builder application. I used mx:SWFLoader to that. This is code I had given...

<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
                    xmlns:ns1="*"
                    applicationComplete="init()" name="Content" showStatusBar="false">

<mx:Script> 
    <![CDATA[

    private function init():void
    {
        stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
    }

    ]]>

    </mx:Script>
<mx:SWFLoader x="6" width="770" height="336" source="E:\Office\Sampal.swf"/>

</mx:WindowedApplication>

When I run the application Main swf work properly. But that external links not works. If I click that kind of link, It gives this Error message. Error #2044: Unhandled ioError:. text=Error #2035: URL Not Found. URL: file:///Flash/IRI02-I-07-I.swf

Please give me some solution...

According to the documentation :

The value of the source property represents a relative or absolute URL; 
  a ByteArray representing a SWF, GIF, JPEG, or PNG;  
  an object that implements IFlexDisplayObject; 
  a class whose type implements IFlexDisplayObject; 
  or a String that represents a class.

It appears that you have specified a disk path. Change this to a URL, or use another method to put the data in a format that SWFLoader can use.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM