Flex Builder 3 Launch Flex Project Error
FB3 launch Flex Project Error
quote:
String index out of range:30
what's reason? how do i fix it? Thanks!
quote:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute" width="367" height="227">
<mx:Button x="178" y="10" label="Button"/>
<mx:ComboBox x="10" y="10"></mx:ComboBox>
</mx:Application>
That's code. I can't launch project with debug.
Thank you.
Similar Messages
-
Where does flex builder keep refererences to the flex projects?
Where does flex builder keep refererences to the flex projects?
I'm getting an error like this on FB3 startup:
The folder PR System Intranet does not exist in the workspace so the reference must be somewhere else.
thanks
!SESSION 2009-11-02 09:47:52.203 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.5.0_11
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_GB
Command-line arguments: -os win32 -ws win32 -arch x86
!ENTRY org.eclipse.core.resources 2 10035 2009-11-02 09:47:53.610
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.
!ENTRY org.eclipse.core.resources 4 567 2009-11-02 09:47:53.829
!MESSAGE Workspace restored, but some problems occurred.
!SUBENTRY 1 org.eclipse.core.resources 4 567 2009-11-02 09:47:53.829
!MESSAGE Could not read metadata for 'PR System Intranet'.
!STACK 1
org.eclipse.core.internal.resources.ResourceException: The project description file (.project) for 'PR System Intranet' is missing. This file contains important information about the project. The project will not function properly until this file is restored.
at org.eclipse.core.internal.localstore.FileSystemResourceManager.read(FileSystemResourceMan ager.java:663)
at org.eclipse.core.internal.resources.SaveManager.restoreMetaInfo(SaveManager.java:792)
at org.eclipse.core.internal.resources.SaveManager.restoreMetaInfo(SaveManager.java:772)
at org.eclipse.core.internal.resources.SaveManager.restore(SaveManager.java:663)
at org.eclipse.core.internal.resources.SaveManager.startup(SaveManager.java:1319)
at org.eclipse.core.internal.resources.Workspace.startup(Workspace.java:1949)
at org.eclipse.core.internal.resources.Workspace.open(Workspace.java:1713)
at org.eclipse.core.resources.ResourcesPlugin.start(ResourcesPlugin.java:363)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:9 99)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextIm pl.java:993)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:9 74)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:260)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:400)
at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLa zyStarter.java:111)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java :417)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoade r.java:189)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:34 0)
at org.eclipse.osgi.framework.internal.core.SingleSourcePackage.loadClass(SingleSourcePackag e.java:37)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java :405)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:369)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:357)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.jav a:83)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at com.adobe.flexbuilder.standalone.FlexBuilderApplication.start(FlexBuilderApplication.java :111)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLau ncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.jav a:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
at org.eclipse.equinox.launcher.Main.main(Main.java:1148)
!SUBENTRY 2 org.eclipse.core.resources 4 567 2009-11-02 09:47:53.829
!MESSAGE The project description file (.project) for 'PR System Intranet' is missing. This file contains important information about the project. The project will not function properly until this file is restored.
!ENTRY org.eclipse.osgi 4 0 2009-11-02 09:47:53.860
!MESSAGE An error occurred while automatically activating bundle org.eclipse.core.resources (161).
!STACK 0Thanks but that file contains things like
<?xml version="1.0" encoding="UTF-8"?>
<actionScriptProperties mainApplicationPath="main.mxml" version="3">
<compiler additionalCompilerArguments="-services "X:\Coldfusion9\wwwroot\WEB-INF\flex\services-config.xml" -locale en_US" copyDependentFiles="true" enableModuleDebug="true" flexSDK="Flex 3.2" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="true" htmlPlayerVersion="9.0.28" htmlPlayerVersionCheck="true" outputFolderPath="Staff_Ratings-debug" sourceFolderPath="src" strict="true" useApolloConfig="false" verifyDigests="true" warn="true">
<compilerSourcePath>
<compilerSourcePathEntry kind="1" linkType="1" path="H:/flash"/>
</compilerSourcePath>
<libraryPath defaultLinkType="1">
<libraryPathEntry kind="4" path=""/>
</libraryPath>
<sourceAttachmentPath/>
</compiler>
<applications>
<application path="main.mxml"/>
</applications>
<modules/>
<buildCSSFiles/>
</actionScriptProperties>
I don't see how FB3 knows about the
Pr System Intranet
project that seems to be the cause of the errors. -
FLEX Builder Pro 3 New Flex Project cannot configure J2EE
I have FLEX Builder Pro 3 installed on a Windows XP machine. LiveCycle Data Services is installed (with Tomcat) on a Linux RHEL 5 machine. When trying to create a new FLEX project and configuring a J2EE server am very confused on what to put in Root Folder and Root URL. I have tried various paths on the Root Folder (with a drive mapped through windows and also with just using the servername) and keep getting the error message:
Invalid root. The WEB-INF/flex folder must contain either flex-config.xml or services-config.xml.
I've located the flex-confing file in the tomcat5\webapps\ROOT\WEB-INF directory, but still get the error.
Please any help would be greatly appreciated.Are your new classes referenced from the old code? Mxmlc employs a questionable form of "as-needed" linking, so classes that are not referenced from the main application are not even compiled. This referencing requirement is recursive; that is, any classes that are to be included have to be referenced from the main application, or from classes referenced by the main application, or from classes referenced by classes referenced by the main application, and so on. But if your new classes are not referenced at all from the old code, they will be ignored.
-
Flex Builder 3 and Channel definition-error
Hi,
I'm developing AIR application which is connecting to third
party dll via FluorineFx. I've FluorineFx Service running. Now the
problem is that when I'm trying to run AIR app in Flex Builder 3 I
get following error: "Channel definition,
mx.messaging.channels.RTMPChannel, can not be found". Does anybody
know what might be reason and how to fix this?Ok, solved the problem. Found answer from here:
http://forum.fluorinefx.com/viewtopic.php?f=9&t=3
I installed LCDS Express and then added fds.swc to my project
from LCDS-folder. -
Porting the Flex Project with Extension Builder 2.1 to CC(2014)
Hello,
I am trying to port the Flex project developed in Flash Builder 4.6 with Extension builder 2.1, to InDesign CC (2014).
As per the SDK help it mentions I can use the same environment mentioned above to port the project. But when I try it is giving error " This extension cannot be installed, it requires InDesign version in range of inclusively between 9.0 and 9.9.
Do I need to set anything before compiling the plugin for CC(2014)? Or do I need to port in some other environment? If yes where can I get the details of other environment?
Thanks for the help in advance.
Regards
Farzana.You want to use your flex project in a CC2014 application? If yes, you have to rewrite your complete project to a HTML5 extension as Flex support was dropped in CC2014 (and all upcoming releases).
"Flash/Flex/AIR extensions run in APE (Adobe Player for Embedded). This product is deprecated, and, as stated above, will be removed from Creative Cloud products, starting in the middle of 2014. This means that developers must migrate their extensions to HTML5 if they want to continue to support them in Creative Cloud (CC) applications. Flash-based extensions will continue to run as before in versions CS5.x and CS6 of their host applications."
http://www.adobe.com/devnet/creativesuite/articles/introducing-html5-extensions.html
Really helpful resources for HTML5 extensions:
http://www.davidebarranca.com/category/code/html-panels/
Adobe-CEP/CEP-Resources · GitHub
Greets -
J2EE configuration Server gives error when creating flex project
Have eclipse integrated with Tomcat 6 and want to use blazeDS in it. Created Java Project and had setup for BlazeDS. Kept all lib files of blazeDS in it and other configuration things.. I have flex builder plugin in eclipse. Now want to create Flex Project in order to access java methods in it using remoteobject.
File ->New Flex Project
Clicked on Next. I am getting error here.
Java Project location where blazeDS war files and flex folder which inlcudes remote-config file and other config files is "H:\workspace\JavaBlaxeDS\" still giving me error . Please help!!!Hi fahad !
i know this is common problem when u put j2ee.jar from ee sdk to ur local jdk extension ...now wht u have to is ...remove j2ee.jar from ur jdk's extension and restart the system..then simply start jdkee again .. i m sure no error will be waiting for u :)
Truly,
siddiquiHashim
smartSolutions -
I launched my first Flex project.
So I launched my first Flex project yesterday. I wanted to
say thank you to everyone who has helped me on these forums. Here
it is if you would like to check it out
http://www.kranichs.com/mothers-rings
please tell me what you think.
Thanks!Very cool indeed.
I added it to my ChikaraDev directory of rich internet
applications:
ChikaraDev
Directory of Rich Internet Applications
It could use a progress bar though. The screen where it will
appear is blank till it loads. But very nice use of Flex! -
I want to create a swc file to use it in an other project. I can't use the Flash 4 Library Project to do this, because in a Library Project I
haven't the possibility to use data/services, which I need for my library. After click on "data / services" I get the message "This view is only for Flex-Projects available".
Has anyone a solution for my problem?
Thanks for your help.Connect to PHP in FB4 is used when you have a PHP Class and you want to use that in FB, for example Employee.php and it has a Employee class and various methods in that like create, update, get, delete.
However, if you have exposed your functionality in PHP as a HTTP URL (i.e. it is not a class), then you should be using HTTPService from the data menu.
So if your file is login.php and is accessible as a URL, then using the HTTPService and enter the URL.
Does this help?
-Sunil -
Not able to create a new Flex project in Eclipse
I am trying to use Flex Builder 3 eclipse plug-in for
development. But while creating a new Flex project in eclipse, I'm
getting the following error:
Template template.jst.web has not bee defined.
I am using Eclipse 3.3, and have installed the latest WTP
updates. Can someone point out what I'm missing here?
Thanks!Hi clsung,
Do you get this error on every Flex Project you are trying to
create or just on Java/J2EE projects? Flex Builder beta doesn't
support WTP 2.0 but this shouldn't affect the other kind of
projects.
-Gelu -
Flex Project ; Compile Locally
When I set up a Flex project in Flex Buiilder 2 , and select
Flex Data Services, Compile Application locally in Flex Builder ,
then select root folder, root URL and context root, the application
fails to compile locally . I get an error in the problems section
stating , "Unexpected attribute 'url' found in 'endpoint' from
file: services-config.xml" . I am using LiveCycle Data Services ES.
Anyone having the same issue ? My co-worker was able to do a
similar set-up successfully using FDS2 , so I'm wondering if there
is an issue with LCDS ?
Thanks, Stevesjlib,
I was able to resolve my same error by updating the Flex SDK
2. I found some information to do this here:
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=72&catid=640&threadid =1253123&highlight_key=y&keyword1=flex%20Builder
I followed the directions posted on 03/29/2007 by
"nodogbite".
After updating the Flex SDK, I removed my projects from the
workspace & the J2EE DIR and rebuilt them from the source path.
After doing this I no longer got the "Unexpected attribute 'url'
found in 'endpoint' from file: services-config.xml" when I
recompiled.
I hope this helps, good luck!
-Gavin -
Porting the Flex Project to CC(2014)
Hello,
I am trying to port the Flex project developed in Flash Builder 4.6 with Extension builder 2.1, to InDesign CC (2014).
As per the SDK help it mentions I can use the same environment mentioned above to port the project. But when I try it is giving error " This extension cannot be installed, it requires InDesign version in range of inclusively between 9.0 and 9.9.
Do I need to set anything before compiling the plugin for CC(2014)? Or do I need to port in some other environment? If yes where can I get the details of other environment?
Thanks for the help in advance.
Regards
Farzana.You want to use your flex project in a CC2014 application? If yes, you have to rewrite your complete project to a HTML5 extension as Flex support was dropped in CC2014 (and all upcoming releases).
"Flash/Flex/AIR extensions run in APE (Adobe Player for Embedded). This product is deprecated, and, as stated above, will be removed from Creative Cloud products, starting in the middle of 2014. This means that developers must migrate their extensions to HTML5 if they want to continue to support them in Creative Cloud (CC) applications. Flash-based extensions will continue to run as before in versions CS5.x and CS6 of their host applications."
http://www.adobe.com/devnet/creativesuite/articles/introducing-html5-extensions.html
Really helpful resources for HTML5 extensions:
http://www.davidebarranca.com/category/code/html-panels/
Adobe-CEP/CEP-Resources · GitHub
Greets -
How to compile and excecute a downloaded flex project
I've a problem during the compile of downloaded flex projects
(with Flex Development)
I copy the project folder in Flex Builder 3 folder
Now.... File -> Import -> Flex Project
I Import the project in Flex Dev
I execute the debug ... or I execute the project
"Run Main" -> can't find bin-debug/main.html
"Debug Main" -> can't find bin-debug/main.html
I've tried with
Project -> "Export Release Build" -> Can't find
/Dashboard/libs folder
... I've tried to create the Libs folder
and I see:
Encountered errors or warnings while building project
main.mxml.
main.mxml: Cannot create HTML wrapper. Right-click here to
recreate folder html-template.
How Can I compile (and view) the projectCopy the "html-template" directory from one of your other
projectsand try again. -
Exercise 9 Creating New Flex Project
Thanks to Ryan aka rsadwick, I was able to get LiveCycle and
the ODT zip file working properly (see his reply to "Problem with
one of the lessons"). Unfortunately when I try and create a new
Flex Project using LCDS I am unable to get past the second step in
the process. Going by the way it is explained in the exercise, with
the updated information, my root folder should point to the odt
dir, however; I have found that if you just got to that dir you
will get this error: Invalid root. The WEB-INF/flex folder must
contain either flex-config.xml or services-config.xml.
So I drilled into the odt dir to find those files and found
them in this sub dir: C:\lcds\tomcat\webapps\odt\WEB-INF\flex, and
I am still getting the same error message, even though both the
flex-config.xml and services-config.xml files are in this dir. I
have tried validating the connection with LCDS running and without
it running with no difference. I'm hoping that someone can help me
with this or if I have made some kind of mistake in the way I
installed the zip file. I am going to try and contact rasdwick and
see if he can help me solve this problem and get it posted for
those who read this in the future. I really wish Adobe would just
update their files to the current software versions and or
solutions.flashMonkey2007 wrote:
> If reverting the change is as easy as setting the
perspective back then I think
> yes. Here are the two scenarios as I see them
>
> - W/O setting change
> a. Install FB
> b. Switch to FB perspective
> c. Checkout FB
> d. Remain in perspective or switch back
>
> - With setting change
> a. Install FB
> b. Checkout FB
> c. Remain in perspective or switch back
>
> I can't imagine somebody installing an application and
then going on to other
> work before looking at it - that is to say if I have
just installed Flex
> Builder then I am more than likely going to check the
installation worked, as
> such I think the second scenario will be most popular...
>
> Either way thanks for getting out a Linux version - this
is great news for
> those who are tired of being forced to pay money for
unwanted OS upgrades. I
> don't think I have ever purchased software (generally
use OSS applications or
> transferable business licenses) but I'll buy FB for
Linux just as soon as the
> design view is working.
>
>
>
Please feel free to log a bug in Flex Builder Linux bug
base...
http://bugs.adobe.com/jira -
Arrrgggg. This is driving me nuts. Using Win2K3 with all
updates, IIS6, web xml file is not commented, server ports 80 and
8500 fail, tried using IP, reinstalled CF, DW and CF Admin will
connect using RDS, password reset, java update. Nothing works and
it's driving me insane, In the RDS cofiguration of Flex I get the
"can't connect to RDS" error.
I want to use Flex, I really do, but it shouldn't be this
hard to configure using a Win2K3 and IIS6 setup.Hi, I had the same difficulties in a previous post last week
(look for if you like) and received this answer which seems
comprehensive -- but I have not put it into effect just yet
(working with the localhost for now).
Not sure if it helps (I'm a clueless noob at the moment) but
getting there slowly. . . .
As it is on port 8300 it sounds like you performed a JRun
install and used the built in ColdFusion web server. I would not
recommend doing that. I would suggest installing Apache or
configuring IIS. Then reinstall ColdFusion and chose to run the web
server connector. That way you can have it running on the standard
port 80. If you do not like IIS, Apache for Windows in version
2.2.6 also has OpenSSL built in if you wanted to test with SSL.
When you get to the point where it asks you to choose the web
root if it is not actually pointing to your wwwroot (htdocs for
apache) directory make sure to point it there as this is where it
will install your CFIDE directory and it is handy to have that in
your web root rather then having to remap it later.
Make sure that when it prompts you to set a password for the
RDS that you do. You will need it for flex builder.
Sounds like you have already figured out how to create a DSN
so I will skip that. Just make sure that they validate.
Once all that is done I suggest one other thing. Flex needs
access to the services-config.xml file to compile. You will hear
lots of advice about copying it over to your local system in a fake
directory. I find it better to share out the directory it is in on
the server and then point FlexBuilder to that directory. That path
is C:\ColdFusion8\wwwroot\WEB-INF\flex\services-config.xml by
default. But you will want to just share out the ColdFusion8 Folder
itself.
Then share out your webroot. For IIS I believe that is just
c:\wwwroot. Just share the folder under the same name is fine.
Make sure you can get to each of the folders over the network
using their UNC paths. The reason for this will become clear later.
Or at least less foggy.
Once all that is done move to your Development workstation.
Open a command prompt and make sure that you can ping your server
by Name. IP addresses are ok but it is better to use the name in my
opinion. If you do not have local DNS resolving names you can
configure your systems Hosts file to point to that servers IP
address for any given web URL you would like.
On your workstation when you install flex builder make sure
to choose to install the ColdFusion Extensions for FlexBuilder.
Then open flex builder. I use Flex Builder 3 Beta 3 so if you
are using version 2.01 your screens will differ.
Click File > New > Flex Project
Provide a project name. Anything is fine for now this is just
a test.
Example: mycoolnewflexsite
Choose the default location for the workspace or choose
another location. It does not really matter where you put the
workspace. Just don't forget where you put it if you change it's
default location. Your workspace is not the same as your WebRoot.
The Work space is Flex's location where it keeps your configuration
information about your projects and it's UN-Compiled source files.
Choose ColdFusion for the server technology and Select
ColdFusion Flash Remoting for this instance.
Click next.
On the next screen it is going to ask you which installation
type. My install uses a standalone server. Sounds like yours is
JRun which I believe means you have to choose Deployed to J2EE. You
will want to look that up. Either way there is not too much
difference in the screens.
For the standalone these are the settings I use.
UNCHECK the "Use default location for local
ColdFusion server".
In the field put in the UNC path to the shared ColdFusion8
Folder on our development server.
Example: \\MyServerName\ColdFusion8
This way FlexBuilder has access to that services-config.xml
we were talking about through the UNC path. No need to copy it over
to your workstation and you can keep it consistant amongst
developers this way.
Uncheck the Use built-in ColdFusion web server
for the Web root use the shared webroot from your server you
shared out above and the name of the root file for your sites
folder inside that shared directory.
Example: \\MyServerName\wwwroot\MyCoolNewFlexSite
For the Root URL you will want the actual URL that you will
be using to get to your website.
http://www.mycoolnewflexsite.com
(Again your DNS should be pointing to your local development
servers ip address and not the real world web address for your
site. If you do not have DNS running in your network then use your
local workstations Hosts file to simulate the same thing.)
Down below that will be a field called "Output
folder". This is where flex is going to put the files that
it Compiles. For this you will want to have the same exact path as
the Web Root. It may already be in there with a debug folder
attached to the end. I prefer to take off the debug folder and just
make it exactly the same as my web root path.
By using the UNC paths instead of local files this allows
FlexBuilder to compile directly to the servers wwwroot directory
you will be testing the files from. No need to transfer the
compiled files this way. Might not make your network admin happy
but you will have at least two weeks before your network admin can
figure out where the extra traffic is coming from and then only if
they are well above average. And trust me I know wherefore I speak
about network admins. Odds are they will never figure it out and if
they do it just gives you reason to have them install a gigabit
switch and hook you up to the server at a faster pace. It's part of
the work requirements RIGHT?!
OK so after you have those paths in place click on validate
configuration. You may get a warning about there already bing a bin
directory but just ignore that and move on.
click next.
On the next screen for the main source folder I prefer to
erase the default src it uses. That's up to you.
For the main application mxml file just use whatever is there
for now. You can always change it later.
For the Output folder URL change it to the URL of your site.
I.E.
http://www.mycoolnewflexsite.com
Then click finish.
FlexBuilder will open up your applications main MXML file. To
test if it is working you should be able to just add in a text line
and click the compile button.
<?xml version="1.0"
encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute">
<mx:Text id="hw"
text="Hello World!" />
</mx:Application>
If all goes well it will pop open your browser to the URL
from your development server with your compiled Hello World
displayed. If you get that far you are almost home.
Still a bit more though.
So once this is cone click on Window > Preferences and
then click the + next to ColdFusion and click RDS Configuration.
In the RDS configuration highlight localhost and just click
remove.
Then click new button.
For Description put in the Name of your development server.
For the Host Name also put in the name of your development
server
For the port choose port 80 (Assuming you set up IIS or
Apache as recommended.)
Assuming you have not yet set up multiple users in ColdFusion
Administrator then your User Name is going to be simply
"admin".
Put in your password you set up for the RDS password when you
were installing ColdFusion Server.
Click on Test Connection. If it tests out then you will have
just completed your install. The Test Debugger will not work until
you turn on Debugging in the ColdFusion server Administrator. I
will let you figure that out on your own as I am getting tired of
typing.
I realize that's a lot but once you have done it 3 or 4
hundred times it becomes second nature.
Hope that helped and did not muddy the waters. I realized as
I was typing that this really is not a good explanation without
pictures. Next time I do a development install I will have to take
screen shots I guess.
- Joe -
Problem calling AS3 class's methods from Flex Project
Sorry if this is a stupid question, but after 2 days of Web
searching and 2 books give up; I am a Java and c# programmer and am
having problems calling AS3 classes (in packages) from Flex Builder
2 Flex Projects; the AS3 classes work great as Flex Builder "AS3
Projects", but when I try to use the classes in a Flex Builder
"Flex Project" I am able to see and set their properties, but
cannot see (through "code completion") their methods (unless the
class extends another AS3 class; and in that case I can see the
base class's methods). Here is the code:
AS3 Example Class:
package asText {
public class CheckWord {
public var strData:String;
public var strAProperty:String;
public var intAProperty:int;
// Constructor
public function CheckWord() {
public function TestMethod():void {
trace("test...");
public function WordLength():int {
var intLength:int = 0;
trace(strData);
intLength = strData.length;
return intLength;
} // From Method WordLength
} // From Class CheckWord
} // From Package asText
The MXML code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute"
width="442" height="488" horizontalAlign="center"
verticalAlign="middle"
backgroundGradientColors="[#c0c0c0, #c0c0c0]"
xmlns:asTheText="asText.*"
>
<asTheText:CheckWord strData="Test words" />
<mx:Panel title="Welcome to ........" width="337"
height="393" horizontalAlign="center" verticalAlign="middle"
layout="absolute" y="15" x="50">
<mx:Text text="First Name" enabled="true" width="68"
fontWeight="bold" x="27.25" y="36"/>
<mx:TextInput id="txtFName" x="112.25" y="34"/>
<mx:Text text="Last Name" enabled="true" width="68"
fontWeight="bold" x="27.25" y="66"/>
<mx:TextInput x="112.25" y="64" id="txtLName"/>
<mx:Text text="email address" enabled="true" width="87"
fontWeight="bold" x="17.25" y="96"/>
<mx:TextInput width="189" id="txtEmail" left="112.25"
top="94"/>
<mx:Button id="butSubmit" label="Submit" x="95" y="194"
click="asTheText:TestMethod();"/>
..............and so on ............
All this does is give me an 1180 error:
1180: Call to a possibly undefined method TestMethod.
flexConveyMovie1.mxmlThanks, I have it working; I was not assigning an "ID" to the
"MXML use of the class" (whatever the formal name for that is;
like: <asTheText:CheckWord id="MyText" strData="The Data" />
) and then I was not referencing that ID in what I am refering to
as calling methods for the Class; like:
<mx:Button id="butTest" label="Test Function" x="39"
y="208" click="MyText.TestMethod();"/>
Also, I did some tests on this, and I am shocked that
apparently neither of these two "uses"(?) of a custom AS3 class
actually "call" the Class's constructor. Does that make sense or is
that the result of how I am structuring this?
Phil
Maybe you are looking for
-
Loading weight information is missing in Inbound Delivery
Hi, I have a problem in one of my inbound delivery where I canu2019t able to view the loading weight information. (Ie, loading weight field is blank). Can any body tell me what has gone wrong and how to rectify the same? Awaiting for your replies. Ch
-
Hi Does anyone has Oracle BPM SLA template to share please? Kindly send it to [email protected] I mean the Oracle BPM specific SLA Template. Which may or may not include integration with other systems. Many thanks in advance Regards deepak Edited by:
-
All I need to know is how to bold the tag <CompanyID> </CompanyID> OR the text within it (1001, in given sample). Here's a sample line of the data.txt file I'm working with: 1001,"Fitzsimmons, Des Marteau, Beale and Nunn",109,"COD","Standard",,109,8/
-
CUVA with Win 7 (32 Bit and 64 Bit) OS
Hi All, Our users are facing issues with CUVA 2.1.2.0 [ CDP 2.1(0.6) ] with Windows 7 32 Bit and 64 Bit. On Windows 7 the CDP Driver and version is visible but not on Windows 7 64 Bit. On both the operating systems, users are not able to access the C
-
/sap/hana/xs/sqlcc/ - 403 forbidden
/sap/hana/xs/sqlcc/ is blocked even for our SYSTEM user (403 forbidden), how do we gain access to it?