ActionScript 3.0 :: Common Class Directory Source Path ?
Oct 20, 2011
I have created few actionscript projects and most of them uses same com/ dir with same classes library such are adobe or greensock.In Flash builder, on one of the projects, I`ve created new source path, to that common dir.So now I have structure like this: MyProject
[source path] com
src (with AS documents)
fla (flash file)
When I edit one of my AS files from src dir in Flash Builder, I can normaly see reference to [source path] com directory, and I have full tooltip reference to it`s content.
ActionScript Code:
import com.greensock.loading.*;
import com.adobe.serialization.*
However, if I try to edit that same file in flash professional, I get no reference and there is no way I can compile file.What am I doing wrong, why flash professional does not see classes from my com directory? I even try to point it to that dir in actionscript settings but that did not work either.
View 1 Replies
Similar Posts:
Apr 3, 2012
I am coming from flash to flashbuilder I have a directory, AS3_classes_dir, on my computer that stores all of my classes, including my greensock and papervision packages. In every flash app that I make I include that directory in the Source Path, so that I can import whatever I may need. Compiling in flash (using ctrl/enter) takes very little time; only the classes that are specifically imported are compiled.So today I did that in flashbuilder, included AS3_classes_dir via Flex Build Path/Source Path ... but now the compile time are a couple of minutes, even though I am not even importing ANY of the classes from within.
View 2 Replies
Jan 11, 2010
So inside my src folder I have my app.mxml file. I have a source directory pointed to my actionscript library.It appears that Flex does not look inside that source directory including an .as file within the master mxml file.
Code:
<mx:Script source="com/domain/something/somethingelse/app.as"/>
I could just have the main app.as file inside the src folder along with my app.mxml file but it would be nice if it could live in the actionscript library.
View 1 Replies
Aug 21, 2009
So inside my src folder I have my app.mxml file. I have a source directory pointed to my actionscript library.It appears that Flex does not look inside that source directory including an .as file within the master mxml file.[code]I could just have the main app.as file inside the src folder along with my app.mxml file but it would be nice if it could live in the actionscript library.
View 2 Replies
Nov 9, 2011
the same class is passed to the mxmlc compiler in SWF library as a symbol linkage class and again in a source-path. But the compiler uses the definition from the source-path so creating new instance of that class won't create new instance of the library symbol. How do I tell the compiler to prefer the definition linked to the symbol (the one dfrom SWC)?
I have my design assets in an FLA file and they are linked to classes (e.g. [URL]. Then I export those assets to a SWC library and pass it to the compiler. Now when I create an instance of the class (new MyAsset();) it will be a new instance of the library object.
But there are other classes too in the source folder (e.g. "com.myproject.model.*" so I need to pass the source folder to the compiler too. And that is the problem, now the compiler will use the MyAsset.as definition from the source path, not from the SWC where it is assigned to the library object so if I create new instance of MyAsset now it won't duplicate the library object.
View 1 Replies
Feb 9, 2010
When I have a class linked to a MovieClip in my library and that class takes an argument in its constructor method. That class will compile properly ONLY when it's located in my top-level directory (same dir as the .fla and Document.as files). If I move that class to a deeper directory, say com.place, and update the package statement and symbol link appropriately, the compiler will generate error "1136: Incorrect number of arguments. Expected 0."Create flash project and put a rectangle on the stage. Covert it to symbol and assign it to class TestPanel - or whatever you choose. Also configure the fla so that is uses a Document (Main) class.Create Main.as and TestPanel.as in the same folder. In the Main class, instantiate a instance of TestPanel and add it to the stage. Flash will, predictably, add the rectangle symbol and everything is fine.Now modify TestPanel so that its constructor method takes a Number and have Main.as pass some number to TestPanel.[code]You now get the error: 1136: Incorrect number of arguments.Expected 0.When I move the TestPanel.as into a deeper directory, Flash somehow is looking elsewhere for the base class for Symbol, even though I'm mapping that Symbol to com.place.TestPanel.
View 4 Replies
Feb 23, 2011
I am writing to an XML file which is placed in the src directory of my Flex project. But when I run my application, the changes I make to that XML file actually reflects in the copy of that XML file in my [code]Is there a way to reflect those changes to the actual xml file i.e. the one in the src directory?Server Side: PHP.PHP file is in the same src folder. Here is the related snippet of code:[code]
View 1 Replies
Nov 21, 2010
find greatest common factor and lowest common multiple
View 8 Replies
Sep 21, 2011
Due to decisions out of my control I've created a iPad app by way of a CS5.5 Flash build and using the 'Air for iOS' publish.
In the 'Air for iOS' settings I've included a file. The issue I'm having is in trying to call the file and not knowing what the path is.
I'm hoping this is a case where files added in this manner are placed in a consistent location.
Is that the case? And if so, what would the path be?
View 1 Replies
Dec 8, 2009
I allow my users to upload files from a directory. I use SWFUpload so that they can upload multiple files easily. However, I need to get the absolute path of the directory from which they are uploading.A little research tells me that it can't be done in plain HTML/Javascript or in Flash.Java applets seem to support this, so that's what I'm planning on using. I guess ActiveX can also do it, but I don't know much about ActiveX stuff, so I would rather avoid it.Also, I can assume that the users are using Windows (XP or greater) and IE.It there an easier way (other than writing a Java applet) that I'm missing? Having the user type in the directory into a textfield is an option, but not a very good one.
View 1 Replies
Aug 10, 2011
I need a regular expression pattern for validating the following path directory:
[Code]...
View 1 Replies
Feb 5, 2010
I've extended Sprite to add some common functionality - this is a generic class I use in most of my real-world applications.Everything "works", but I'm curious if there's anything I'm doing that could be done better, or if there are common tasks that should be included that aren't, or if there are members that aren't really that handy and perhaps could be omitted.
For example, there are several members to handle display-list traversal - I've kind of gone back-and-forth on this, and various versions have had methods to remove all siblings, or retrieve an array of elderSiblings and youngerSiblings,etc,but that seemed a little overboard so have been removed.The offsetWidth and offsetHeight are inelegant at best (so clumsy in fact I'm really leaning toward removing them entirely), but AFAIK there's no other way to get back the "true" height/width of an object whose first child is not a position 0.Also I'm curious about the event management overrides. I've run these on several commercial applications and have found them both useful and without any obvious drawbacks, but have never seen anyone else do anything similar,
View 13 Replies
Apr 5, 2010
I created a Jing video to describe my problem. In short, I'm not sure how external AS3 scripts are supposed to referenced, though I did get it to work in AS2 years ago.
View 3 Replies
Jul 29, 2009
i'm new in flex.Here is my problem [code]i want to make source path dynamic.i mean i collected userName and albumName from php and i could print in flex.But when i use in source like this this way source="../../user/{userName}/{albumName}/album/{data}".
View 1 Replies
Oct 30, 2009
how to declare the path dynamically in Embed source
Code:
Ex:
[Embed(source ='../lib/Fonts/Arial.TTF', fontName = 'Sathiy Normal')]
but i need Like this
URL='../lib/Fonts/Arial.TTF'
[Embed(source =URL, fontName = 'Sathiy Normal')]
if i give like this Error is coming..How to set the path dynamically to Embed source
View 2 Replies
Feb 15, 2010
I was wondering if it possible to write up some AS that will take line paths that you have drawn and convert them into a Path object? For example say you drew a jagged line from left to write, would there be a way to have AS convert that into a Path object.
View 11 Replies
Oct 7, 2010
Here's the issue: I have three files in the same package: com.foobar
The directory to these files is:
C:..mylibrarysrccomfoobar
then inside I have foo.as and bar.as
When I try to run mxmlc C:..mylibrarysrccomfoobarfoo.as I get the error:
A file found in a source-path must have the same package structure ' ', as the definition's package, 'com.foobar'.
To that I say: it does. The package is com.foobar. The structure goes ..[url]....I've found a few other forum posts on the web about this error, and it seemed like the user had to make the directory matching the package name, which I already have.
View 4 Replies
Jan 27, 2009
I am having some trouble setting relative package source path in the ActionScript Settings Flash CS4.Below is the folder structure on my computer.[code]The only way it will work is with an absolute path like /Users/ jenrosamond/Desktop/Tri-Template/classes.This project is getting moved around to several different machines though, so that absolute path isn't going to work.
View 1 Replies
Jun 10, 2010
use the mxmlc task of the Flex Ant tasks with a user-definable list of source path or library paths? The idea is that the user can define an arbitrary list of source paths and/or library (swc) paths into an Ant properties file and the build file takes these values and evaluates them for use in the mxmlc task. Just wondering if there are any tricks (maybe utilizing filtering/string replacing) to get this working?
View 2 Replies
Aug 13, 2009
Can I import a class if it's above the directory of the swf? Normally you'd use something like ../ but I know that's not correct.
ActionScript Code:
import sound.SoundSync;
View 2 Replies
Jan 18, 2010
Trying to fix other peoples bad coding and I can not change the file structure but I would like to add a class directory and be able to reference it for buttons and variables. The problem is that the directory needs to be up 1 directory so that it can work with all the other files.
Also I need to be able to set it as the symbol property "linkage" class file so I can apply the class to all the buttons.
File folder structure:
Main folder
New class files
FLA files
Folder holding more FLA files
More FLA files
View 0 Replies
Jul 8, 2010
Is it possible to use a Document class that is above the FLA in the directory structure?[code]...
View 1 Replies
Mar 24, 2011
Originally my classes(.as) and project (.fla) were stored in the same directory. But I would like to refactor them. I've created a subdirectory "classes", and moved my classes into this subdirectory but I've got error.
All my classes are stored in one package.
How can I "include" or "import" my classes from a subdirectory of my project?
View 2 Replies
Sep 13, 2011
I have seen similar questions, but not this specific problem. I have a folder structure like this:
[Code]...
View 3 Replies
Sep 11, 2006
import mx.transitions.Tween;import mx.transitions.easing.*;"The first line imports the Tween class file into your Flash document. You can find the class file called Tween.as at C:Program FilesMacromediaFlash 8<language>First RunClassesmx transitions assuming a default installation. Here you should find 16 class files used by Flash for various other effects (including the slideshow templates)."Now i am wondering.... suppose that's not my default installation (wich is the case now) and it is effecting the file of not finding my tween.as do I have to ajust the path?
View 3 Replies
Apr 22, 2010
I put some modules in a module folder. How do I import classes with the import statement when I'm in a sub folder?
This won't work, not like classes which are in packages. modules/SomeModule.mxml
<?xml version="1.0"?>
<mx:Module>
<mx:Script>
[Code].....
View 1 Replies
Feb 10, 2010
(Spoiler alert: It's not an issue of my package statement not reflecting the location of my class file.) When I have a class linked to a MovieClip in my library and that class takes an argument in its constructor method. That class will compile properly ONLY when it's located in my top-level directory (same dir as the .fla and Document.as files). If I move that class to a deeper directory, say com.place, the compiler will generate error "1136: Incorrect number of arguments. Expected 0.
[Code]....
View 5 Replies
Dec 19, 2011
I have an actionscript file,it has a package name,it locate C:demo directory,like follows:
package demo{
import flash.display.*;
public class ABC extends Sprite{[code]............
Then I compile above code like following command,but it raise following error:
C:>mxmlc demoABC.as
Loading configuration file C:sdkframeworksflex-config.xml
C:demoABC.as: Error: A file found in a source-path must have the same package structure '', as the definition's package, 'demo'.Where is wrong above command?
View 1 Replies
Jun 28, 2011
Are there some online resource/page/repository where I can view the sources of action script Vector class?
View 1 Replies
Jul 18, 2010
So I've created a script where a mc is clicked on and the player can draw a path using the mouse. I'm trying to figure out how I can get the mc to follow the path drawn out by the player's mouse and when the player clicks again, it erases all of the path.my code is below
Code:
import flash.display.Sprite;
import flash.events.MouseEvent;[code].....
View 14 Replies