Flash CS5 - relative path of the document class and the location of the package

It seems that I have no trouble to my class a FLA document class project when the FLA is the same root in the root directory of the package. However, if the FLA is nested within a subdirectory, then paths relative to a nested class in the package will not work.

location of package & sample class: com.company.project.ClassName

CASES1:

Package location: \MyProject

The FLA location: \MyProject

where is the path of document class: ""./com/company/project " "

Case 2 (does not work):

Package location: \MyProject

Location of the FLA: \MyProject\MySubFolder

where is the path of document class: "... / com/company/project"

If someone can provide an explanation as to why nested FLAs cannot point to custom packages to parent directories level OR show how this can be done, it would be much appreciated.

Now that I think about, the two paths are relative, which makes it more confusing.

Thank you.

It works for me: http://www.kglad.com/Files/forums/tt.zip

Tags: Adobe Animate

Similar Questions

  • Flash CS5 how to set the path relative library SWC file?

    This should be simple but apparenlty there does not work or I'm doing something wrong.

    I downloaded the tweener.swc of their google project page I create my fla file place it in a folder and put the tweener.swc file in the same folder.

    I'll ActionScript settings > library path > hitting the button + > I have type the relative path that should be just tweener.swc or don't know but just a point (.) or / for all classes and libraries in the same folder where the fla.

    But he said: it can not load the CFC or my imports are not classes. So what I am doing wrong?

    P. S.

    With the absolute path, it works.

    It's weird that I got here.

  • Relative paths of the gateway requirements

    So I am using requirements gateway for a little while now and I are one of several developers to use, or one of the many people now the documents it contains.  We keep the Gateway project control requirements of source code with the documents and the project code in that respect.

    We met one of the problems was that this gateway requirements is configured as an absolute path if the path is not under the gateway requirements project path.

    Let's say I have a directory like this structure.

    \Requirements Gateway\ Q:\Project\Project [x]

    [X] Q:\Project\Project [x] \Project Documentation\

    Q:\Project\Project [x] Code\ [x] \Project

    When you add documents to the gateway requirements project it will add them however travel.  So if another developer gets the source on the V:\ drive control then it can not find documents or code.  We found that you can manually change the path of the documents to have a relative path by editing the .rqtf file manually in a text editor.

    Finally the problem.  This solution does not work for code TestStand or paths of LabVIEW code... why?  If I replace "[x] [x] Code\ \Project Q:\Project\Project"with"[, \Project[x] Code\ ' in the .rqtf project file and then open the project, it will say file not found.  The file may have been moved or deleted.  But all the documents that are configured to have relative paths work fine.

    Can someone tell me how to get access roads-related work for LabVIEW and TestStand code in Gateway requirements?  Thank you.

    Hooovahh-

    It is currently a lack of functionality for our types of TestStand and LabVIEW OR gateway 1.1 requirements. This is something that will probably fix us in the next version or Gateway requirements.

    Thank you for that bring to our attention.

  • link with the relative path includes the root folder

    I hope someone can help me. When I convert a Word to PDF file with a path relative to another document, a reason any Acrobat includes the directory root with the path if the link does not work. Even when I try and change the link using Acrobat Pro and save the document, the system adds the default root directory. What is happening with this?

    example:

    Directory with the file/subdirectory with file/sup under directory with the file / / my document.pfs

    site to register:

    C: / / my documents /.

    Directory with the file/subdirectory with file/sup under directory with the file / / my document.pfs

    solved my problem. I removed the links in the word document and then created in Acrobat. It worked.

  • (CS5 JS) Path of the XML with Accents, etc.

    Long as I need to ask a question, but I'm stuck on this one.

    I have a database of names (~ 10 000), and many of these names have accents etc. Each name has their own path for a picture and this picture is imported into my models through XML using a JavaScript script. Unfortunately, when I upgraded to CS5 my XML would see is more accents and others, on the contrary it would replace these characters with Chinese characters.

    This is the XML code that worked in CS4 (Windows 7 platform).

    "" < PHOTO href = 'file://prod/VEC/BulkCandidatePhotoImport/Borough of Helene.bmp of the Borough of Queenscliffe 2008 / Queenscliffe Council/BUTLER, Hélène/BUTLER, "/ > < / PHOTO >

    Here is the XML that CS5 export if I have data in the model, so that it works in CS5.

    "< PHOTO href ="file:///V:/BulkCandidatePhotoImport/Borough%20of%20Queenscliffe%202008/Queenscliffe%20Boro ugh%20Council/BUTLER%2c%20H%c3%a9l%c3%a8ne/BUTLER%2c%20H%c3%a9l%c3%a8ne.bmp "> < / PHOTO>"

    As you can see CS5 added a load of mapping of characters in the path of the file.

    My question is. Code/adjust cela so my version CS4 works in CS5?

    Please let me know if there is more information that is required, thank you.

    Kind regards

    Brett

    Hi Brett,

    Try to use decodeURI() and encodeURI() instead of escape() and unescape()

  • Relative path in the class

    ActionScript 2.0:
    class MyClass {}
    public obj:Object = new Object(), myxml:XML = new XML();
    public function myclass() {}
    myXML.Load('test.) XML');
    obj.Test1 = 1; This works because flash found object "obj".
    myxml.onLoad = {fucntIon()}
    obj.test2 = 2; do not work because the flash doesn't have a found object "obj".
    This._parent.obj.test2 = 2; do not work
    }
    }
    }
    What script to create variable object "obj" in xml-event 'onLoad '?

    first import the delegate class

    Import mx.utils.Delegate;

    Then, create a function in myClass to do the work of onload.

    class MyClass {}
    public obj:object;
    public myXML:XML;
    public function myClass() {}
    myXML = new XML();
    myXML.onLoad = Delegate.create (this, myOnLoad);
    myXML.load ("test.xml");
    }
    public void myOnLoad(success:Boolean) {}
    trace (obj);
    trace (Success);
    }
    }

    ©®

  • Import of Flash CS5 Pr which is the best?

    I look around the web for it, there's a tute which exists in adobe.tv, but there must be a lot of people on the site because it does not load. I checked the forum and I see a few ways to do this so I want to know the differences (quality) or it does not matter.

    Real simple, I have to drop a flash swf, flv or converted to Quicktime in a creative project. It's a second 20 an animation loop. I read I can convert the fla in flv plug a drop which convert the SWF to a third party and which fall, convert .mov and drop that. Can someone let me know what is the way to go here?

    THX

    RD

    I can tell you what I remember doing about 5-6 years, when I need flash animation combined and edited for the TV show, I was working on...

    I remember that I used the flash, loaded file in the FLASH APPLICATION (while it wasn't ADOBE yet, but I got it sort - now it's even easier), and in the FLASH APP scenario I exported this 'film '...

    I remember he had this option - it wasn't under the path FILE-EXPORT. But somewhere, under a tab further to the right (as I recall)...

    And I remember at the time it was the best quality of this flash file I have to work with it first and edit with video...

    Just point to it - it was the era of DV and DVcam - and this is the Format in which I exported my flash files in and also my camera footage was DVcam as well...

    So, if you have all of CS5, try importing flash into ADOBE FLASH and export it as a video here... Although, it is probably possible to place it on the timeline as native flash first today, maybe he still gives a different (better) quality result or gives you additional options to put the flash in video file!

    Just a hint!

    Happy new year and good luck to you!

  • preloading swf with document class and get the error #1009

    Hello

    I'm learning flash and uploaded a sample of adobe with its mix of channel.

    http://www.Adobe.com/devnet/ActionScript/samples/media_5.html

    Now, I'm learning to preload the swf.  I use an external script preloader which show the charge percentage, however, when I run it, I get the following error:

    TypeError: Error #1009: cannot access a property or method of a null object reference.

    to code.soundclasses::TrackChannel()

    at flash.display::Sprite/constructChildren()

    at flash.display::Sprite()

    at flash.display::MovieClip()

    code: Media5()

    The example of sound channel exports very well on its own, but in the preloader script, it gives the above error.  Here's my preloader script:

    import flash.display.Loader;

    to import flash.events.ProgressEvent;

    var l:Loader = new Loader();

    l.contentLoaderInfo.addEventListener (ProgressEvent.PROGRESS, loop);

    l.contentLoaderInfo.addEventListener (Event.COMPLETE, done);

    l.Load (new URLRequest ("content.swf"));

    function loop(e:ProgressEvent):void {}

    var perc:Number = e.bytesLoaded / e.bytesTotal;

    percent.text = Math.ceil(perc*100).toString ();

    }

    function done(e:Event):void {}

    removeChildAt (0);

    p = null;

    addChild (l);

    }

    Any help would be greatly appreciated.  Thank you!

    Click on publish files/settings/flash and check the box "enable debugging" in the main swf file.  Repeat the test.  the line of code (which is soundclasses) problem will be in the error message.

  • Connecting a Flash that already has a class inside the Document class

    I'm working on this little project to demonstrate how flash works in a few friends and I'm doing a small avatar have some animation and mouse grow of the reversal and after having removed the mouse the avatar will decrease. It is believed also to be a message displayed on the avatar and clicking on the avatar, the message changes. I have the shrinkage/growth avatar thing done and his works well and I also have the message that will be displayed, but I can't seem to link the two in a single actionscript file so that both appear at the same time.

    Here are the codes:

    (i) for the avatar narrowing/culture

    package {}
    import flash.display.MovieClip;
    import flash.events.MouseEvent;
    SerializableAttribute public class U1A3_Stickman extends MovieClip {}
    private var _origXScale:Number;
    private var _origYScale:Number;
    public void U1A3_Stickman() {}
    _origXScale = This.ScaleX;
    _origYScale = This.ScaleY;
    this.addEventListener (MouseEvent.ROLL_OVER, grow);
    this.addEventListener (MouseEvent.ROLL_OUT, shrink);
    }
    private void grow(event:MouseEvent):void {}
    this.scaleX * = 1.5;
    this.scaleY * = 1.5;
    }
    private void shrink(event:MouseEvent):void {}
    this.scaleX = _origXScale;
    this.scaleY = _origYScale;
    }
    }
    }

    (II) for the message:

    package {}
    import flash.display. *;
    import flash.text. *;
    SerializableAttribute public class U1A3_HelloWorld extends MovieClip {}
    public void U1A3_HelloWorld() {}
    var myMessage:TextField = new TextField();
    var myFormat:TextFormat = new TextFormat();
    myFormat.font = "Arial";
    myFormat.size = 30;
    myFormat.bold = true;
    myFormat.color = 0xFF0000;
    myMessage.x = 100;
    myMessage.y = 50;
    myMessage.autoSize = TextFieldAutoSize.LEFT;
    myMessage.border = true;
    myMessage.defaultTextFormat = myFormat;
    myMessage.text = "What upward! \n I'm so hostage! « ;
    addChild (myMessage);
    }
    }
    }

    I tried to simply insert the document class in flash with the code of reduction/increase of avatar, but it does not work. Any help would be appreciated!

    Assuming you have three U1A3_Stickman.fla files (with the rsp as file as a document class), U1A3_HelloWorld.fla (with the rsp as file as a document class) and a main.fla in one folder. Publish the first two FLAS under swf, then use a charger in the main.fla to load both on stage.

  • How to read the .txt adfLib pot file to the model layer by using the relative path

    Hello

    In my application, I use the ExtendedDynamicFldTbl (extends weblogic.wtc.jatmi.DynamicFldTbl), which the manufacturer requires the field file path table as a parameter.

    In the API, it is said that this name of path can be an absolute path, a relative path to the directory where Java has started, or a relative path that can be found as a resource on the classpath.

    I have created this ExtendedDynamicFldTbl to the model layer project, placed the fild_tbl.txt in a separate package and pass the path relative to the DynamicFldTbl constructor.

    Given my code below to get the instance of ExtendedDynamicFldTbl
    package model.tuxedo;
    
    public class ExtendedFldTbl  extends DynamicFldTbl
    {
    
        private static ExtendedFldTbl extendedFldTblinstance = null;
        
        public ExtendedFldTbl(String tablePath, boolean flag)
        {
            super(tablePath, flag);
        }
        
        public static ExtendedFldTbl getInstance()
        {
            if (extendedFldTblInstance == null)
            {
                URL url = extendedFldTblInstance.class.getResource("resource/fldtbl.txt");
                if (url == null)
                {
                    throw new RuntimeException("Tuxedo Service : fldtbl.txt is not found in the path 'model.tuxedo.resource' ");
                }
                extendedFldTblInstance = new ExtendedFldTbl (url.getPath(), true);
                String[] list = extendedFldTblInstance .getFldNames();
                System.err.println("fldtbl loaded. Total FML entries loaded = " + list.length);
            }
            return extendedFldTblInstance ;
        }
    }
    I just added the output of the build of the layer model to view the project of the layer and tested. It works fine and I am able to get the ExtendedFldTbl instance with all loaded fields. But rather than add dependencies, if I create an adfLibJar for the layer model project and you add to view the project of the layer, it does not work. It is not ablt to read the file of adf lib jar file.

    Issues related to the:

    1. How can I solve this?
    2. Although I have kept the field text file table in the source of the project itself, when I read the url, it is
    "C:/Documents and Settings/raguramanv/Application Data/JDeveloper/system11.1.1.4.37.59.23/DefaultDomain/servers/DefaultServer/tmp/_WL_user/SampleWtc/3gkmt9/war/WEB-INF/lib/SampleWtc_Model_adflibSampleWtc1.jar!/model/tuxedo/resource/fldtbl.txt"
    Instead of the physical directory, how can I use application in model layer context?


    Thanks in advance

    Rambeau

    Hello

    Try /adf/ or /afr/ in the URL. Then includes the ADF resource loader which is used to get the contents of a lib of the ADF. Take a look at the structure of ADF library where the file is located in. It should be in a directory with /adf in the folder structure

    Frank

  • Changes of relative path to absolute path when creating a child of the model

    Hello

    I found very useful model Dreamweaver features and was doing well until I created a child by selecting the Site template and the template file in the new Document dialog box to discover the following problem:

    In the template file, a path appears as follows:

    "" < link rel = "stylesheet" type = "text/css" href = ".. /.. / common/css/all.css">

    However, in the case of the child, the same path has changed to the following:

    "< link rel ="stylesheet"type =" text/css" href="file:///D|/xampp/htdocs/xyz.com/common/css/all.css ">

    I want to retain the same relative path in the child's file. Please advise me how it can be maintained.

    Thanks as always,

    EAD

    In the template file, a path appears as follows:

    " href =".. /.. / common/css/all.css '> '.

    It is not possible for a link appears like this in your model. This is because the template MUST be in the templates folder, which is at the root of the site. A single deep folder level, it is only possible to go UP one level to look for any other file/folder in the site. But your link says to go up TWO levels! Something wrong here. Is your template in the Templates folder? Is - this folder at the root of the site?

    Furthermore, Ben's response is quite accurate. Given that DW does not know when your page of the child should be registered, it cannot create the link until it is saved.

  • class does not not with the document class

    I created classes that is available to my level. So level 1 includes a table like:

      floor1[0] = [2,1,1,1,1,1,2];
      floor1
    [1] = [1,1,1,1,1,1,1];
      floor1
    [2] = [1,1,1,2,1,1,1];
      floor1
    [3] = [1,1,1,1,1,1,1];
      floor1
    [4] = [1,1,1,2,1,1,1];
      floor1
    [5] = [1,1,1,1,1,1,1];
      floor1
    [6] = [2,1,1,1,1,1,2];

    And level 2 would contain a different as configuration:

    Floor2 [0] = [1,1,1,3,1,1,1];
    floor2[1] = [1,2,1,3,1,2,1];
    floor2[2] = [1,1,1,3,1,1,1];
    floor2[3] = [1,1,1,2,1,1,1];
    floor2[4] = [1,1,1,3,1,1,1];
    floor2[5] = [1,2,1,3,1,2,1];
    floor2[6] = [1,1,1,3,1,1,1];

    Here's my problem. These classes are not connect with my document class. My document has an empty array named createFloor which will equal level 1 first. Once this level is completed, it will be equal to floor2 and so on. The code is below:

    for (var y = 0; Y < createFloor.length;. Y++)

    {

    for (var X:int = 0; X < createFloor [Y] .length; X++)

    {

    var cell: MovieClip = new Tile (X, Y);

    cell.gotoAndStop(createFloor[Y][X]);

    Cell.x = ((X-Y) * tileh) 365;

    Cell.y = ((X+Y) * tileh/2) + 70;

    addChild (cell);

    cell.addEventListener (MouseEvent.CLICK, mouse click);

    cell.addEventListener (Event.ENTER_FRAME, onGame);

    }

    }

    I don't know how to get the document classes and level to talk with each other. I tried to do the level class to extend the hand, but I fugre that had nothing to do with it. All ideas

    change your class Level1:

    package {}

    import flash.display.MovieClip;

    SerializableAttribute public class extends MovieClip {} Level1

    public var floor1:Array;

    public void Level1() {}

    Level 1 = new Array();

    LEVEL 1 [0] = [2,1,1,1,1,1,2];

    LEVEL 1 [1] = [1,1,1,1,1,1,1];

    LEVEL 1 [2] = [1,1,1,2,1,1,1];

    LEVEL 1 [3] = [1,1,1,1,1,1,1];

    LEVEL 1 [4] = [1,1,1,2,1,1,1];

    LEVEL 1 [5] = [1,1,1,1,1,1,1];

    LEVEL 1 [6] = [2,1,1,1,1,1,2];

    }

    }

    }

    until level 1 is in the same directory as your document class, in your document class you can use:

    private var level1:Level1 = new Level1();

    trace (Level1.Floor1);

  • Help the passage of the document class for the class of database!

    Hello comrades!

    I thought that I ve solved that problem, but I was wrong

    I created a movieclip with a star. Then I create a document class and I named it like Main.as.

    In this document class that I wrote:

    package 
    {
         import flash.display.*;
    
         public class Main extends MovieClip
         {
              var st:star=new star();
    
              public function Main()
              {
                   stage.addChild(st);
                   st.x=20;
                   st.y=30;
              }
         }
    }
    

    If I run this code, I will get a star on the stage in the x direction and y positions.

    Now, I want to drag the star with the mouse and drop it anywhere on the stage. After the fall, the star must return to its original position.

    To achieve this, I create a new AS3.0 class. I named it DragDrop.as, and I linked to the movieclip as the baseclass.

    Inside this category I wrote:

    package 
    {
         import flash.display.*;
         import flash.events.MouseEvent;
    
         public class DragDrop extends MovieClip
         {
              var x_origin:Number;
                    var y_origin:Number;
                    public function DragDrop()
              {
                            x_origin=this.x;
                            y_origin=this.y;
                            trace(x_origin);
                            trace(y_origin);
                   this.addEventListener(MouseEvent.MOUSE_DOWN,drag);
              }
              function drag(evt:MouseEvent):void
                    {
                   this.startDrag();
              }
         }
    }
    

    I m not posting the code here, but you can easily see that the use of variable I m x_origin and y_origin to keep the original position of the clip.

    I'll use them to bring star back in its original position.

    The problem is that instead of being respectively 20 and 30, retracing their I see that they are both ZERO.

    So, when I drop the star, instead of going to x = 20, y = 30 back to x = 0 and y = 0.

    I ve for the position of Star compared to the scene, but I can´t find anyway!

    Could you help me?

    Thanks in advance!

    Best rgds

    Eduardo

    I think I see... you have:

     stage.addChild(st);               st.x=20;               st.y=30;
    

    for the init works in the star before set the position... so still 0,0. You can set the x, y front sets addChild... or you can change your star class to accept the position in the constructor. And then you'd like: var st:star = new star (20,30);

  • create tablespace with giving the relative path

    Can I create tablespace with the help of relative to the parameter "DATA file" path?

    I get error ORA: 01119 when I run with the relative path in the code example:
    CREATE TABLESPACE "INDX" 
    BLOCKSIZE 8192 
    DATAFILE  '\myrelativeFolder\indx01.dbf' 
    SIZE 2604M       
    AUTOEXTEND ON NEXT 10485760  MAXSIZE 32767M EXTENT MANAGEMENT LOCAL  AUTOALLOCATE  ONLINE PERMANENT;
    Version: Oracle 10g, PlSql Developer.

    --

    Maybe add environment variable operating system to the value of the DATA file somehow? I don't want to create the tablespace with full path, from the name of the drive and ending with file name.

    Edited by: CharlesRoos the 14.10.2010 18:16

    On Unix, use the korn shell, you could try something like this:

    #!/bin/ksh
    
    REL_PATH="\myrelativeFolder\indx01.dbf"
    
    sqlplus $ORA_USER/$ORA_PSWD@$ORACLE_SID << EOF > $LOGFILE
    declare
      v_Path varchar2(50) := '${REL_PATH}';
    
    begin
      execute immediate 'CREATE TABLESPACE "INDX" BLOCKSIZE 8192 DATAFILE ' || v_Path || ' SIZE 2604M
                         AUTOEXTEND ON NEXT 10485760  MAXSIZE 32767M EXTENT MANAGEMENT LOCAL
                         AUTOALLOCATE  ONLINE PERMANENT';
    
    end;
    /
    exit;
    EOF
    exit 0
    
  • Creating a shortcut with relative paths

    I'm trying to set up a folder so that I can copy a group of files from USB drives, and I want to place a shortcut to open the Powerpoint Viewer into a subfolder of this folder to copy.   When I put in place a regular shortcut, it creates the full path: 'C:\Users\xx\Documents\Thumb Drive Files\With CAD Drawings\Product présentation Files\pptview.exe training', and when they are copied on a USB key, it will not work because it seeks the path 'C:', rather than the relative path in the folder, \With CAD Drawings\Product Training Presentation Files\pptview .exe.  I don't remember how to set this up with relative paths.

    You can't go with shortcut, you use a batch file on the root of the drive that has an order of relative path for the first command in it.

Maybe you are looking for

  • Qosmio G50-10 t - can I insert a 4 core processor?

    Welcome Is it possible to insert a 4 core processor (if so, please give the symbol of the processor), the Toshiba Qosmio G50-10 t, catalogue number: PQG55E-00Y01PG3

  • How to disable auto-crop in the HP Director?

    It's really frustrating.  I have an Officejet J4580 all-in-one device, and I tried to scan documents to PDF files using the HP Document Manager software.  Unfortunately, every time I try, the cultures randomly my documents software, and it is often d

  • That means the startup message "USB by common error"? How to fix?

    A few days ago, when I started my computer I got a message saying "USB mistakenly underway! Press F1 to continue, F2 to enter setup ". When I press F1, everything seems to happen very well. But I get this message every time I start my PC. Does that m

  • slide show themes

    are there additional topics for the windows media player slideshow feature. Im trying to find a Christmas style one. any help would be great and thank you

  • Configuration of NIC on ISE 3395

    Hello I read that the 3400 series running LOM shared in active/active. Is that mean that it will be balancing the traffic between two network cards? The 3300 series has the same functionality? Regads, Philippe