How to use Example from Adobe reference in FlashDevelop IDE - apache-flex

I try to use the example from Adobe help reference as following address:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/controls/Tree.html#includeExamplesSummary
I open FlashDevelop IDE, creat a new Flex 3 project, then copy the code of example to the main.mxml, save it, then run builder.
It failed with "...\TreeExample\TreeExample\src\Main.mxml(5): Error: Could not resolve <s:Application> to a component implementation." error message.
There is a "How to use this example" link beside this example, but I didn't find any useful information I want.
How can I run this example in FlashDevelop IDE?

It seems, that you try to compile component from newer Flex sdk with older one (3.x instead of 4.x)
Download newest from Adobe site:
http://opensource.adobe.com/wiki/display/flexsdk/Flex+SDK
And install it to Flash Develop:
http://www.flashdevelop.org/wikidocs/index.php?title=AS3

Related

Unable to create a JavaFX project in Netbeans IDE 16 [duplicate]

I've been banging my head on this one for ages and all of the tutorials I've found don't seem to work. When I try to create a new JavaFX project in Netbeans 14, using JDK 18 and the latest JFX download for Windows here:
https://gluonhq.com/products/javafx/
Also tried with JDK and JFX 17 and still no luck. I get this error:
I've added the libraries like so:
If I try to add the platform folder, it won't let me progress through the dialogue:
I can't find solutions to this anywhere and, again this is the same with JDK 17 and 18, and JFX 17 and 18. I've checked the documentation and there's nothing that seems to solve the issue.
It says to go to the JavaFX tab and enable JavaFX, but there's no JavaFX tab... Unless they mean this:
But if that's it then, as you can see, it's already enabled and it's still not working. I'm totally lost. I don't understand why the documentation is so poor for FX, for every IDE. It's honestly like they don't want people to use it and every tutorial I'm finding is using outdated versions of NetBeans, the JDK and JFX D-: (they also don't solve the issue even if I do follow them).
If anyone could help guide me, I'd really appreciate it.
I would suggest you go to New Project -> Java with Maven -> either Simple JavaFX Maven Archetype(Gluon) or FXML JavaFX Maven Archetype(Gluon). Use the POM to change your version of JavaFX from the default to whatever version you like. I also use the POM to change the JavaFX-Maven-Plugin to the latest version.
I strongly endorse the approach using maven suggested here. This project started exactly the same way; I'd welcome learning of any issues you encounter.
Alternatively, follow the steps outlined in JavaFX and NetBeans: Non-modular projects: IDE. You've created a JavaFX library, but "Don't try to create a JavaFX project." Instead, choose Java with Ant and Java Application to create a new project, shown below, then follow the remaining steps carefully. It's a convenient alternative for a scratch project while you assay maven.
Addendum: The ant code for a JavaFX project, not selected in the image above, may attempt to package dependencies that are no longer required. In particular, a project using module javafx.web may fail with the following error, seen here and here. The easiest fix is to recreate the Java application by choosing Java Project with Existing Sources.
Unable to create javax script engine for javascript.
Alternatively, a simple example using a custom ant script is cited here.

Runnable Jar from a JavaFX 8 project, JavaFX compenents are missing

i created a Javafx project using JDK 8 and when i tried to export it to a runnable .jar file, i got surprised that it doesn't run using CMD, and gives the following error :
"Javafx compenents are missing"
while it works perfectly during the compiling time(using the IDE) when i accessed the .jar files, i found it has just .class files (that i made), and the needed library files that haven't been exported (i made sure to select the "extract need library files extract required libraries into generated jar" option in Eclipse), is there a reason behind of this? and a way to solve it? thanks in advance
Ps: i tried this using Eclipse and Intellij IDE
I just wanna mention once again that I'm using JDK 8 where it has JavaFX library inside of it.
Did you try this?
There are detailed instructions on how to configure your IDE to run JavaFX with newer OpenJDKs (which do not come with JFX components in it).
It also explains how to create a new JavaFX Maven project from archetype, with all the necessary plugins to easily build your application while including the minimal Java components for it (using jlink).
This will ensure that anybody using your application will have those components.

Flash Builder 4.5: could not resolve X to a component implementation

I just upgraded out Flex project to use SDK version 4.5.1.21328 and the Flash Builder to version 4.5
All of the sudden, I'm getting several red tags on the Flash Builder: "could not resolve s:State/fx:Script/whatever to a component implementation"
However, the project builds fine with Maven, and seems to work well too.
Does anyone have any information on how to remove these "problems"?
Thanks.
Finally managed to find a workaround. Adding
--namespace+=http://ns.adobe.com/mxml/2009,${flexlib}/mxml-2009-manifest.xml --namespace+=http://www.adobe.com/2006/mxml,${flexlib}/mxml-manifest.xml --namespace+=library://ns.adobe.com/flex/spark,${flexlib}/spark-manifest.xml
to the "Additional compiler arguments" in properties -> Flex Compiler seems to remove all the red markers.
Great tip. Error I was getting was:
Could not resolve <mx:RichTextEditor> to a component implementation.
I had to add the above settings and do the following to get mine to compile.
Here's what I did:
project properties->Flex Build->Path-> Library path tab. press Add SWC...
add C:/Program Files/Adobe/Adobe Flash Builder 4.5/sdks/4.5.1/frameworks/libs/mx/mx.swc
Then in the Source Path tab press add folder navigate to:
C:/Program Files/Adobe/Adobe Flash Builder 4.5/sdks/4.5.1/frameworks/projects/mx/src
then add in the namespaces as listed in the above article. That fixed it for me.
Clean.
Just as the commenter said, usually just a strange Flash Builder bug. If Project -> Clean... doesn't fix it, comment or revise question.
Your batch builder might be using a different set of library files than the IDE. Look in Project | Properties under Build Path and see what version of the SDK it's using.

How can I tell Flash Builder 4 where to look for FlashPlayer.exe

I uninstalled Flash Builder Beta 2 and installed the Flash Builder 4. I tried to import my new projects, but I keep getting a popup that says:
"
[path/to/Adobe Flash Builder Beta 2/FlashPlayer.exe]
Flash Builder cannot locate the required version of Adobe Flash Player.
Do you want to try to run your application with the current version?
Adobe Flash Player downloads"
I have a run config on a localhost server instead of generating the html wrapper. This only happens with imported projects, but I can't seem to find where in any of the config files the player location is specified.
I don't have a specific answer, but...
Instead of importing projects into a new workspace; have you tried using the same workspace? You can specify the workspace using the data argument when you launch Flash Builder:
flashbuilder.exe data="C:\something\something\something\workspace"
If that doesn't work, you can try to launch Flash builder with the '-clean' command line argument. I've found that fixes a lot of the issues I have.
Also check your SDK on the imported projects. Make sure it is not pointed at an old SDK from the beta 2 directory. After you change the SDK, be sure to clean the project.
Or if none of that works, re-create the project from scratch.

Flex drawing example error

I am new to flex and i am trying to run the code for flex drawing application example given at following path:
http://www.flashcomguru.com/components/flex_whiteboard/whiteboard_demo/srcview/index.html
But I get the following error at the compile time:
''Unable to locate specified base class 'Whiteboard.WhiteboardManager' for component class 'Whiteboard.Whiteboard'.''
Please someone suggest me that why it is coming and how i can overcome this.I am using Flash player version 10 and flex 3.0 sdk for the project.
Please help.
Thanks in advance.
You need to include the WhiteBoard.swc library in your project. If you're using Eclipse/Flex Builder go to project properties -> flex build path -> library path -> add swc. Or moving it to the libs folder should be enough.
The sources for the component are not included in that demo as it is not a free component. I didn't see a demo version either, so unless you buy it, you probably won't be able to run those sources locally.
Sounds to me like your source paths aren't set up correctly. Have a read of this article to see how source paths are set up
http://www.cove.org/ape/quickstart_fb.htm

Resources