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
Contributor
bkirvin
Posts: 48
Registered: ‎09-08-2013
My Device: Z10
My Carrier: None

Flash Builder is anything but simpler

I'm trying to work with Flash Builder and I'm finding it anything but simpler.

 

Flash Builder 4.6 adds links to qnx-screen that don't exist anymore, won't let me access public variables on MovieClip(parent) because FB says they are undefined, and I can't for the life of me get my Flash Professional library symbols onscreen no matter how many times I add the exported SWC file from Flash Professional.

Please use plain text.
Developer
KermEd
Posts: 175
Registered: ‎05-18-2009
My Device: NA
My Carrier: NA

Re: Flash Builder is anything but simpler

[ Edited ]

Qnxscreen - that's a RIM bug not Flash Builder. Happened to me to for a while when upgrading SDK's between PB releases.

 

As for movie clip etc - I'd love to help but I'm not sure what you mean. But then again, I build my apps fully in FB only and don't use the other flash programs. 

 

Right now, with latest release and FB4.7 - everything works for me 'as it should'. There were some hiccups during the upgrade (which is kind of normal for BlackBerry, they don't seem to test upgrades very well). But I had bigger issues upgrading my cascades this time around. 

 

With that said, if your relatively new to FB - it can take a bit to get a full understanding with the parts. But as someone who's pumped out about 70 odd apps via AS3 for BB10 - you can do it very fast and very well and cross platform. It just takes forever to get to that state :smileyhappy:

 

But I agree. Blackberry has put a lot of effort into building an AIR SDK - but not the same level of care into implementing it into the IDE for some reason. 

Please use plain text.
Contributor
bkirvin
Posts: 48
Registered: ‎09-08-2013
My Device: Z10
My Carrier: None

Re: Flash Builder is anything but simpler

a MovieClip is a multi-frame symbol in Flash builder used to create animated sequences. A Sprite is a single frame Symbol. These symbols can be referenced by name and put in the display list (which makes them visible on screen). this is done by declaring a var equal to the symbol name and then using addChild(var).

 

actually, the var is declared equal to a function using the same name as the symbol name. I'm not sure what exactly the function does other than the fact that the library symbol appears on screen after addChild is executed. if you had a symbol named playergraphic, you would do this:

 

var myplayergraphic = new playergraphic();

addChild(myplayergraphic);

 

I just got used to using MovieClip because Flash Professional kept throwing me errors when I tried to code action and interaction into Sprites (did I mention I'm self taught?). Something about a method conflicting with a static type.

Please use plain text.
Developer
KermEd
Posts: 175
Registered: ‎05-18-2009
My Device: NA
My Carrier: NA

Re: Flash Builder is anything but simpler

Sorry, my bad.  I follow you with MovieClip, I just meant I wasn't sure what you meant about accessing their variables.  And no worries, I am self taught as well - and being a non-AIR dev I just refer to these things as Display Objects.  But now I get what you mean.

 

var mc:MovieClip = new MovieClip();

this.addChild(mc);

mc.x = 100;

 

The above would create a movie clip, and move it around stage. 

 

However, in your other samples, creating a custom MovieClip class - say like so you can reuse it as a framework - is a little different.  Lets say you had a custom class called myMovieClipClass, and added a variable called public var bgCol:int = 0x111111;

 

var mc:myMovieClipClass = new myMovieClipClass();

this.addChild(mc);

trace(mc.bgCol);

 

The above would show the var exists.

 

That should work without needing to make bgCol static.  You use this method for things like objects on your stage. 

 

Now, what if you only wanted one instance for life in your project that anything could call.  mySettingsClass or myLoggingClass for example.  Lets say in logging you put public static log(msg:smileyfrustrated:tring):void { trace(msg); } yo would probably want to call it from anywhere.

 

Imstead of assigning it to a var like above, you would just use...

 

myLoggingClass("Error");

 

if that makes sense.

 

there is a good possibility your MC is on the stag, added and moving around.  But if its empty or you are using empty variables (i.e. accessing width while it is off stage, or sliding using stage width before the stage 'exists') you wont see it do anything.  And you would need to trace it out...

 

Please use plain text.