4 Replies Latest reply on Jul 5, 2008 9:34 AM by

    Cant create swf-file

      When I´m changing the sourcepaths to my php-file in my.mxml file from http://localhost/mydirectory/my.php to http://www.myHomesite.com/mydirectory/my.php I cant run and create a swf-file.
      The debbuger is telling me "problem finding my.php" and then FlexBuilder 3.0 stops and do nothing.
      Of course Flex cant find it - first I have to create the swf-file on my localhost before I deploy (transfer) everything to my external server - www.myHomesite.com.

      my localhost I´m running:
      -Windows XP SP2
      -Apache with MySQL

      I really appreciate some answer
        • 1. Re: Cant create swf-file
          ntsiii Level 3
          If the debugger runs, then you have created the swf file.

          Sounds like the url:
          is invalid. Hit it from a browser.

          1 person found this helpful
          • 2. Re: Cant create swf-file
            Brent Lamborn Level 2
            What is the url used for? Do you have a crossdomain.xml in place at myhomesite.com ?
            • 3. Cant create swf-file
              It’s a basic sourcepath problem when you create the files on localhost and then transfer the files to a
              Internet service provider and no longer need the local src directory.

              Here is another example of the same problem with the .css-file:

              Error exist in required project
              Proceed with launch?

              -I clicked yes
              Then this error message:
              File not found:file:/C:/AppServ/www/example/bin-debug/example.html

              No .swf is created in the directory bin-debug.

              I get the above error message because I’ve changed this:
              <mx:Style source="../css/example.css" />
              to this
              <mx:Style source="css/example.css" /> within example.mxml.

              I get the above error message because I want to remove my localhost files to the server and no longer need the local src directory.

              • 4. Re: Cant create swf-file
                ..no answer

                ..Anyway - here is the solution to everyone that have the same problem
                with simple exporting problems in FlexBuilder 3.0.

                When you working in Flex on localhost:
                1. In the left panel - drop all your files into SRC directory.

                2. The files you than deploy (transfer or whatever you call it)
                to your external server is within BIN-DEBUG directory)

                Now, you dont have problems the debug error "cant find file" caused by wrong paths to .php-files and .css-files or whatever file you pointing to.

                Now your path to .css problably look like this:
                <mx:Style source="css/yourStyle.css" />

                and not probably not like this
                <mx:Style source="..css/myStyle.css" />

                It´s so easy to cange the path within your flex because you want to get rid of the debug error
                "..cant find file"
                If you´re newbie to Flex its so easy to do wrong and get lost the first period with Flex,
                because Flex i s creating the whole structure with directories and sub directories for you.

                It´s remarkeble that this basic information so hard to get out there.