Flash CS5 - document class relative path & package location

It seems I have no trouble pointing an FLA's document class to my project's class package when the FLA is at the same root level as the package's top-level directory. However, if the FLA is nested in a sub-directory, then relative paths to a class nested in the package will not work.
example package & class location : com.company.project.ClassName
Case1 :
Package location : \MyProject
FLA location : \MyProject
where document class path is : "./com/company/project"
Case 2 ( does not work ) :
Package location : \MyProject
FLA location : \MyProject\MySubFolder
where document class path is : "../com/company/project"
If someone can provide an explanation as to why nested FLAs can't point to custom packages in parent-level directories, OR demonstrate how this can be done, it would be much appreciated.
Now that I think on, both paths are relative, which makes this more confusing.
Thank you.

You are correct.
I'm setting the "Document class" of an FLA file to a custom Class.
The class is embedded/nested in the package directories of my project.
The FLA is nest not at the same level as the root of the package, but in a sub-directory.
Therefore, I need a relative path to point to the parent directory, then to the package.
The occurs in both Win and Mac.
I'm almost expecting someone to say FLAs can only point to packages in the same directory, but does not seem correct. Application-level classpaths can reference anywhere on your system, but are global. Document-level classpaths should be able to point to relative paths since a project needs to be portable, right? See attached image for example.

Similar Messages

  • Flash CS5 + DatagramSocket class error

    As you all know, Flash CS5 is now released. It is confusing me as AIR2.0 is still in beta.
    I tried to use DatagramSocket class but failed
    import flash.net.DatagramSocket
    Up to this point, evrythings ok
    var ds:DatagramSocket = new Datagramsocket()    
    FAILED.
    VerifyError: Error #1014: Class flash.net::DatagramSocket could not be found.
        at runtime::ContentPlayer/loadInitialContent()
        at runtime::ContentPlayer/playRawContent()
        at runtime::ContentPlayer/playContent()
        at runtime::AppRunner/run()
        at global/runtime::ADLEntry()
    I tried replacing the air2 beta 1,air2 beta 2 as stated in the release note but it still fialed..
    Any idea anyone?
    Message was edited by: exerter

    Please check the following links for some answers
    http://blog.tukker.org/2008/05/23/flash-cs3-error-initalizing-java-runtime-environment/
    http://www.actionscript.org/forums/showthread.php3?t=214122
    http://wiki.answers.com/Q/Error_initializing_java_runtime_environment_you_may_need_to_rein stall_flash
    I think the idea is that Flash AS3 compiler needs JRE to compile swfs, so please update to the latest JRE version for CS5 to work. You would not need to install, CS5 Flash again and again.
    Karthik

  • Importing Flex project into Flash CS5 for use with iPhone packager? Please Help.

    Hi all,
    I have been developing an application in Flex builder for the iPhone using the iPhone packager, where I've been using the Flex framework.
    Now I'm stuck at trying to use my existing libraries in Flash. It seems I can't add the UI components I used in Flex (class VideoExample) to the default Flash container. I need someone's help who has experience with that.
    I have created a .SWC file, but when I'm trying to add the container in Flash using addChild(new VideoExample) it doesn't work. I can't load the .SWF externally using loader.load() at runtime, because the application is for iPhone. Any solutions how could I import the project to Flash?
    I was thinking about changing the UI components classes from mx.* to fl.*, but I would have to change many code and I'm not sure if it would even work, and I don't want to loose compatibility with mxml.
    Please respond, help would be very much appreciated!
    Here's my mxml wrapper, from which I start the main application:
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" applicationComplete="EntryPoint.main()">
    </mx:Application>
    Then I have a class which creates the main container:
    package {
    import mx.core.*;
    public class EntryPoint {
        public static function main():void {
            var client:VideoExample = new VideoExample();
            var mxmlApp:Application = Application(Application.application);
            mxmlApp.addChild(client);
    Here is the main class VideoExample:
    package {
    import mx.controls.*;
    import mx.containers.*;
    public class VideoExample extends Canvas {
        public function VideoExample() {
            super();
            init();
            private function init():void {
            loadImage();
            loadText();
                    loadDisplay();
                    startConnection();

    This forum is for Flash Media Server Developers so most likely you migth get much traction here. I would recommend you to post your query on Flash Builder forum: http://forums.adobe.com/community/flash_builder/using_flash_builder
    Also you can try posting here:
    Flash Platform Services For Promotion - http://forums.adobe.com/community/promotion
    Flash : http://forums.adobe.com/community/flash/flash_general

  • Document Class vs Timeline code differences...

    I'm trying to hunt down some kind of class conflict I seem to be having when using TweeLite easing and found out the same code that errors in a document class works fine if I place it in the timeline.
    Example - this works in frame one of the timeline:
    import com.greensock.TweenLite;
    import com.greensock.easing.*;
    TweenLite.to(obj, 1, { x:200, ease:Bounce.easeOut } );
    If however I make a very simple document class like so:
    package
          import com.greensock.TweenLite;
          import com.greensock.easing.*;
          import flash.display.MovieClip;
          public class Main extends MovieClip
               public function Main()
                    TweenLite.to(obj, 1, { x:200, ease:Bounce.easeOut } );
    I get an error when compiling:
    1119: Access of possibly undefined property easeOut through a reference with static type Class.
    So what's the differences between using a document class and timeline code?

    Odd... seems to have been a caching issue. I renamed the class, rebooted, and deleted ASO files and now it's working. Funny thing is that I never need to delete ASO files before... any thoughts on why this would stay cached?
    And, after rebooting I can make changes and don't need to delete ASO files either.
    Thanks!

  • Document Class initialising Application

    Hi
    I have started learning AS3. One thing I seem to be missing
    the point over is the following:
    I have a Document Class as follows:
    package {
    import flash.display.*;
    import com.Application;
    public class EntryPoint extends Sprite {
    public function EntryPoint() {
    var app:Application = new Application();
    The document class creates an instance of the Application
    class
    package com {
    import flash.display.*;
    public class Application extends Sprite{
    public function Application() {
    var mc_root:Sprite = new Sprite();
    addChild(mc_root);
    var circleTest:CircleTest = new CircleTest();
    mc_root.addChild(circleTest);
    CircleTest is a library item that has a class reference of
    'CircleTest' and a Base Class of 'flash.display.Sprite'.
    I can only get the above working if the code is in the
    Document Class.
    Help would be greatly appreciated
    Thanks

    Hi. Without looking closely, I'd think the problem is that
    you're adding the circle to the app, but not onto the document
    class instance (and neither is app added as a child to your main
    class)
    so the circle is just in limbo.
    You can look at the diagram in Flash Help- under: Basics of
    display programming

  • Flash CS5 File Size 1800% larger than CS3/4

    We have 500+ FLAs that are essentially a sequence of PNGs loaded into the timeline, with a bit of AS3 code thrown in for the controller.
    If we import the PNGs into a new, empty Flash CS3/4 document, add the document class and save the file, the resulting .fla is approx. 800Kb.
    If we import the PNGs into a new, empty Flash CS5 document, add the doc class and save the file, the resulting .fla is 18Mb.
    The resulting Published SWFs are within 1Kb of each other regardless of version, so it's clearly nothing to do with the content or the exporter.
    Anyone know what's going on? This has just jumped our storage requirements through the roof.
    Thanks
    T

    Update: in case anyone asks, the total size of all PNG assets is about 2.5Mb. Clearly CS3/4 is using some kind of RLE compression on the PNGs, which is fine. But that doesn't account for the additional 16Mb. What the heck is CS5 throwing in there?

  • Menu using relative paths

    Hi, I have flash menu all using relative paths to the html
    files. I also have some files in a separate folder for
    organization. I add the folder paths to get to the html files
    within the folder, but when I get into that folders file, i cant
    get back out. If I add ../ to the other files, it of course brings
    me out, but cant get to the other files. I hope that makes sense,
    Should I just use absolute paths?
    file.html
    /folder/file.html
    otherfile.html
    thanks,
    Josh

    absolute would probably work best.
    When a link brings you into a folder (/folder/file.html), if
    the same set of links is there and you click a link that is
    supposed to bring you to home (index.html), it tries to open
    (/folder/index.html), not index.html. Make sense?
    Thanks,
    Josh

  • Adobe Flash CS5 - Using Relative Paths

    Hiya Guys, I'm relatively new to Adobe Flash CS5, bu have managed to create an index.swf to link together all my work for this project I've just completed. However, the index.swf, along with all my other files will be relocated, as in burnt onto a CD or moved onto a USB. When the file directories change, the links obviouly break, so I needed some help setting up some relative paths for my files so that they don't break. All my files are stored under a PROJECT file, this then consists of five other folders, consisting of subfolders and each of these subfolders have their own documents. So for example, PROJECT\PARTONE\DATABASES\Database.accdb
    I have used absolute file paths, but they keep on breaking when moving directories. Can someone PLEASE help?!

    Well I did use actionscript for creating the actual index and effects, but AS3 was used no further for the index. I created an index which had links Part 1, Part 2 ,3,4,5 and clicking on each of them lead to different frames (using the mouseclick, goto and stop at frame (x) function.) Clicking on part one for example would lead to list of documents in that part. Sorry I can't be of any help, I'm totally new to this

  • Unable to save document as (Flash CS5 - BUG - OSX)

    I have upgraded my CS4 to CS5 on MAC OSX and i'm having problems saving new and existing fla files. It doesnt always do it but it's very anoying when you have done some work and are unable to save it.
    I get this message:
    unable to save document as (file name)
    please try saving to a different filename or location.
    even if i try to save as to a different location i get the same message, this ONLY happens in flash CS5 and does not do it on any other application or even flash CS4. To put it bluntly i am absolutely furious with this and when you pay this amount of money should not get this hassle for such a simple action.
    I have tried phoneing the adobe support line and it's a joke, you can't even understand the operator to even get anywhere and i just gave up having to repeat myself and asking them to repeat themselves.
    I would be grateful if someone out there knows an answer to this or have a contact email for adobe support that i can email them direct. As a flash developer it's critical i can get on with my work without worrying if my work will even save.
    Thanks in advance.
    UPDATE: I can save files in CS5 as CS4 documents but not as CS5, this is so annoying.

    I am having this same issue with Window 7 Professional 64 bit.
    It seems I can reproduce it pretty reliably but have only seen it since I started working with trying to import and export runtime shared font libraries.
    I create a new fla
    I create a font asset in the library and set it to import and specify a relative path to the shared swf.
    I save and test my swf and it works.
    I go back into the font asset and change the location of the font swf to another relative path (this file is loaded into a shell so the raltive path will change).
    After changing that import path I can no longer save the file even if I revert back to the previous value.
    I have repeated this process a couple of times.

  • Flash CS5 Could not load scene into memory. Your document may be damaged.

    Hello everyone!
    Just bought the new CS5 Flash and was eager to begin my first document. I opened a new document Saved As to begin and then setup my basic page with only one imported graphic. Hit Save and received an error message: Could not load scene into memory. Your document may be damaged. When I closed and reopened the document this same error appears twice in my Output Menu.
    I have noticed other people with several of simular issues and am not sure where to start to find an answer. Any help is greatly appreciated.
    Thanks in Advance,
    Biddler1

    Thought I'd add to this since I have a file with a similar problem. I'm carrying the files home to work on in the evening. I've noticed at work that when I update an image in the library flash shows me a path going all the way out to the root of the network share and then back to the file. The file is just one folder away. Maybe Flash has recorded an absolute path instead of a relative path to the asset.
    At home, Flash can't find the asset at all since it's recorded a non-portable path.
    The question is, if the asset has been imported to the project file, why is flash checking the original in the first place?

  • Question about flash CS5 working with TLF TextField & self document preloader

    Hello everybod,
    I am working on a project that document type of it is Flash CS5. I have an Document class that attached to my fla file.
    in it i create a self document preloader like this :
    Class Document :
    package Codes
         import flash.display.Sprite;
         import flash.display.StageAlign;
         import flash.display.StageScaleMode;
         import flash.events.ProgressEvent;
         import flash.events.Event;
         public class MainDoc extends Sprite
              public function MainDoc ()
                   // stage setting
                   stage.showDefaultContextMenu = false;
                   stage.align = StageAlign.TOP_LEFT;
                   stage.scaleMode = StageScaleMode.NO_SCALE;
                   // stage methods
                   this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, progressHandler);
                   this.loaderInfo.addEventListener(Event.COMPLETE, completeHandler);
              private function progressHandler (e:ProgressEvent):void
              private function completeHandler (e:Event):void
    it works true. but when i insert a TLF TextField, i get an error like this
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
         at Codes::MainDoc()
    Please help me. i dont know what should i do & where is the problem.
    I am waiting for a replay.
    Thanx every body.
    Mehran Hadidi
    [email protected]

    Hi Alan,
    Thanks for the very speedy response!!
    That worked, cheers.
    Just for the record, if you are having a problem accessing your FlashVars (and you are using a TLFTextField in Flash CS5) and you are using external classes (i.e. you have a document class and not timeline code) you need to listen for the ADDED_TO_STAGE event before trying to access them.
    For example ...
    package
        import flash.display.Sprite;
        import flash.events.Event;
        import flash.display.LoaderInfo;
        public class Main extends Sprite
            public function Main():void
                if (stage) init();
                else addEventListener(Event.ADDED_TO_STAGE, init);
            private function init(evt:Event = null):void
                removeEventListener(Event.ADDED_TO_STAGE, init);
                var params:Object = loaderInfo.parameters;
                if (parent != null && parent.parent != null) {
                    params = parent.parent.loaderInfo.parameters;
                // You can now loop through the params to access your FlashVars
    I hope this gets fixed soon. It seems like a big oversight.
    Regards,
    Adrian

  • Relative path to file in servlet class file

    Hello,
    I have several classes running as a Tomcat Servlet on my server. However, I have one class that I would like to access a file on the server.
    The problem is, what path do I use? I want to use a relative path as the servlet might be moved and I don't want to recompile each time the servlet is moved. For instance, I placed the file in the servlet directory under webapps in the same level with the WEB-INF directory. However, using "../../text.txt" does not seem to access it.
    What path should I use?
    Thanks in advance.
    Chris

    This is what I have done:
         String FS = System.getProperty("file.separator");
         String ctx = getServletContext( ).getRealPath( "" ) + FS;
         URL url = new URL("file", "", ctx +   "somefile.txt");
         //Create a BufferedReader for reading the inputstream.
         BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));This gets you back to the "root", or one level above WEB-INF. Add the folder name where the file is located. As in      URL url = new URL("file", "", ctx +   "theFolder/somefile.txt");HTH,
    WalkGood

  • Native package for Mac and relative path

    Hi,
    I done a small application with Javafx that start an Embedded Jetty. All works fine in Windows also with native package. Instead in Mac it works only before native packaging. Seems that the problem is how relative path are considered.
    The tree of the content is this:
    myfile.jar
    webapp (folder)
    libs (folder)
    Look at this code:
                    String webAppDir = "webapp";
                    File f = new File(webAppDir);
                    log.debug("Path webapp folder: " + f.getAbsolutePath());
                    if (!f.exists())
                        throw new Exception("The folder " + f.getAbsolutePath() + " doesn't exist");
                    if (!f.canRead())
                WebAppContext context = new WebAppContext();
                context.setContextPath("/myapp");
                context.setResourceBase("webapp");
                context.setDescriptor("WEB-INF" + File.separator + "web.xml");
                context.setSessionHandler(new SessionHandler(sessionManager));
                        throw new Exception("La cartella " + f.getAbsolutePath() + " non è leggibile");
    The problem is that before the packaging in Mac the relative path is that where the main .jar is located an so the code works because the webapp folder is found. Instead after the bundle the path became /Users/MyUser/webapp and of course the folder is not found because it is bundled inside the file.app near the libs folder.
    Someone can explain me if this behaviour is due to JavaFx packager and how I can solve the problem in a elegant way?
    Thanks very much

    Some good soul has any idea?
    Thanks

  • Flash breaks randomly, won't compile, ignores document class?

    I have run into a strange and annoying problem since updating to Flash Professional CS5.5 on my work computer.
    Sometimes, seemingly randomly, Flash stops compiling things correctly. I Test Movie by hitting Cmd+Return and it just displays what's on the stage, frame 1. The document class is never initialized, no errors at all, no trace statements print out; it acts as if there is no code at all. After this happens once, it will continue to do this until I restart Flash, which fixes the problem. However, restarting Flash every 10 - 15 minutes is very annoying.
    It seems to happen regardless of what project I'm working on or what state the project is in (i.e. if the code contains errors or not). All of our projects use external AS3 classes (no code on the timeline).
    Has anyone else encountered this problem?
    I'm using an iMac running OSX 10.6.8.

    I haven't run into this with CS5.5 yet, but it used to happen to me all the time in CS4.  Simply moving the .fla to a different folder (and make sure it publishes to a new folder) solved the problem every time.  In CS5.5, prior to the recent update to CS5.5.1, I would also sometimes have my exported swf not reflect changes I made.  I fixed that by first saving as xfl, then resaving as fla. 

  • Get the relative path for java class

    How to get Relative path for java class which is inside in web-inf directory in webapps

    ajay.manchu wrote:
    Hi gimbal2,
    My Requirement is i need to run a java class from batch file,when i created batch file in that i need to mention the complete path of the java class,so instead of mentioning that i want to provide only java class name,thats why i asked that one..
    can u help me regarding that....
    Thanks in advanceI wonder how that would work then. Let's take a fictive example. You have a class com.mycompany.myapp.Foo. This would mean that the class is stored in some directory like this:
    c:/webrootdir/myapp/WEB-INF/classes/com/mycompany/myapp/Foo.classTo be able to run such a class from the commandline using Java, you would have to invoke this command:
    java -cp c:/webrootdir/myapp/WEB-INF/classes com.mycompany.myapp.FooHow would knowing the exact path to this class help you?

Maybe you are looking for

  • Problem installing HP Printer driver hplip-3.10.9

    I am trying to install the printer driver for my HP Laserjet p1102w (hplip-3.10.9.run).  The program starts then stops with the error "TabError:  inconsistent use of tabs and spaces in indentatiion".   I did some research,  but it could not resolve t

  • File adapter content conversion

    Hi all,   We are having File to File Scenario   We are facing problem in Content conversion in File   Adapter(Sender)   The source file is in text format and fields are   seperated by '|' character   The source file structure is :   Header|No. of Rec

  • Touchsmart 9100; error 0x80072ee4; troubleshooting wizard error; system event notif. svc. error

    HP Touchsmart 9100 all-in-one Windows 7 professional First I get a window that says failed to connect to a window service --windows could not connect to the system event notification svc. This problem prevents standard user from logging into the syst

  • Bandwidth and Police command

    I have seen this config in one of the examples in cisco site policy-map mqcp class hub bandwidth 200 police cir 5000000 Please help in understanding the bandwidth and police command setting in this example

  • How to open a link created from a document on my Mac?

    I used the old Page to create a list of recipes in which i inserted links to the files kept in my laptop. So everytime i wanted to cook something, i just opened the listing file and click on the recipe(s) i want and got dirrected to the recipe(s). Bu