Search code examples
apache-flexactionscriptairflash-buildermxml

flash builder unable to open file


I am new to adobe flash builder and I am making a mobile flex project. In my project so far I have a simple two page layout with buttons to go forwards and back. It's a simple hello world just to test.

I wrote an action-script that uses the camera on the phone and want to attach it to a button call so the camera opens when pressed. I have looked all over the internet but cannot find a solution for this on android and would appreciate any links for any tutorials as-well.

My button call looks like this:

<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009" 
        xmlns:s="library://ns.adobe.com/flex/spark" title="Camera">
    <!-- The file I want to include -->
    <fx:Script source="includes/Camera.as"/>
    <!-- Declarations -->
    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <!-- alignment for buttons -->
    <s:VGroup width="100%" height="100%" verticalAlign="middle" horizontalAlign="center">
        <!-- Button that will take the user to camera -->
        <s:Button label="Capture" click="button1_clickHandler(event)"/>
        <!-- Button to navigate back to the main page -->
        <s:Button label="Back" click="navigator.popView()" styleName="back" />
    </s:VGroup>
</s:View>  

This is my error:

1068: Unable to open included file: C:\Users\denis\Adobe Flash Builder 4.6\app3\src\views\includes\Camera.as.

Includes is a folder I created. As I stated I could not find any tutorials and I am new to this so apologies for noob questions.


Solution

  • Where did you create the includes folder? My guess is that you created it in your app3 directory, and not as a subdirectory of src\views.