swc cannot show public members in flash builder - actionscript-3

I'm trying to create an as3 library (.swc), but weird thing happened. In flash builder 4.7, I can only see the classes of the swc just created, but cannot see the public members. The swc is totally ok to be used, but it doesn't show the public members in package explorer in flash builder 4.7. Does any one know how to fix? Thanks.

Related

AS3. Class flash.system::Worker could not be found

I can't solve the problem with the Worker class in ActionScript project. I get:
VerifyError: Error #1014: Class flash.system::Worker could not be found
As i searched, VerifyError means that the SWC file is corrupted. How should i fix it ?
Code is simple (Variable of worker Declared) and no additional code except this worker exists.
Tried updating playerglobal SWC with the newest 16 version. Tried updating my Adobe flash professional 5.5, Flash player.
In my projects settings the latest player i can choose to work with is "Flash player 10.2". How could i update it ? or is it the latest ?
import flash.System.Worker;
public class workerService extends Sprite {
var worker:Worker;
public function workerService() {
}
}
Thanks in advance.
That's because the worker class got implemented in Flash Player version 11.4. I'm not sure how to update the SDK in Flash 5.5 though, but maybe this link helps:
https://helpx.adobe.com/x-productkb/multi/overlay-air-sdk-flash-professional1.html
Or just use an ide like flashdevelop.
Add compile flag "swf-version=17" to your flash project and install the latest FlashPlayer.
Add Additional compiler arguments in properties as show in below image

How to instantiate a mx comobox in a pure actionscript project on flash builder

I am trying to use the following code in a pure actionscript project ( no mxml ) on flash builder :
import mx.controls.ComboBox;
...
...
var cmb:ComboBox
....
addChild(cmb)
....
But when compiling, the combobox does not appear. I can see it in the mxml version though.
I don't think, mx and spark can be used unless it's mxml project. But anyways i solved, by using the combobox in flash ide, and creating a swc file. And then using fl.controls.ComboBox in the flash builder.

Can I make a FlexMobile project pure as3?

I've got an as3-robotlegs (signals) app that I want to run as a mobile project. I've discovered I can't have a pure as3 entry class ie.
this works fine for a Flash professional or pure as3 project
public class TestX extends Sprite
{
protected var context:ApplicationContext;
use namespace mx_internal;
public function TestX()
{
LoaderConfig.mx_internal::_url = loaderInfo.url;
LoaderConfig.mx_internal::_parameters = loaderInfo.parameters;
context = new ApplicationContext(this); <---
this.stage.nativeWindow.visible = true;
}
}
now for FlexMobile I need to do something like this in index.mxml
<fx:Declarations>
<context:SignalCafeContext contextView="{this}"/> <----
</fx:Declarations>
But do I really need to convert all my flash components to Flex UIComponent or is there a way I can use pure as3 (no mxml) in a FlexMobile project?
Thanks
Edit:
Took me a few days to churn through these great answers... all of them correct as I far as I can tell, I found amy's publishing arbitrary swfs works great, i found it easier to go with a pure actionscript mobile project
Command-line Adobe AIR Developer Tool (ADT) can package a SWF for mobile.
This way, any monolithic SWF created from various toolchains may be packaged for mobile.
Download AIR 3.5 SDK.
Assure JRE, or use the one from Flash Builder.
Execute adt to package your SWF to an IPA:
adt -package -target [ipa-test | ipa-debug | ipa-app-store | ipa-ad-hoc]
-keystore iosPrivateKey.p12 -storetype pkcs12 -storepass qwerty12
-provisioning-profile ios.mobileprovision
HelloWorld.ipa
HelloWorld-app.xml
HelloWorld.swf icons Default.png
Otherwise, Flash Builder 4.6 has pure ActionScript mobile projects:
Select File » New ActionScript Mobile Project
Although a Flex SDK is referenced for AIR, the project will be pure ActionScript.
Choose mobile settings.
Assure all references are merged in to code.
Which will stub your project as:
package
{
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
public class X extends Sprite
{
public function X()
{
super();
// support autoOrients
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
}
}
}
But do I really need to convert all my flash components to Flex
UIComponent or is there a way I can use pure as3 (no mxml) in a
FlexMobile project?
In Flash Builder 4.6 you can create an ActionScript Mobile project; which should do what you want. Creating a Flex Mobile project, assumes you will have dependencies on the Flex Framework and imposes some specific patterns on you, such as having your main application file be an MXML file that extends Application.
You can just take your swf and publish it for mobile, using these steps.
Create a new ActionScript Mobile Project and give it a name.
Go to Project -> Properties -> Builders.
Uncheck the “Flex” builder (but leave the “AIR application.xml Builder”)
Now copy your arbitrary swf (ie: myapp.swf) into the bin-debug folder.
Create an ActionScript class with the same name as the swf, (ie: myapp.as) in the default package space.
Right click on the myapp.as file and click on “Set as Default Application”
Now it will generate a myapp-app.xml, go and open and edit as you like.
Click on run configuration and package your app for you the platform you want.
Repeat steps to add more SWFs to package.
You can also find steps to go back and forth between Flash Pro and Flash Builder here.

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.

Flash Builder 4 Issue

I'm having a strange issue with Flash Builder 4.
It shows all my objects in a Flash Professional FLA file as errors.
Let's say I have five buttons in my moview named: button1, button2, button3, button4, button5.
Flash Builder is flagging all of them with red error on the right side of the screen as button1 is undefined. But it is button in the FLA movie and FB4 cannot see it.
It's really annoying with a large project showing 100 errors.
This never happened before in using Flash Builder.
It still compiles and plays in Flash when I test movie, but I would like it to either see the buttons and accept them or ignore them altogether.
This is the problem with lib - playerglobal.swc
Try to remove it from library list then add it again. Path to the swc may look like this:
C:\Program Files (x86)\Adobe\Adobe Flash CS5.5\Common\Configuration\ActionScript 3.0\FP10.2
Did you choose "Flash Professional Project" when you created the Flash Builder project?
If so, check that the .fla is present and pointing to the correct path in Project -> Properties -> Flash Professional
and that it is set as default in Project -> Properties -> Actionscript Applications