Flex Library Project - including the ActionScript code in an MXML file

I am new to flex so I apologize if this is common knowledge.

Breast Flash Builder 4.5, I created a project 'Flex '. I created a folder named "components" and created two files in this folder. ((1) Page.mxml, PageAs.as) 2. In the Page.mxml file, I included the PageAs.as file using the < fx:Script source = "PageAs.as" / > script tag. "

I save and run it. Everything works very well. No errors.

Now, I create a "Flex library project', I create a folder named"components"and create two files in this folder. ((1) Page.mxml, PageAs.as) 2. Before I have a chance to include the PageAs.as file in my Page.mxml file I get the following error.

"A file in a source path must have a definition that is visible from the outside. If a definition in the file is intended to be visible from the outside, please put the definition in a package. »

Here, I'm a bit confused. I have created two different projects but created two structures of identical files in each project. Why it worked very well in the 'Flex' project but not in the "Flex library project" and is it possible to fix the error?

Page.MXML

<?xml version="1.0" encoding="utf-8"?>
  
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"

                  xmlns:s="library://ns.adobe.com/flex/spark"
                  xmlns:mx="library://ns.adobe.com/flex/mx"

          <fx:Script source="Page.designer.as" />
 </s:Group> 

PageAS.as

import mx.events.*
 
function unusedFunction():void
{
      
}



Go to project-> Properties-> Flex Library Build Path-> Classes (tab)

Uncheck all of the actionscript files that are not actually classes, but rather an external import in one class (your MXML).

Also, for the record, it is common to use lowercase letters for files includes actionscript and no real class. Camel case file names should be reserved for the class files...

Tags: Flex

Similar Questions

  • Packed error Library Project: contains the compiled code

    I have tried to understand how the packed library works for LVOOP, but facing a wall with an error and do not know how to solve.

    (i) I did a "class 1", I then put in a library called 'library'.

    (II) I create a library packed and put the top-level library source files

    (III) once compiled and registered, I create a new project and add creating newly packed library project to it. Secondly, I add one newly create class, named 'class 2 '.

    (IV) I put the legacy of class 2 as a child of the class 1.

    (v) select new VI for substitution

    (VI) get error 1035

    What I'm doing wrong or how to fix this?

    The default setting for the packaging of screws in lvlibp deletes the block diagram.

    You must not delete dynamic distribution pattern-block screw you wish to override.

    hope this helps,

    Norbert

  • With the help of QNX classes in a Flex library project

    In order to deploy on multiple platforms, I'm building my application "headless"; changes of main application based on the OS class, I'm to deploy, but the underlying library remains the same. I have my classes of library in their own Flex library project and specific classes of Playbook in their own project. Currently I can not all classes of QNX to appear inside my library project, but they appear fine in my main application project. I have the main application and library using the Playbook SDK 0.9.1 projects.

    Is there something special I need to do for a project of library in QNX classes, or am I missing something obvious? Thank you!

    Hey,.

    the screenshots that I showed you were from my application for flash builder 4.5 burrito. If the menus are a little different. It's my flash builder 4.0.1 application menu:

    and with libraries extended:

    from the looks of things, your SDK have not installed or is not read correctly. you follow and do all according to the start-up for windows guide? Good luck!

  • How better to organize Flex Builder projects within a source code control system?

    Hello world

    I'm working on a team of average size of a company product developers who will use Flex on the front-end, remote access services for Java objects on the server, etc.

    Right now, I just created a sample application with a Flex Builder in Eclipse project and the use of WTP.

    I'm looking for advice or suggestions on the best way to organize a large Flex/Java project for the team with subversion, etc.

    Is it wise to record all of the Flex Builder project (i.e. files properties etc..)?  Our development environments will be identical, because they will be the virtual computer images.

    I did a lot of research and found a few bites, but I thought I'd see if I could get feedback from other people who have experience with this or are organizing their code source etc.

    Thank you very much

    FortPointUIGuy

    1. Yes. Note that once Java and Flex in the same project, I first had to create a Java project, and then something like Flex Project Nature > add Flex Project Nature. Try to do the reverse (start with a Flex project and add the Java code) worked for me.

    2. it's been great. Franck Wolff, the lead developer, has been very sensitive on their forum (even with stupid questions that were actually my fault). He added that some requested features for as3 Enums, and overall we were pretty happy. We do not actually use the fanciful granite features (other than his actionscript generator gas3 of objects for the AMF client-side); We use it mostly just because we moved to her before the Blaze. However, we have no intention to the flame.

    3. Yes, throw us just jars of granite in our war, although maybe this isn't the right thing for everyone. We have a heavy enough demand, so we can dominate the server simply assume. It worked well for us, althoough I do not think that we have already shared our tomcat with any other web apps, YMMV Yes case.

    And no problem - glad you help.

  • Flex Library Project does not update

    I created a flex library project, but when it is included in another project, I make some mistakes that make no sense.

    Picture 1.png

    The convertTime method so the mxml file present ControlPanel in the library project, but it's like Flex Builder cannot find them.  How can I fix?

    If you had the component in the library to the correct location, but you still have this error then you should check the library properties and see if this component is included in the source. Even if you the component folder, which is not necessary mean that it is included in the final result (it must be checked in the properties of the project where the source files are included).

  • I try to install vista on my laptop but a letter of the key is not visible, all the other parts are very well including the serial code, is there another way to get the key of the other information?

    Taché product key

    Hello

    I try to install vista on my laptop but a letter of the key is not visible, all the other parts are very well including the serial code, is there another way to get the key of the other information? The laptop currently has non-OS I've tried to reinstall.

    Thank you

    Scott

    Product keys are bit-agnostic - they don't care if it's 32-bit or 64-bit.

    However, cannot legally use the recovery disk from one computer to a different constructor machine - as other licenses are not properly paid..

    There is nothing nonetheless to try all possible variations on the absence of character (there are only 25, after all the )

    Other than that, your best option is to contact the manufacturer and order a set of recovery disc for the machine. I do no download available for Vista with SP2 - but you can download Vista with SP1 and create the disc.

    http://www.heidoc.NET/Joomla/technology-science/Microsoft/57-Windows-Vista-direct-download-links

  • I can't change the Actionscript code

    I use Flash 5.0 and the difficulty to modify the Actionscript code.

    I can use the Actions of Frame dialog box to enter the simple Actionscripts, but I can't seem to find my way to a fully editable Actionscript. I go about it the wrong way?

    It was a while that I used Flash 5, but I think that in the top right corner of the Actionscript window is an icon with an arrow above. This allows you to select the "expert" mode I think that you can also type the shortcut: 'ctrl' + 'e '.

    I hope this helps!

  • How can I remove projects including the event attachment and clips?

    I need to create a space on my external hard drive and have tried to delete projects, but no additional space makes its appearance. I tried to delete also a few photos that are in an event, but the original media always seems to be there and it does not have any space free.

    So I need to delete entire projects, including events and clips and also in some projects and events to reduce the amount of clips including the original media. How do I get there?

    I use Final cut pro x and OS X El Captain 10.11.5 version operating system

    Select one a clip in the browser, and then press shift-command-R.

    Will reveal the path to this item.

    Set the Finder in column view all firstly to facilitate the visualization.

    Al

  • How to use the command-line ADT to build an app, iOS, including the ActionScript native extension file

    Hi all

    I have packaged ANE files in my iOS app. I can export their version don't build via FB, no problem.

    But how can I include these DONKEY by ADT command line files? I do like the other files in the library?

    Thanks in advance for any help.

    I was stupid who did not find the proper syntax.

    extdir - extensionsDir will do the trick.

  • How to find the actionscript code?

    Hello. This seems like it should be a simple enough question, but I can't understand it. How can I find the actioscript associated with a movie clip button in a model? I want to make changes to the actionscript, but I can't. I have a MacBook Pro.

    Thank you - Catherine

    Look in Control Panel actions.   You can find a number of things using the movie Explorer pane.

    but I have yet to see a model that was other than anything a non mixed disorder clearly created by someone who has no idea how to program or is competent but intentionally created a mess to prevent others to modify it.

  • Add the new column to Admin tool, including the SQL Code

    Hi all

    I am new to OBIEE and I already searched here in the forum but have not found an exact answer which could help me.
    I have a table in the warehouse where to get information on employees. It's employe_id, manager_id and name.
    Example:
    Employe_id Manager_ID name
    1 Mueller
    2 1 Meier

    Now, I would like to create a new column in the Mapping BI Admin tool business layer and add a SQL where to select the name of the Manager.
    Is this possible? And how can we do it? It will work with a new logical column? Where we add the SQL Code?

    I hope someone can answer my question!
    Thank you very much!

    Kind regards
    David

    OK, I think I got it - the name of Manager is on a separate table (or a search to return to the current table) and your thinking that you want to label your SQL in the report to find the name of Manager based on Director ID, you have?

    If so, import the table with the names of Manager in the physical layer. If this is the same table that you already have (but want to search him in the current table) then you need to create an alias for the current table.

    For each new table in the Phy layer, or an alias - define the join (current_table.manager_id = manager_table_or_aliased_current_table.employee_id)

    Once completed, we will on the source of the logic table in the MDB for this dimension, edit, on the general tab, "Add" and select the table / alias that you created in the phy layer. Click OK - it combines now two tables attached as a source - you can then map the name of the Manager search in your column 'name '.

    Kind regards
    Alastair

  • include the HTML code and COMPONENTS of the ADF

    I used Corel PHOTO-PAINT 12.0 to generate a web menu and I want to include in my project in a jspx page.
    When I paste the code of < table >... < / table > tags < af:form > < / af:form > a mess to the page in the browser.

    But if I only use html page looks in good condition. I need you use the HTML for the menu and I need use adf compont to display another given.


    my version of JV is 11.1.1.6.0

    Hello

    try to put your HTML inside cdata like this

    Google
    ]]>
    

    Kind regards

  • The easier way to distribute to run in a simulator without including the source code?

    I have a client who is not a device to test my application, but want to test it in a simulator in Eclipse. What is the best way for me to offer something easy to install without giving up all my source code (before I was paid for it).

    I have, for customers who do not have any BlackBerry installed, zipped high back full Simulator that contains my request.  The user just need to "unzip" the directory to a known location, and then click the *.bat file in the directory to launch the Simulator.  My cod being already in the device, this means that there is no installation required.  In addition, you can preconfigure it, then zip - up the directory, so the user can even have your icon in the Favorites or on the home screen.

    This assumes that you have Java installed.  And the directory is not small.

  • Is it possible to have the ActionScript code in a MovieClip affect stocks in other clips?

    Hey everyone, I need help in being pointed in the right direction. What I'm trying to do, it is write ActionScript in a nested movieClip and have it affect the clip it is nested in, or even the main timeline. An example would be:

    Instance of MovieClip "B" is nested inside the MovieClip Instance 'A' which is located on the main timeline. I want him out when the user clicks on the button '1' MovieClip 'B' to stop the timeline in MovieClip 'A', but if the user clicks on the '2' button in MovieClip "B" it will make the game of the chronology of the hand.

    If anyone can help me get started with what I am doing, I can probably research the rest.

    Thanks in advance!

    -DJ

    You can use: MovieClip (root).mcNameEtc.play ();

    Although there is a correct way more OOP to talk to parents of children.  If you do it, is to have the child dispatches an event.  Just like other listeners, in the main scenario an event listener is assigned to the child movieclip to listen to this custom event and which in turn calls the event handler to react to the event.

  • How can I fix the error code not 32 bit file extension trying to download itunes?

    uninstalled itunes and now can't reinstall Guard giving error code 32-bit file extension. Have treid all that I can think of, can someone help please?

    Hello

    Follow the information from apple to the link below

    Remove and reinstall iTunes, QuickTime, and other software components for Windows Vista or Windows 7

    http://support.Apple.com/kb/HT1923

    and or ask for their support of itunes

    http://www.Apple.com/support/iTunes/

    Also try the discussions of apple itunes

    http://discussions.Apple.com/category.jspa?categoryID=149

Maybe you are looking for

  • X 1 carbon (1st generation) SSD upgrade party purchase

    Hello There is an earlier discussion on the SSD upgrade 1st generation carbon x 1, up to 256 GB. Someone mentioned two specific models with exclusive SSF form factor on this machine. I did a google search and can't find anywhere to buy. This is the m

  • Cancel advanced repair service

    One of the moderators on here can you please cancel my order of repair and remove it from my card, this process takes too long.

  • On the digital unit of string conversion

    Hello world I'm trying to convert a digital control with min as a unit to a string. The fact is that it converts in seconds before it updates the channel indicator. I noticed that the format "in channel" will convert always first to the base unit (un

  • LaserJet Pro CP1025 NW: print

    Whenever the printer use paper for labels, alignment of the ink won't. The printer prints well on paper for labels. How can I fix? Thank you.

  • Update failed for Windows Vista failed KB975517

    I get the same message update failed