Flex :: Compile An ActionScript Class That Is In A Package To A Swf Using Builder 3?

Jul 11, 2009

How do I configure an ActionScript Project in Flex Builder 3 Pro so that I can compile an ActionScript class that is part of a package into a swf. For example, the class that I want to compile to swf is:

package utils {
import flash.display.Sprite;
public class Tool extends Sprite {[code]....

RootASProject is being produced by one developer, subASProject1 and subSubASProject1a by another developer, utils.Tool by yet another person.This directory structure enables each person to independently build modules and other resources, and quickly test the entire product.It is also important to note that these resources are loaded at runtime.So, class definitions must be fully qualified. For example, Tool.swf contains/defines "utils.Tool" not "Tool".

Developing with just the Flash IDE, this directory structure is not a problem. We create a Tool.fla and assign utils.Tool as it's Document Class then in the Flash IDE's Publish Setting, we set the class path to be NOT the current directory (.), but instead the RootASProject directory. If it were set to the current directory, the error would be: A file found in a source-path must have the same package structure '', as the definition's package, 'utils'. ToolTool.as. We're familiar with this error message and so I recognize that the Flex IDE is by default looking in the current directory for a subfolder, utils, to match the packaged class.

In the Flex IDE, I can add the utils parent, RootASProject, as an additional source path, but I do not know how to stop flex from looking in the current directory first.Using an ant build file, I can set the source path to RootASProject and the mxmlc is able to build utils/Tool.swf just fine. Apparently, it uses just the source paths passed to it, and does not automatically look for utils in the current directory.

View 2 Replies


Similar Posts:


Actionscript 3 :: Make Flash Builder Package Explorer Emulate Flex Builder's Navigator Window?

Apr 21, 2010

Does anyone know if there is a way to make the new Package Explorer window in Flash Builder emulate Flex Builders 'Flex navigator' window?

Bottom line is I don't always need to peer into SWC's, and I don't like having a 'default package' automatically created for me. Not sure why the interface wasn't made simpler, allowing access to more power and complexity only if necessary. I want to focus on the code, not on how to navigate and use the bells and whistles in the coding environment.

View 1 Replies

Flash :: Flex - Resolve Conflicting Package Name In Builder?

Dec 20, 2010

I am using Flash Builder 4 and need a VideoDisplay component that works with Cue Points. The newer version of theOSMF classes that Flex's VideoDisplay are based on handles this already. The idea is to roll my own VideoDisplay component rather than monkey patch the existing one. To do this, I have created a project with the newer version of the OSMF classes, and another project with which I would build the new VideoDisplay, in a separate package name.

The issue is that since the Flex 4.1 SDK contains the majority of the OSMF classes with their original package names, a statement such as import org.osmf.media.MediaPlayer; references the class located at

[Code]...

View 2 Replies

ActionScript 3.0 :: Compile Package File - Error: A File Found In A Source-path Must Have The Same Package Structure?

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

Flex :: Compile Theme In Flash Builder 4

Jan 22, 2011

How to compile Flex theme SWC from file.css and additional skin classes in Flash Builder 4?

I've tried creating simple Flex Library project but it does not seem to use CSS file because resulting SWC does not work as theme.

View 1 Replies

Flash :: Flex :: Embed A Html File Into An Air Package By Using Builder?

Jun 30, 2011

I have an Air Application which uses mx:HTML to show a html Page. This html page is located in my bin-debug and as long as i start my application out of FB it works fine.

In Project -> Properties -> Flex Build Packaging -> Package Content the test.html is selected

When I build the project by Project-> Export Release Build the HTML file is not included in the Air Package and so cannot be shown.

View 1 Replies

Flex :: Develop And Compile A Flex Application Without Builder?

Mar 8, 2010

How to develop and compile a Flex application without Flex Builder?

View 2 Replies

Flex :: Force Flash Builder 4 To Compile All Source Files?

Feb 9, 2011

According to the answers to this question here, the reason why I'm not seeing errors as I work in Flash Builder is that FB is "optimizing" them out because they aren't referenced at any point in the code execution. Is there an option to force Flash Builder to compile all files regardless of whether they're used in the software?

View 2 Replies

Flex :: Builder 3 Compiler Won't Show Errors / Compile Specific Pages

May 3, 2010

In flexbuilder 3 for some mxml files I can purposely put in syntax errors and the compiler will seem to compile the specific page(but actually not compile it) or report any errors for that page. Is there any way that you know of to get the compiler to report the errors to me so I can get it to compile the page. I've tried rebuilding all and cleaning the project already.

View 3 Replies

Flex :: App Fails To Compile With Mxmlc Command-line But Works With Flash Builder IDE

Apr 21, 2011

i have this flex app (it's a flex project created from flash builder), and it compiles fine when i build it from the IDE.it fails to compile when i do it from command line through mxmlc.i am invoking the mxmlc at the location "flash-builder-installation"sdks"flex-ver"inthe mxml file is test.mxml.i don't have any dependency on any of custom swc file.i am getting the following type errors when i compile it.[code]

View 2 Replies

Flash :: Flex - Manage Library Symbols With Linked Classes In CS4 To Compile / Debug In Builder 4?

Apr 2, 2010

I'm building a video player using Flash CS4 (hereby referred to as "Flash") to create the graphic symbols and compiling and debugging with Flash Builder 4 ("FB4"). Here are the steps I take in my current workflow: --Create the graphic symbols in Flash. I've created a few different symbols for the player, but I'll focus on just the play/pause button ("ppbutton") here. --In the Library panel, I go to the ppbutton symbol's Linkage properties and link to a class named assets.PlayPauseButtonAsset that extends MovieClip. I do not actually have an assets package nor do I have a class file for PlayPauseButtonAsset as Flash will create them for me when I publish.

--In Flash's Publish settings, I set the project to export a SWC that will be used in FB4, called VideoPlayerAssets.swc. --After the SWC is created, I create my FB4 project called "VideoPlayer" and add the SWC to my path. FB4 creates the class VideoPlayer in the default package automatically. --In VideoPlayer.as, I import assets.*, which imports all of the symbol classes I created in Flash and are available via VideoPlayerAssets.swc. I can now instantiate the ppbutton and add to the stage, like this:

[Code]...

View 2 Replies

ActionScript 2.0 :: Load One Class From That Package In Another Class In The Same Package

Dec 14, 2004

I have classes witch resides in this package :com.network.interface_as. When I try to load one class from that package in another class in the same package like this:

[Code]...

View 2 Replies

Flash :: IDE - Cs3 Compile Error 1017 - Package Namespace?

Sep 27, 2007

Word to the Flash Genies-- Heres my wish that hopefully someone else is struggling with an enormously mind-boggling bug in flash cs3-- when I try to create a public class that extends any of the native flash display objects, and I put this in its own package, even after specifically importing the specific class OR the package wildcard .* the fla that I'm compiling returns error 1017-- Base Class Definition not found. The fla is set to the correct classpath. This situation slipped from 'minor annoyance' to 'mind boggling' after I moved the directory to a different pc with cs3, reset the local classpath and it compiled perfectly. So then I moved the directory to a mac, running flex builder, and made a tester file to use the class, which compiled perfectly.

For some wierd reason, this particular computer cannot compile, even though nothing had changed in the actual class. Maybe it is important to note that this machine is running Vista (and perhaps should not be!)? Maybe it is important to note that the package is part of an SVN directory? Maybe it is important to note that after re-saving the same class file, changing only the class name (from BitmapSprite to BSprite) enabled it to compile on this machine, even though both the mac and other pc (running windows XP) could compile the class as BitmapSprite. I'm not sure if the name change or just re-saving allowed it to compile--but maybe it's significant that the new named instance was not committed to svn.

View 3 Replies

Flex :: What Package Should Import To Use DataProvider Class

Jan 28, 2010

I need to use DataProvider class and i cannot find the package that contains it. In all examples I saw they use fl.data, but I'm using flex builder sdk 3.4 beta and it doesn't have such a package.

View 1 Replies

Flex :: Access WindowedApplication From Package Class?

May 20, 2010

I'm developing an AIR application, where i need to access WindowedApplication's function from the package class. This is the Main application (Partial code)

<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute" creationComplete="initApplication()">
<mx:Script>[code].............

View 2 Replies

Flash :: Compile A Swc With A Class Written In Flex

Jun 17, 2009

I want to use some assets ( buttons, etc. ) I'm creating in flash in a flex actionscript project. Since all my assets are bellow 10K, I'm not planning to load a swf ,wait until it's loaded and create the interface. I want to use a swc and just instance the clips I need. Also, I want my Button class to have some extra properties, and this is where the problem occurs.

If in the Linkage Properties in the Flash IDE I add a reference to a custom Button Class and trace a child of the Button MovieClip, I get the right trace. If then I create a Button, in the Main class in Flex, using the generated swc file and trace the same child of the Button MovieClip, I get null. Why is that ? Is there anyway to get around this ? I've considered using the Flex Component Kit, but since I'm working on a simple actionscript project and I'm not using the Flex framework, I see no point in using the Component Kit at this point.

View 2 Replies

Actionscript 3 :: Package For URLLoader And URLRequest In Flash Builder?

Jun 15, 2011

I am trying to setup two variables:

var xmlURLLoader:URLLoader = new URLLoader();
var xmlURLRequest:URLRequest = new URLRequest();

I am taking some old AS code and trying to plug it into Flash Builder. I am getting a "Type not found."warning with those variable declarations. Does anyone know which package to import?

View 1 Replies

Flex :: AS3 Flash Compile - Exclude Functions From Compile?

Jun 7, 2011

There is probably no way for this but does anyone know a method of excluding certain functions from a build by use of a meta tag and or compiler option?I want to expose some functions for testing but not have them bloat the application on production. I could create separate testing classes and test for a complier directive or option and only load them if necessary but I like the idea of having the test function on the actual object (in the class).

View 2 Replies

Actionscript 3 :: Change The 'Default Application' Class In Flex Builder 3?

Jul 26, 2009

When creating an Actionscript Project in Flex builder 3 an application class is automatically created and dropped in the root of your source folder. In my case my source folder is called src/.Is it possible to change the default application class to a class which is not directly in the root of the src folder? It seems when right-clicking on class files which are in sub packages the 'Set as Default Application' option is not selectable.Is this done on purpose by Adobe to enforce all pure AS projects to have their application class residing in the top-most package?

View 3 Replies

Flash :: Flex - Adobe Builder (flex4): AddChild() Is Not Available In Class

Jan 7, 2010

I want to load an swf into a flex 4 application in order to use its classes.

[Code]...

I receive the error: Error: addChild() is not available in this class. Instead, use addElement() or modify the skin, if you have one. at

[Code]...

View 4 Replies

Flex :: Assign Variable As Class In Flash Builder 4 Hero SDK

Jan 17, 2011

I am trying to assign a variable to a view navigation as follows:

protected function list_clickHandler(event:MouseEvent):void
{
var name1:String = list.selectedItem.vPage;
var name2:Object = list.selectedItem.vPage.valueOf();

[Code]....

As the View is presented as a static and not a variable. When you try to submit it as a variable in any format (String, Object) an error occurs.

Error #1034: Type Coercion failed: cannot convert "IM" to Class.

how I can send the (View)Class as a variable or if this is a bug in the SDK

View 1 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

Flex - Error #1088 On Passing A Class As A Parameter For Web Service In Flash Builder

Feb 8, 2011

I need to pass a struct and a string in a web service. I am using a WebService components to do so.upon my search, there is no struct type in actionscript and so I used a class for that one.

public class UserInfo{
public var name:String;
public var dateAdded:Date;
}

and I'm filling it up so that I can pass it on the web service like this:

var newUser:UserInfo = new UserInfo();
newUser.name = "myName";
newUser.birthdate = new Date();
webServComponentId.operationToCall(newUser, "password");

Upon sending this request, it prompts me an error of Error #1088.

the component that is being called by webServComponentId.operationToCall(newUser, "password"); is this:

<s:WebService id="webServComponent" wsdl="[PATH OF WSDL HERE]" >
<s:operation name="operationToCall" result="functionToCallWhenResult(event);" fault="Alert.show(event.fault.faultString)" />
</s:WebService>

Basically it is a web service via MXML. So when I call the operation, it always go to fault part and shows Error #1088

View 1 Replies

Eclipse :: Flex Compiler Error: "put Definition In A Package" For Classes That ARE In A Package

Oct 13, 2009

This is with Flexbuilder 3.2, Eclipse 3.3.2.I am moving my development environment to a new machine. Actionscript classes that compiled in the old environment now get a compile error:

A file found in a source-path must have an externally visible definition. If a definition in the file is meant to be externally visible, please put the definition in a package.I do declare the package in these classes - I think failure to declare the package is the usual reason for this error.To add to the mystery, many classes in this project compile without errors.

View 1 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

Flex :: Convert Flex Builder 3 Project To Flash Builder 4

Oct 6, 2009

I just upgraded to Flash Builder 4 (beta 2) from Flex Builder 3 which I have been using since it came out. Problem: All the projects that were in my workspace from Flex Builder 3 did not carry over into Flash Builder 4 (e.g. in the "Flex Navigator" view if FB3). Flash Builder 4 now uses the .FXP format to manage projects, but Flex Builder 3 did not. Is there an easy way to get all my projects back into Flash Builder 4?

View 2 Replies

Flex :: Builder - Using Flex Builder With Source Control?

May 25, 2010

When setting up a source control repository for a Flex Builder workspace, what do you consider to be worth checking in? Do you exclude the workspace .metadata folder but keep the .project and other project specific files? Keep both? Throw away both? Is there a guideline you use to decide which is worth holding onto or do you do it out of practical experience?

View 2 Replies

ActionScript 3.0 :: Loader Class + As A Package

Jan 9, 2011

I wanted to design a [relatively] all purpose class to load images and SWF's with a preloader MC and error handler. I made this BUT, when I load the MC I cannot control it. i.e. I load an SWF containing an animated GIF, but I cannot say mc.gotoAndStop();

[Code]...

View 1 Replies

Actionscript 3 :: Package Name For A Loop Class?

Dec 22, 2009

I wrote a class that performs an asynchronous loop. It needs a package name. I already have a util package, but feel resistant to put half of my classes in that package. If it really belongs there, I'll put it there, but I'd feel much better if I can find a more appropriate/specific package.

View 3 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







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