ActionScript 3.0 :: Import Class From Another Folder

Nov 9, 2009

I am using FlashDevelop and have created a project called NavBar. I have created a few folders, 1 of which is called app which contains another called gui but within this has a document class called NavigationBar.as. Now, I've created a Main.as file which resides undeaneath the src folder and what I am trying to do is import the NavigationBar.as in my Main.as file.

However, every time I type app and do the '.' and press enter I get:
flash.system.ApplicationDomain.,
How can I make AS aware of my class file, NavigationBar.as in app > gui > NavigationBar.as and any document class file for that matter?

1 other thing is that in my Navigationbar.as file I did the following..
package app.gui{
// rest of code skipt
}

But when I build it I get the following error:
C:UsersvistaDocumentsFlashDevelopProjectsNavB arappguiNavigationBar.as: Error: A file found in a source-path must have the same package structure '', as the definition's package, 'app.gui'.
How can I also sort this out?hanks

View 2 Replies


Similar Posts:


ActionScript 3.0 :: Import Class From Folder Outside Root Folder?

Sep 26, 2009

How do I import a class that resides outside the root folder of a fla file?

From root I should go back two folders to get the classes I want, which by the way is TweenMax. I don't want to copy these classes to every website's folder.

View 5 Replies

ActionScript 3.0 :: Import Class From Another Folder?

Nov 9, 2009

i am using FlashDevelop and have created a project called NavBar.I have created a few folders,1 of which is called app which contains another called gui but within this has a document class called NavigationBar.as.Now,i've created a Main.as file which resides undeaneath the src folder and what i am trying to do is import the NavigationBar.as in my Main.as file. However, every time i type app and do the'.'and press enter i get,flash. system.ApplicationDomain.,how can i make AS aware of my class file, Navigati
onBar.as in app > gui > NavigationBar.as and any document class file for that matter?

1 other thing is that in my Navigationbar.as file i did the following..
package app.gui
{
// rest of code skipt
}

but when i build it i get the following error: C:UsersvistaDocumentsFlashDevelopProjectsNavB arappguiNavigationBar.as: Error: A file found in a source-path must have the same package structure '', as the definition's package, 'app.gui'.how can i also sort this out?

View 8 Replies

ActionScript 3.0 :: Import Class From Previous Folder?

Feb 6, 2011

is it possible to import class from previous folder?Something like this:

ActionScript Code:
import ../com.example.*

View 2 Replies

ActionScript 3.0 :: Import Out Side Folder Classes

Apr 13, 2011

Is it possible call out side folder classes like "../../com". previously iam using include. this way iam using "../../com/app.as". now iam import com folder classes how can i import?

View 3 Replies

Flash :: Import A Source Folder From Eclipse Into Builder?

Mar 22, 2012

I have the source folder from a friend's Android app and I am going to do all of the design for the app. If I could import the folder that he gave me from Eclipse, it would be easier to create a nice UI for the app.

Is this possible? If not, can I load the XML files into Flash Builder to make the UI? EDIT: To clarify, I have a project file that I can open in Eclipse. I want to edit the appearance of the project using Flash Builder without interfering with the application's functionality.

View 1 Replies

Flex :: Updating Import Statements To Move The Component Into Another Folder?

Mar 23, 2010

I've just imported a Flex component into my project.I have a theory question about importing.all the imports statements in the component source files started with "com.subFolder.etc", but I have preferred to move the component folders into "componentName" and to replace all import statements as "componentName.com.subFolder.etc"

View 2 Replies

ActionScript 3.0 :: Add Images From Folder Into Library Without Using Import To Library Option?

Sep 24, 2009

How can we import images using AS3 code so that when they are imported once will remain in the library forever..

View 3 Replies

ActionScript 3.0 :: Call The Class Into To My Control As File But Can't Import A Class?

Mar 18, 2009

I need to call the class into to my control as file. The problem I'm getting now is this error. "environmentTab.lightsButton.addEventListener(MouseEvent.CLICK, selectLights);" environmentTab is a instance name of a movie clip that is on the stage of my .

View 2 Replies

ActionScript 3.0 :: Create A Main Class And Then I Import Another Class Into It?

Sep 25, 2009

I have a problem with classes. What I am trying to do is this: I create a main class and then i import another class into it.then I create an instance of the new class and add it to the stage.the problem occurs when im trying to use the new classes methods.

import classes.NewClass;
var test:NewClass = new NewClass();
addChild(test);[code].....

View 2 Replies

ActionScript 3.0 :: Flash Import A Class That's In A Package Into Another Class?

Jun 18, 2010

So basically i have my root folder with my fla and my document class in it, then I have a folder called 'main' with another class in it (Control)

But I can't seem to import my main.Control into my document class... (I would like to create an instance)

Code:
package{
import flash.display.*
import main.Control//is this wrong?

[Code]....

View 3 Replies

ActionScript 3.0 :: Add The Caurina Folder To The Folder - Thumbnail.as To The Folder

Feb 5, 2009

Can I do this in AS3?

(1) add the caurina folder to the folder

(2) add Thumbnail.as to the folder

(3) add

[Code]....

View 1 Replies

ActionScript 3.0 :: Cant Import From "fl" Folder?

Apr 28, 2010

I am using Flex 3 as my code editorand I am trying to manipulate some form components from a class. But when I try to write:ActionScript Code:import fl.controls.TextInput;Flex does not give me any code hinting for the "fl" folder. If I just type it my self it all works just fine. Just wondering why flex does not recognize "fl" folder?

View 3 Replies

Use File=> Import=> Import To Library... Or Import To Stage...the Flash Environment Becomes Terminated?

Aug 18, 2009

I`m using flash cs3 for my works , but i have one problem!when i use File=> Import=> Import to Library... or Import to Stage...the flash environment becomes terminated.I changed my flash version to CS4 and I have this problem again.

View 2 Replies

ActionScript 3.0 :: Class Path Standards - Top Level Folder

Oct 22, 2009

I've previously worked for commercial companies and when developing a Flash Actionscript 3 class path, we would use the industry standard such as: com.companyname.* for where we stored out classes, and set up the directory structure with the com folder being the top level. Now, I'm working for a company who's URL ends with .org should I make the top level folder org or leave it as com? What about people who make classes for educational systems, do they use edu or com?

View 1 Replies

ActionScript 3.0 :: Starting To Fill Up Game Folder With .as Class Files?

Oct 26, 2010

I'm working on my RPG combat engine, and everything is coming along nicely, except I'm starting to fill up my game folder with .as class files, and I was thinking it's probably smart to rearrange it so I have a folder for characters/enemies, and one for levels etc etc.I'm kinda learning as I go here so thats why I didnt start out with a planned folder structure.nyway, I can't seem to understand the correct way to go about doing it.Example: I have three classes which extend a "Character" class. They are added to the stage by the "Arena" class, when the Arena object is added to the stage by the "Game_Master" class. All of my classes at this point start with just "package {". How do I put the character files in a folder called, say, "characters"? I've tried a bit, but I can't get it to work. I moved them to the folder, made them start with "package characters {" and tried to "import characters.*;" in eventually just about every class, when just importing them to the Game_Master and Arena didn't work.

View 3 Replies

ActionScript 3.0 :: How To Know What Class To Import

Mar 11, 2009

I'm just getting into AS3 after being an AS1 and AS2 coder for a long time (but not OOP) and one thing is boggling my mind about AS3: How do you KNOW what you need to "import" ?Here's an example... I have a working AS3 demo of something, and I found a script that's supposed to add in a mouse event, but the author forgot the "import" part.

So I copy and paste this script in. I click the "check syntax" button and everything checks out, but upon compiling, it reports "1120: Access of undefined property onMouseDown.", along with a bunch of other warnings.So I figure it's because I haven't imported the classes for that, so I highlight the word "onMouseDown", right-click and choose Help. Nothing. No page for that found. I search for it in Help by typing it in and searching the AS3 book. I get the page for "SpriteArranger" as the only result.onMouseDown is mentioned mid way down this long page, but no mention of that class it needs.

PHP Code:

onMouseDown = function(){
var param = Object();
param.IRThreshold = Object();

[code]....

View 11 Replies

ActionScript 3.0 :: Can't Import A Class

Mar 18, 2009

I'm trying to import a class that resides in a package into another controller package. I'm using "import className;" and when I test the movie I don't get any errors but the function and listeners defined in the imported class doesn't do anything. The swf plays and works fine expect for the portion controlled by the class I'm importing. If I mis-name the import name Flash throws an error, so I know that it recognizes the import class name. It just does't do anything with it.

View 2 Replies

ActionScript 3.0 :: How To Import Class In FLA

May 13, 2010

I have one colourfullfirework is a FLA file and Documnet is a AS file, I want to import document class in FLA,

View 11 Replies

ActionScript 3.0 :: How Do I Import A Class?

Feb 11, 2009

How do i import a class i created in actionscript 3, in a new flash actionscript file

View 0 Replies

Flash :: Why Does Flex Builder Insist On A Main Class In The Root Of The Source Folder

Mar 3, 2010

Why does FlexBuilder insist on a main class in the root of the source folder? By insist I mean that if I create an Actionscript project called MainTest. A file called MainTest.as will be placed in the root of the src folder. if I now create a package/folder called some/package and place the MainTest.as in it (and adjust the package statement accordingly), I cannot select the project to use this as the application class in Properties/Actionscript Applications as the package is empty as far as Flexbulider is concerned.

So there is a restriction that a main/application class cannot have a package other than the root package. The mxmlc compiler and FDT do not enforce this restriction so why does Flex Builder?

View 1 Replies

ActionScript 3.0 :: Import A Saved Class?

Oct 14, 2011

if I created a customized class and I saved it as a "*.as" file, and now, I want to create a new "*.FLA" project and to use inside the "FLA" project at my customized class. how do I import my class into this project?

View 8 Replies

Actionscript 3 :: Failing To Import A Class?

Feb 15, 2010

Here is the error I get:

1046: Type was not found or was not a compile-time constant: fbAPI.

Here is my MXML:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="startGame();">

[code]....

View 2 Replies

ActionScript :: Import Class Into A Package?

Jun 27, 2010

I'm having a bit of trouble getting a class to import.[code]...

View 1 Replies

ActionScript 2.0 :: Import A Class From Above Swf's Directory?

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

ActionScript 3.0 :: Way To Import NativeDragEvent Class

Jul 12, 2010

Can someone give me the script for that? I'm not sure how to do import.

View 0 Replies

ActionScript 2.0 :: Import And Use Serializer Class?

Nov 7, 2010

I am wondering if anyone has experience using the flash Serializer class I really want to be able to receive an array from PHP into flash 8 though I am having problems.[code]...

View 0 Replies

ActionScript 3.0 :: Import Class To Main?

Mar 21, 2012

I am trying to make it so i import different .as files into the main.as filei got told it goes like this

Code:
Import stagePlace
And then in the

[code].....

View 1 Replies

Actionscript 3.0 :: Use External Class Without Import?

Nov 10, 2009

Am new to classes and as3, just starting to ge the hang of it, but i not fully, so here is some Q's.Fist of i have a Document class, from it i want to call a function in a separate as file. the only way i know of is to, do an import and then instantiate or go static on it's tookus?

But now i got my hands of some pice of code, that uses separate class files without any trace of import, how do they do this?Also if i want to be able to use all the functions from a separate as file in my document class, just like i do if i extends it, but without extending int, how do we do this? do i always need to go ClassName.function() ? or can we do it like in C++

"using ClassName"
//ClassName.function();
function();?

View 1 Replies

ActionScript 3.0 :: Document Class Vs Import?

Apr 24, 2010

I'm just wondering about the difference between using an external .as file as a Document Class vs importing it via some timeline code like:

Code:
import Pixoid;
var pixMC:Sprite = new Pixoid();
pixMC.x = 0[code]...

one thing I have noticed is that altho the above timeline code works certain objects return the "null object" error.for example if in my Pixoid.as file I have any references to the 'stage' object ex:

Code:
pxRow = stage.stageWidth / 10;

it returns

Code:"Error #1009 Cannot access a property or method of a null object reference."so, is there any advantage to using the import strategy vs the Document Class one? should I not worry about it and continue on my happy way with the Document Class?I first ran into this problem with Flex and had to do some kludges to get around it - defining UIContainer object etc - but now that I have found it to also exist in Flash.

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved