Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Developer
DachFlach
Posts: 148
Registered: ‎12-06-2010
My Device: Not Specified

Adding SDK 3.0.0 SWCs to Flash CS6 apps

I no longer see any documented support for Flash IDE and adding libraries to take adavantage of QNX.

 

It used to be, when PlayBook was coming out, that you would add a qnx-screen.swc.

I do not see that in the SDK anymore.

 

When I attempt to add any of the SWCs from the new SDK, it throws errors throughout my app.

 

Is there a New special way to add them?

Merged into code, external, RSL ?

 

As an example, I am tryng to add an in-app purchase feature and thought adding the blackberry.swc would include this, as it appears to contain the net.rim.blackberry.payment package.

It currently just breaks everything.

 

Advise, leads..  all welcome.

 

 

Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Adding SDK 3.0.0 SWCs to Flash CS6 apps

Have your tried adding in the ANEs needed (device and skin)?
Please use plain text.
Developer
DachFlach
Posts: 148
Registered: ‎12-06-2010
My Device: Not Specified

Re: Adding SDK 3.0.0 SWCs to Flash CS6 apps

I have added the ANEs, set the qnx-air.swc to external and I get not a compile time constant - errors.

I posted about this in the definitive guide to air apps for playbook discussion.

Please use plain text.
Regular Contributor
JimmyO
Posts: 93
Registered: ‎02-03-2011
My Device: Not Specified

Re: Adding SDK 3.0.0 SWCs to Flash CS6 apps

I am having these same issues.  I have tied the libraries into CS5.5 successfully for PB, and I am familar with ANEs  ... but I cannot seem to get the right "set up" for the BB10 libraries in Flash Pro.

 

I assume the steps are:

1. include the relevant qnx.fuse swcs as part of the AS3 libraries.  Are these the same as the ANEs?

2. create the swf using Flash

3. package using the command-line tool, including the ANEs

 

Any advice / help on the setup would be much appreciated.

 

...Jim

 

Please use plain text.
Developer
DachFlach
Posts: 148
Registered: ‎12-06-2010
My Device: Not Specified

Re: Adding SDK 3.0.0 SWCs to Flash CS6 apps

Have you successfully used SDK2 for PlayBook yet?

If not, I would try that first.

 

Are you targeting AIR 3.1 ? try that too.

Please use plain text.
Regular Contributor
JimmyO
Posts: 93
Registered: ‎02-03-2011
My Device: Not Specified

Re: Adding SDK 3.0.0 SWCs to Flash CS6 apps

The frustrating part is that my issue is with some components and not others.  I am using Flash Pro CS5.5.  I have the qnx fuse ui component Label working properly with the following:

1. qnxui.swc is linked in in my AS3 library path and set to external

 

2. as3 code can successfully:

import qnx.fuse.ui.text.Label;

 

3. as3 code can successfully use:

var myLabel:Label = new Label();

 

4. .swf is created using Flash CS5.5 Pro

 

5. blackberry-airpackager successfully packages the .swf, -app.xml,  QNXSkins.ane succesfully and everything runs properly 

 

So far so good on the above.

 

However, I am trying to get QNXStageWebView working, which is documented as being part of qnx.media

https://developer.blackberry.com/air/apis/bb10/qnx/media/QNXStageWebView.html

 

1. I set link paths to every .swc that is included with the developer toolkit.

2. Flash IDE successfully allows:

import qnx.media.QNXStageWebView; //for some reason QNXStageWebView is not part of qnxmedia.swc???

3. as3 code is:

var webView:QNXStageWebView;

4. cannot create .swf ..???

error message is: qnx.media:QNXStageWebView cannot be found

 

Any info or clues anyone can provide would be much appreciated. 

 

...Jim

 

Please use plain text.
Developer
DachFlach
Posts: 148
Registered: ‎12-06-2010
My Device: Not Specified

Re: Adding SDK 3.0.0 SWCs to Flash CS6 apps

Sorry. I have not used QNXStageWebView
Please use plain text.
Regular Contributor
JimmyO
Posts: 93
Registered: ‎02-03-2011
My Device: Not Specified

Re: Adding SDK 3.0.0 SWCs to Flash CS6 apps

I managed to get the proper linking / packaging of QNXStageWebView working using Flash Pro.  In case anyone else wants to use Flash Pro, the following might help:

 

A. ensure that you are using AIR3.1 and nothing higher than that

- instructions to change your AIR version are here; these are for going to AIR3.2 but follow the same methods/instructions/order but instead use the AIR3.1 SDK

http://www.yeahbutisitflash.com/?p=2949

 

B. link qnx-air.swc; ensure that it is set to external linking

- you do this by clicking the wrench on the right beside the scripting plug, and then select the library path tab, and then finally click on the little 'f' to add a .sec

- once it is added, click the little triangle and set the linkage to external

 

C. your as3 code should look something like:

import qnx.media.QNXStageWebView;
import qnx.events.WebViewEvent;
 
var webView:QNXStageWebView = new QNXStageWebView();
webView.stage = stage;
webView.viewPort = new Rectangle(0, 0, 200, 200);
webView.visible = true;
stage.nativeWindow.visible = true;
webView.addEventListener(WebViewEvent.DOCUMENT_LOAD_FINISHED, itsloaded);
webView.loadURL("http://www.google.com");
 
function itsloaded(evt:WebViewEvent):void {
//loading done
}
 
D. click file/publish.  You might get some error messages since it cannot find the qnxstagewebview info, but you should have a fresh .swf created by this process
 
E. ensure you have a xxx-app.xml file.  It should look something like the following.  Note that air is set to 3.1 in the second line, and that qnx.system.QNXDevice is set as an extension
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
        <id>net.example.test</id>
        <filename>bb10test</filename>
       <name>bb10test</name>
        <versionNumber>1.0.0</versionNumber>
         <copyright>Example Inc.</copyright>
        <initialWindow>
                <content>bb10test.swf</content>
        </initialWindow>
<extensions>
           <extensionID>qnx.system.QNXDevice</extensionID>
        </extensions>
</application>
 
F. ensure that you have a .bar descriptor file. Mine is identical to:
 
G. copy the .ane files that came with the bb 3.0 sdk into your working directory.  To package and deploy, use the following command line:
blackberry-airpackager -package bb10test.bar -installApp -launchApp bb10test-app.xml bb10test.swf QNXDevice.ane -device xxx.xxx.xxx.xxx -password password
 
 
Please use plain text.