5 Replies Latest reply on Mar 28, 2011 10:28 AM by Mdnan

    Problem finding external file

    CCPhilla221122

      ***See attached image***

       

      Can someone please help me understand why Flex errors "Problem finding external file"

       

      The files are clearly in the identified path...no?

       

      Many thanks

       

      JB

        • 1. Re: Problem finding external file
          Madhav Subedi Level 4

          you dont need to provide 'src/' as both are in same folder, you can give only the filename without folder.

          • 2. Re: Problem finding external file
            Mdnan Level 1

            Hi,

            I have the same problem, please could you explain in deatils what you mean.

            Thanks too much

            • 3. Re: Problem finding external file
              haroon ghafoori

              Here is how you can import an as file into the mxml component.


              case:1 If both, script file (MyFile.as) and mxml component are in the same directory.

               

              <fx:Script source="MyFile.as"/>

               

              case:2 If scrip file (MyFile.as) is inside a "subfolder"

               

              <fx:Script source="subfolder/MyFile.as"/>

               

              case:3 If mxml component is inside a "subfolder"

               

              <fx:Script source="../MyFile.as"/>

               

               

              Hopoe this quite clear.

              • 4. Re: Problem finding external file
                Mdnan Level 1

                Hell haroon,

                 

                Thanks to the fast answer in real i do like you explain in your answer but i still already have the same problem give error,

                 

                I`m gonna to past the code to you check may i do something wrong and not watch really need help.

                 

                Thanks, waiting answer.

                 

                here the code:

                 

                <?xml version="1.0" encoding="utf-8"?>
                <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
                                       xmlns:s="library://ns.adobe.com/flex/spark"
                                       xmlns:mx="library://ns.adobe.com/flex/mx" width="720" height="530" xmlns:rtc="http://ns.adobe.com/rtc">
                   
                    <fx:Script source="pass.as"/>
                    <fx:Script>
                        <![CDATA[
                           
                            protected function button1_clickHandler(event:MouseEvent):void
                            {
                                // TODO Auto-generated method stub
                                scshare.publish();
                            }
                           
                            protected function button2_clickHandler(event:MouseEvent):void
                            {
                                // TODO Auto-generated method stub
                                scshare.stop();
                               
                            }
                           
                        ]]>
                    </fx:Script>
                   
                    <fx:Declarations>
                        <!-- Place non-visual elements (e.g., services, value objects) here -->
                    </fx:Declarations>
                    <rtc:ConnectSessionContainer x="0" y="0" width="730" height="530" roomURL="https://connectnow.acrobat.com/yourname/yourroom">
                        <rtc:authenticator>
                            <rtc:AdobeHSAuthenticator userName="login@adobe.com" password="{thepass}"/>
                        </rtc:authenticator>
                        <rtc:Roster x="395" y="0" displaySelection="false" showMenuButtons="true"  width="295" height="362"/>
                        <rtc:WebCamera x="395" y="370" width="127" height="126"/>
                        <rtc:ScreenSharePublisher id="scshare"  width="421" height="309" left="484" y="207"/>
                       
                        <s:Button x="556" y="370" click="button1_clickHandler(event)" label="share screen" width="141" height="41"/>
                        <s:Button x="556" y="416" click="button2_clickHandler(event)" label="stop screen sharing" width="141" height="41"/>
                       
                    </rtc:ConnectSessionContainer>
                    <rtc:SimpleChat x="0" y="0"  sessionDependent="true" useExternalContextMenu="false" newMessageColor="0x000000" width="391" height="500"/>
                </s:WindowedApplication>

                • 5. Re: Problem finding external file
                  Mdnan Level 1

                  Hello,

                  I still now try solve the error in code however, if you can give some help  and check why i always have this error will be nice.

                  Thanks