Flash Builder and External Library - actionscript-3

I have downloaded the as3syndicationlib library from here, but I am having trouble adding it to my project. I dragged the folder into my project > src folder, and when I started importing the files from it (com.adobe.xml.syndication.rss.RSS20) all seemed to be fine, until I hit save. Then I started to get error that say:
Multiple markers at this line:
-1084: Syntax error: expecting identifier before
import.
-The import RSS20 could not be found.
-adobe
-The import rss could not be found.
-The import syndication could not be found.
-The import xml could not be found.
-91 changed lines
I have never used an external library with Flash Builder/Flex/ActionScript3 before so I have no idea what to do. I know that this is probably very simple to do, but I am new at flash builder and flex.
Any help is highly appreciated!
Thanks,
Jacob
EDIT:
I got it to work. What I was doing wrong was I was added source code to my project when I should have added the xmlsyndication.swc file to my project.

You need to add it to a lib folder instead of src... if you don't have a lib folder just make one. Then right click the project in Flash Builder and hit properties, in the menu on the left select Library Path (or something like that), click the Add Folder button and type lib. Do a clean build (Build Menu -> Clean).

Related

ConfigurationBuilder Twitter4j class not found

Sorry, but it seems i cannot find any ConfigurationBuilder class in Twitter4j.
I'm using twitter4j version 3.0.3. I have already tried 3.0.2 android version too.
I have added the jar to build path like core, async, media, and stream.
I tried to :
- import twitter4j.*;
- import twitter4j.conf.*;
- import twitter4j.conf.ConfigurationBuilder;
But Eclipse says that :
Multiple markers at this line
- ConfigurationBuilder cannot be resolved to a
type
- ConfigurationBuilder cannot be resolved to a
type
What do i need?
I have already checked the source folders and there is a class named ConfigurationBuilder.java.
Thank you!
You have to make sure that Android Dependencies folder. To do that, you copy the twitter4j jar file to the libs folder and then right click to Configure Path and add the library.
After that's done, you will see that the library is also copied to the dependencies folder.
Right click on the project > Properties > Java Build Path > Libraries
Make sure that twitter4j-core-x.y.z.jar is really there
Go also to Order and Export tab in the same dialog
Make sure that the twitter4j-core-x.y.z.jar is selected (to get the jar distributed with the *.apk or else you will get something similar to the following at runtime: could not find class ConfigurationBuilder)
Project > Clean
Project > Build All

Problems while trying to use components from another module in intellij idea AS3

i'am trying to use components from another module, but is not working.
Look what i have:
I have my project, its an app to convert files, and its working everything is ok. Now i want to change the interface... for that i cloned a github repository thats is a project with the components that i want to use, and imported it as a module. (should i import as a module or as a project?)
Everything great till now, but when i try to use the components from the module i cant find the classes or even the module...
Any suggestions?
You should add your imported sources as a new module (let's call it B), then you should add a dependency from your original module A to your module B in order to use its code.
See this page on how to configure module dependencies.

When using a swc with embeded files the files are missing but the swc compiles with out errors?

I am making a swc file with code that I have made in actionscript and it works correctly. However after I take all the code and put it into a swc library and it creates the swc with out any compile errors. I go to use the swc and it gives me warnings and want run spaying that
"Description Resource Path Location Type The definition Arrow.Right_png$c7cf89b0fd8fa396e54e299a767d2beb1814885492 depended on by plus.assetsClass in the SWC D:\Adobe Flash Builder 4.7\as3Test\bin\as3Test.swc could not be found projectName line 0 Flex Problem"
Does anyone know why it is doing this or what is going on?
So i figured out what i was doing wrong so what i was trying to do is build some Actionscript into a swc file for reuse in other project.
In side the swc I had some as3 files that had some embed codes in them such as...
[Embed(source="Botton Arrow Down.png")]
public static var buttonDown:Class;
Witch works when it is in a project but when you use the above code in a swc the spaced cause it to not be able to find the embeded file. After the swc is compiled. BUT this does not cause a compiler error in the swc it just causes a warning saying that it can't find the file on the project that you are using the swc in. To fix this just remove all of the spaces.
[Embed(source="Botton_Arrow_Down.png")]
public static var buttonDown:Class;
With the spaces removed it work fine. I don't know about this but it is something to remember when using swc to hold embed assets. Hopefully someone will be able explain why.

Incorrect Paths for an Imported Flex Project

I'm trying to import someone else's Flex project folder into Flash Builder 4.5, and I'm having some problems with the paths. When I load everything up, I'm getting errors that say that the "Type was not found or was not a compile-time constant" for all the .as files living in src. It looks like based on the path settings, it cannot find those files.
So I went to the Package > Properties and tried to add the src folder to the Source Path list, but no luck there either.
One curious thing is that when I look at the error at the bottom, I see Path is set to /ProjectName/src/. Is that an absolute path? Certainly it wouldn't find them if it were.
Can anyone shed some light on getting my Flex project to find my src folder?
Thanks,
Whit
/ProjectName/foo/bar in Flash Builder would be resolved to the project's foo/bar directory, therefore it is not an absolute path.
The project you experience may also have to do with the libraries (SWCs) referenced by your project are not properly referenced. You may go to Project -> Properties -> Flex Build Path -> Library path (tab) and add reference to libraries similar to the fashion you add the Source Path.
Additionally, when source path is correctly added, you would also notice a "virtual folder" appearing in the referencing project, which allows you to directly load and edit the source code of the referenced project.

Getting Type not found error implementing source in as3

I am trying to just compile and run the demos from this article:
Flash talks to max msp via osc
I am using Flash Develop and Flex SDK with an up to date version of air.
When I run the demo: "as3_MaxFlashHarmony" I get an error I don't know how to fix. The source for the entire project is here:
the project
But specifically the error I am getting says:
col: 30 Error: Type was not found or was not a compile-time constant: OSCMessage.
here is the as3 file that it is specifically referencing:
//IHarmonyApp.as
package
{
import org.tuio.osc.OSCMessage;
public interface IHarmonyApp
{
function updateOSCData(msg:OSCMessage):void;
}
}
It uses the libraries Tuio, MinimalComps, and MonsterDebugger. The thing I don't get is that how can it not find OSCMessage if OSCMessage is properly imported? the IDE is making fine references to it and I can open it's declaration. OSCMessage is a public class. I don't get it.
To give some extra info for potential answers, the IDE flashdevelop can find the library org.tuio.osc.OSCMessage just fine, it gives the error regardless of if org.tuio... is a source path or not, and the overall path does not contain any special characters. I don't know if that might matter, but I feel like this is me making a stupid mistake somewhere. I can provide my project zipped if need be.
Thanks!
Edit 9:48, 8/25/12
I do have the file path org/tuio/osc/OSCMessage.as in my project, and the file OSCMessage exists. FlashDevelop can find it just fine and I can navigate to declaration at that location. This is why I got stumped.
Thanks again
In your AS3 folder apart of your de folder you would need to have org folder with relevant folders and classes.
For example to import org.tuio.osc.OSCMessage you would need a file:
../YourPackageRoot/org/tuio/osc/OSCMessage.as
The other way is including a SWC file (all folders and classes zipped into one swc file).
You can include the swc file in FlashDevelop by right clicking the swc file and selecting Add To Library