How to reference an ActionScript file in a custom MXML component

I have a custom MXML component located in a folder with this path:
src/com/LoginForm.mxml
I have functions in an ActionScript file located here:
src/as/SharedObjects.as

I would like to refer to the AS file in the MXML component. I tried two different ways, but no work:
< mx:Script source="as/SharedObjects.as"/ > and.
include "ACE/SharedObjects.as";
I get the error "unable to open included file...". »
If I copy the AS file in the same folder as the component, an include statement in the script component works:
include 'SharedObjects.as ';

But I reference the same FILE in the other application MXML and other files HAVE, so I don't want to keep two copies of it.

What I'm doing wrong here? Thank you!

Greg,
The line:

has worked!
Thanks for the help. I just could not 'get it '! It was the ".." that I had not tried.
ntsiii, thanks for your help, too.
Have a great day.

Tags: Flex

Similar Questions

  • How to iterate through all the controls in a MXML component

    How can browse you a MXML component controls?

    What kind of objects you need for the loop foreach?

    for each {(var child: UIComponent in parent.children)

  • Basic JavaScript - how to reference on audio files online

    Could someone help me with an example of how to play an audio online?  I already have a slide button - I just want to play sur-cliquez on an audio file like this: http://jplayer.org/audio/ogg/Miaow-07-Bubble.ogg

    Thank you.

    Just use:

    var audio = new Audio(cloze61);
    audio.play();

    You don't need the quotes around your variable. In addition, if it is html5 in the script window, you must use window.cloze61, your most likely not set.

    also, the 'response' at the end will break the code.

  • How to include .as (actionscript file) in as3 framework

    I've included an asctionScript syntax of the file is #include 'filename.as' when published next syntax error.

    In AS3, do not use the character "#".

  • How to open a pdf file in the custom file system browser?

    Hello experts

    Nice day

    My Forms/version BEING 10.1.2.3

    Operating system Windows server 2008r2 / 2012r2

    I want to open a PDF file of file system server (pdf file stored in the custom example path D:\folder1\folder_pdf\pdf_file.pdf ) in a web browser as we call / open a PDF reports by clicking a button.

    How can I achieve this?

    Thanks in advance.

    Ask2Learn

    Hello @ask2Learn

    Follow

    1 web.show_document virtual directory. Oracle Community

    2 view the web document does not... | Oracle Community

    Hope this helps

    Hamid

  • How to remove missing references and audio files or instruments that popup at launch I need is no longer?

    How to remove missing references and audio files or instruments that popup at launch I need is no longer?

    For audfio missing files: go to the Project Audio Bin, mouse control select unused , and then press DELETE. And then click Save.

    Missing instruments or plugins, go to your mixer and remove/Exchange any plugins that have a '!"in all of their slot. And then click Save.

  • During startup, I get an error message that the registry database cannot find a file and modify registry to delete the reference to the file in the registry. How can I do this?

    Original title: Registery Error Message

    During startup, I get an error message that the registry database cannot find a file and modify registry to delete the reference to the file in the registry.  How can I do this?

    Hello

    • What were the changes made before the problem occurred?

    I recommend you perform the clean boot.
     
    Configuration of your system in a clean boot state helps determine if third-party applications or startup items are causing the problem. If so, you need to maybe contact the manufacturer of the program for updates or uninstall and reinstall the program.
     
    See the following article in the Microsoft KB for more information on how to solve a problem by performing a clean boot in Windows Vista or Windows 7:
     
    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7
    http://support.Microsoft.com/kb/929135 
     
    Note: After troubleshooting, be sure to set the computer to start as usual as mentioned in step 7 in the above article.

  • How to reference a file downloaded from a theme css

    Hello

    I downloaded a css file that I want to use for my login page. However, how I reference the header section in my login page? I know to reference the images uploaded with #WORKAPCE_IMAGES #, when I try as below, it doesn't seem to work.
    <link rel="stylesheet" href="#WORKAPCE_IMAGES#login.css" type="text/css" />
    Thank you
    Andrew

    Its me asking to download and this is the correct css file that I downloaded. Makes me wonder that the image is obviously not read. I'm referencing the image properly in the CSS so as #WORKSPACE_IMAGES #background.png.

    No, it is not possible to use the substitution #WORKSPACE_IMAGES # CSS files. This has been discussed for years (for example + {: identifier of the thread = 419889} + and + {: identifier of the thread = 986329} +)...

    If the file system are not accessible and download files to #WORKSPACE_IMAGES # is the only possible approach (as seems to be the case here), then the CSS rules that reference images must go into page templates or HTML page headers, as described in the above discussions. Remove the background image the file rule and re-create it in the model of login page or the connection header HTML page such as:

    
    
  • How to load an exe file in a secondary?

    I want to deploy an exe file containing a secondary on a system without the LabVIEW development environment. I want to load a different exe in the secondary.

    It missing me something quite basic, but how do I open a reference to the exe? I know how to open run and load a vi in a secondary but how I reference if it is an exe? Reference open vi says that's a unexpected file type.

    In order to avoid an argument,

    The VI includes 'compiled' objects that are updated every time that you run your VI.

    These compiled objects are equivalent for function calls in the execution of labview.

    This is not so different to the behaviour of the .net framework.

    Your basic functions such as +, -, x, /, can be compiled into microcode simple, which requires intelligence will be in the frame or the runtime

    So all is good, it depends on what angle you are looking at him.

  • How to view all the files on my computer from big to small

    Hello

    could someone tell me how to view all the files on my computer from big to small

    There should be thousands of them. music movies photos the entire batch.

    THX

    Hello

    I suggest that you sort files by size and check if that helps.

    Reference:

    Behavior and change folder views

    http://Windows.Microsoft.com/en-us/Windows-Vista/change-folder-views-and-behavior

    Work with files and folders

    http://Windows.Microsoft.com/en-us/Windows-Vista/working-with-files-and-folders

    Demo: Working with files and folders

    http://Windows.Microsoft.com/en-us/Windows-Vista/demo-working-with-files-and-folders

    Let us know if it helps.

  • How to shorten the music file to match the selected slides

    I created a slide show with windows vista movie maker.  How to shorten the music files to match both of the selected slides.  Using the fade out option did not work

    Hello

    You can try the following methods and check if it helps.

    Method 1:

    (a) open your filmmaking program and create the slide show using your photos. Choose the options you want for changes between the photos and the duration of each photo display. If you need help, then check out the help file in your theater program.

    (b) open the import file dialog box. In Windows Movie Maker, it is in the part of '"movie tasks', section"vidéo Capture." Browse your files to find the mp3 file you want to import, select and import it. Will import it into filmmaking program but it will not in the video.

    (c) search for the file in your filmmaking program and import it into the film. In Windows Movie Maker, you can drag and drop the file in the position in the window of time movie online, where you want that song to start playing.

    (d) scroll through the timeline until the end of the song. Drag the end of the song in a position to match the end of your slide show. This will be the end of the song at the same time exactly like your slide show.

    (e) read your film completely from the beginning to the end and ensure that everything is with the song the way you want that there. If you are satisfied with the finished product, then export the movie to the right format and the file will be ready to play.

    Method 2: Work with clips in Windows Movie Maker

    http://Windows.Microsoft.com/en-us/Windows-Vista/work-with-clips-in-Windows-Movie-Maker

    Reference:--

    http://Windows.Microsoft.com/en-us/Windows-Vista/getting-started-with-Windows-Movie-Maker#

    http://Windows.Microsoft.com/en-us/Windows-Vista/adjusting-audio-in-Windows-Movie-Maker-frequently-asked-questions

  • Simple question: how to export a SWF file?

    Hi, I am quite new to Flex and Flash Builder (having more than ten years of Flash experience tho), I'm on a fast track to learning, and I'm generally unclear as to how to use FB to post projects (in Flash, it's very simple).

    I'm working on my first FB project for a client, and the situation is somewhat unique: I created a new project, however, it is not necessary for the MXML file in this situation, because we have an application server that uses just the product SWF in a Flex remote setting much larger side.  So when I do updates in the local project, I want to just export a new SWF to compile ActionScript class files I created and then upload the SWF file to the remote server for the test.

    Yet, when I try just to launch the project locally (to export a new SWF file), I get errors that I assume are due to inappropriate use of the MXML file (which is usually empty), and it is not relevant the rest ActionScript files (and I did not need to be).

    I have examples of other related projects that have no file MXML at all, when I tried to remove the MXML file, I get an error that says simply: "the file cannot be launched.  And in fact, when I moved the file MXML back, I now get the same error.  It's really hard to know what is happening here.

    I thought about primary control AS file in the Application 'default', but the menu for that option is not allowing me to (grayed out).

    Can someone help me understand what to do here?

    When project-> build automatically is enabled, whenever you make a change to a file that is used by your main Application AS file somehow, the output SWF will be built in the bin-debug folder.

    When project you-> export of output, a quality version of the SWF file will be generated in the bin-release folder.

  • How can I protect some files of the icloud sharing in the sierra?

    How can I protect certain files from the desktop to icloud and sharing documents in the sierra?  Some of my data is private and I don't want it in the cloud.

    Do not put them in the Documents folder or on the desktop.

  • How to open a pps file

    A friend sent me an email with an attachment of dpp, how can I open the file? It has a windows computer, and I think he is using Serif?

    Ask him to send content in a format you can view such as PDF.

    TT2

  • How to access the textedit files in Icloud on time machine

    Hi all

    Bad, I need your help! I'm trying to access all my text edit files, which I had saved on ICloud.
    My laptop does not run successfully. I was proposed to restore and re - install the op system. So I run a Machine back up full time and I restored my laptop. I should all have backed up, right?
    Problem is: I'm trying to get all my work on Tex Edit, but I can't find it on Time Machine. Does anyone know how can I recover these files? I have two important years of drafting work there!
    It would be good to have your suggestion.

    Thanks in advance for your help

    Did you you save the files in the correct format - OS X Server: how to modify the configuration files - Apple support?

Maybe you are looking for