Flash Builder SWFLoader Embed Giving Errors - actionscript-3

I am working on a Flash Mobile project in Flash Builder 4.7. I am getting 4 "Flex Problem" errors when embedding the source of a spark SWFLoader object in the MXML. The errors I get occur in a range of Flex SDKs, from 4.6 to 4.14. For years I have not had a problem doing such an embed, but recently this began to crop up. Similar code works on a coworkers computer, despite everything about our setups seemingly identical. To troubleshoot this error, I created a new Flex Mobile project, with the only code in the MXML being:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark">
<s:SWFLoader source="#Embed(source='Logo.swf')"/>
</s:Application>
The errors I get are:
1084: Syntax error: expecting rightbrace before end of program. line 29
1084: Syntax error: expecting rightbrace before stream. line 25
1084: Syntax error: expecting rightparen before s. line 25
1094: Syntax error: A string literal must be terminated before the line break. line 25
There is no Path given for the errors. My project clearly has no line 25 or 29, so I don't know where this error could even be occurring.
The 'Logo.swf' file is in the right location. It is just a vector graphic with no action script code in it.
EDIT:
The source of the problem appears to be the very nature of embedding a SWF, even external to SWFLoader. The below MXML code, with a script embed in place of the SWFLoader embed, gives the same 4 errors as the previous:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark">
<fx:Script>
<![CDATA[
[Embed(source="Logo.swf")]
[Bindable]
public var swfCls:Class;
]]>
</fx:Script>
</s:Application>

While not a complete solution, I found a workaround to the problem. It appears that once a workspace has this bug, it stays there. Any new projects created within it will have this bug.
My solution was to create a new workspace, create a new dummy project with an embedded SWF which DID work, and then import a previous project which had been having the error into this new workspace. Alas, the old program's bug disappeared. Apparently, if the workspace already has a working program in it, anything subsequent should not have the problem.

Related

Using Doxygen with a manual tag file to generate links to external, online, docs

I have written a library, that uses another 3rd party library. This 3rd party library is provided online at a particular website. I have successfully used DoxyGen to document MY project, but I’m having great difficulty getting it to generate links to the 3rd party, online, documentation.
I figured out that I can create “dummy” entries for those classes in my files, and have pages generated for them, these pages have a link to the online documentation. The disadvantage to this is, I am forced to have a page on MY docs that are nothing but a link. Ideally, clicking on a 3rd party class should take the user DIRECTLY to the online documentation, rather than making users to go though a “do-nothing-but-link” page.
I have attempted to use External tag files for this, but keep getting errors when doxygen runs, and the classes tagged remain not-links in the output. I have not found ANY examples that use a manually created tag files to reference online documentation, but based on the wording of the doxygen instructions, it appears this should be doable.
My current tag file currently looks like this(though I have tried quite a few variations):
ExternalTags.xml
<?xml version="1.0" encoding="UTF-8" standalone="true"?>
<tagfile>
<compound kind="class">
<name>Vector3</name>
<filename>Vector3.html</filename>
</compound>
</tagfile>
And my config file contains the following line(also tried many variations):
TAGFILES = "externalTags.xml = http://docs.unity3d.com/ScriptReference/"
When the tag file is REMOVED from the configuration, doxygen runs without any errors. WITH the tag file option included, doxygen always generates the following error:
lookup cache used 941/65536 hits=6682 misses=1048
finished...
error: Fatal error at line 1 column 1: error while parsing element
error: Fatal error at line 1 column 1: error while parsing prolog
How can I resolve these errors, and get the links to be generated properly in the doxygen output?
Finally figured it out: it appears, I was missing part of the tag-file contents (namespace section).
When using the following tag-file contents, I got no error, and the links to Unity Types specified in the tag-file appeared properly in the output.
Also, note the filename fields do NOT include the .html extension.
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<tagfile>
<compound kind="namespace">
<name>UnityEngine</name>
<filename></filename>
<class kind="class">UnityEngine::PlayerPrefs</class>
<class kind="class">UnityEngine::Vector3</class>
</compound>
<compound kind="class">
<name>UnityEngine::PlayerPrefs</name>
<filename>PlayerPrefs</filename>
</compound>
<compound kind="class">
<name>UnityEngine::Vector3</name>
<filename>Vector3</filename>
</compound>
</tagfile>
Probably not related to the issue, but have not tested changing it back, I renamed the tagfile: unity3d-doxygen-web.tag.xml
It's been a year, but if someone else hits this, the issue comes from the first line:
<?xml version="1.0" encoding="UTF-8" standalone="true"?>
should read as:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
Doxygen just does not recognize true as a valid keyword.

AIR 4.0 Flash Builder Error: Initial Content Not Found

I am making a starling app in flash builder 4.7 in actionscript 3 as mobile actionscript project. Everything was going fine until I decided that I wanted to change the name of the project and the name of the document class. Then I started getting the error message. I have already looked at a few posts, tried what they suggested, and still get the error when I try to debug it.
Error Message:
Process terminated without establishing connection to debugger.
initial content not found
Launch command details: "/Applications/Adobe Flash Builder 4.7/eclipse/plugins/com.adobe.flash.compiler_4.7.0.349722/AIRSDK/bin/adl" -runtime "/Applications/Adobe Flash Builder 4.7/eclipse/plugins/com.adobe.flash.compiler_4.7.0.349722/AIRSDK/runtimes/air/mac" -profile mobileDevice -screensize 640x1116:640x1136 -XscreenDPI 326 -XversionPlatform IOS /Users/bobolicious3000/Documents/Aclown/RuMenusDMT/bin-debug/HelloDMT2-app.xml /Users/bobolicious3000/Documents/Aclown/RuMenusDMT/bin-debug
What I have tried already:
Changing the parameter in the xml descriptor file:
It was:
[This value will be overwritten by Flash Builder in the output app.xml]
and I changed it to a lot of things including:
<content>RuMenusDMT.swf</content>
Nothing worked.
Changing the header of the xml file.
I am use AIR 4.0 swc, and the xml file header looks like this:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<application xmlns="http://ns.adobe.com/air/application/4.0">
Cleaning the project
I normally like flash builder, but this is really giving me a hard time.
What worked for me was restoring my project's "bin-debug" folder (the directory where my compiled application is output) to a previous revision. Personally, I'm running Windows 7, so I just used the OS' revision control.

using FXG with FlashBuilder 4.5 on ActionScript Mobile project

I've been successfully building AS3 projects that import FXG graphics using FlashBuilder 4 for web.
I'm now upgrading to FlashBuilder4.5 so I can build mobile apps but I'm getting an error when I try and using FXGs
The error is
The definition of base class SpriteVisualElement was not found. [Generated code (use -keep to save): Path: data\gold-interface.as, Line: 6, Column: 27]
The line and column number don't seem to relate to anything I can understand...
Can anyone point me in the correct direction to solving this please?
thanks
Kevin
This is an error in generated code. If you go to your project properties, and go to Flex compiler, you can add the
-keep
option to the compilation. This will retain the generated code in the "generated" subfolder of your src folder. From there you can inspect the gold-interface.as file. That's the best I can offer with the information you've given.
There's the potential this is a bug in the Flex compiler (MXML compiler) introduced in 4.5, or an incompatability with FXG (disclaimer: I've never used FXG)

1046 type not found on [spark.skins]::IHighlightBitmapCaptureClient

I've made an ActionScript Mobile project in Flash Builder 4.5 and am getting this error that I can't fix.
1046: Type was not found or was not a compile-time constant [spark.skins]::IHighlightBitmapCaptureClient.
The error does not link to any source.
The project is basically the source to Flixel's FlxCollisions demo, but trying to compile it for iOS.
Using the same src folder (flxCollisions and Flixel 2.5) in a plain Actionscript project does not cause this error and runs as expected.
I've tried creating an empty AS Mobile project with a trace('hello'): that worked fine. Nothing in the project is using spark.skins.
How can I get rid of this error? What should I be looking at, or for?
I have the same issue and my main class embeds a preloader like so:
[Frame(factoryClass="Preloader")]
public class Main extends Sprite
Commenting that line out makes the error go away.
However, this wasn't what I wanted, so I went off and added the following SWC folders as dependencies:
/Applications/Adobe Flash Builder 4.5/sdks/4.5.0/frameworks/libs
/Applications/Adobe Flash Builder 4.5/sdks/4.5.0/frameworks/locale
Which fixed all the errors. But I will still need to carefully go through the build path and yank out all the unwanted code.

How to create an AIR application in Flash Builder 4 without mxml

I am an actionscript developer and I know nothing when it comes to mxml. recently switched to using flash builder and I really like it but I want to create an AIR application in flash builder but I don't want to use mxml since I don't need any of the built in framework to accomplish my goal.
Is that possible?
If I have to use mxml to start the application how do I use .as files with .mxml files?
So far I have been able to import a .as file, but I can't use addChild(). If I can get some help on how to do that I would be so grateful I have spent hours on end failing at this. Thanks
create a class (in .as file) extending UIComponent and use it as a root display object, add a creationComplete listener in the constructor and use it as an entry point. and so the only mxml code you need is:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:mx="library://ns.adobe.com/flex/halo"
xmlns:loc="*"
xmlns:s="library://ns.adobe.com/flex/spark>
<loc:YourRootClass/>
</s:Application>
Recent versions of FlashBuilder allow for creation actionscript AIR project directly. If this isn't your case, just create new AIR MXML application, add new actionscript class and set it as default application. Then you can remove MXML. Also see this for details.