Adobe Flash Builder : AddChild vs AddElement - actionscript-3

Using Adobe Flash Builder 4.0 ?
Getting error when using addChild(). Compiler suggests about using addElement(). Are both these functions alternate of each other ? Or is it like addChild is deprecated ?

To get clear. Adobe Flash Builder is IDE for developing flex apps. What's important is Flex SDK version. Obviously you're using version 4+. I suggest to avoid using mx (Flex 3) components without strong need. You should read more about Flex 3 and Flex 4 difference.
Post about addChild vs addElement.

Related

FLVPlayback without Flash CS

I'm implementing Google video Ads in flash game, using FlashDevelop. Google has a sample where they're using FLVPlayback component to display video... problem is, I don't have this class anywhere.
I've searched how to add it, but all solutions say "link to C:\Adobe\Flash CS\Components\etc" path, which obiouvsly without Flash CS I don't have... and don't want to install it just for this :)
I wonder if there is a way to get the FLVPlayback without installing Flash CS?
You can try import external adobe components swc through Flashdevelop interface.
Maybe this can help you: link
I quit and just installed the Flash Professional CC, and there linked to the component path, but it didn't work for some reason. Then I included the FLVPlayback.swf component inside my AS3 app, which compiled etc. but as I learned FLVPlayback wasn't really what I needed.
After some fumbling I made it work with Flex Spark component - VideoPlayer, used inside AS3. You can find some code on the devlist: https://developers.google.com/interactive-media-ads/community?place=msg%2Fima-sdk%2Fc3KH11vxSd0%2FeLuYneYpch4J

How to use ArrayCollection and ArrayList in AS3.0 in flash professional mx.collection

Can we use the mx.collection package in as3.0 flash professional (not in flash builder) ? If yes, from where can i get the whole mx package?
ArrayCollection is part of the Flex framework, you would need to include the Flex framework in your CS5 project. I'm not sure if this is possible.

Actionscript mobile library project

I'm developing an ActionScript 3.0 project for Blackberry Playbook, Android and iOS.
I have some custom UI classes, like buttons, that I want to use it in another projects.
How can I make an actionscript mobile library project?
I'm using Flash Builder 4.5, and I'm not using Flex in my code.
Using Flash Builder 4.5:
choose File > Project > New
choose "library project"
check the "include AIR features" box.
This will compile a .swc, a binary file you can distribute easily.
Including AIR in this .swc ensures that all the mobile-oriented features will be compiled as well, i.e. TouchEvent.
Flex classes, that you're not using, won't be included.
You can create ActionScript project, then add it to your mobile project's references (as a source.) Or create Flex library and link it with mobile project.

StageDisplayState.FULLSCREEN vs StageDisplayState.FULLSCREEN_INTERACTIVE

What's the difference between the the two display states?
StageDisplayState.FULL_SCREEN doesn't support keyboard interactivity. StageDisplayState.FULL_SCREEN_INTERACTIVE does, but it works only with Adobe AIR.
Source: Adobe ActionScript3 Reference
StageDisplayState.FULLSCREEN is available in both AIR and normal Flex web apps, Keyboard is not traced
StageDisplayState.FULLSCREEN_INTERACTIVE available ONLY IN AIR and it allows you to used the keyboard. for ex you can type inside a TextInput in FS only with FullScreenInteractive.
StageDisplayState.FULL_SCREEN_INTERACTIVE can work in flex webapp.when you compile web app,you just need to replace the playerglobal.swc by high version,like 11.7。。。
hope it helps you

Capture CTRL+A, CTRL+C keys/events in flex

How to capture CTRL+A, CTRL+C events in flex? It looks like they are special keys/combinations.
As I understand in Flex 3.4 I can capture CTRL+A by capturing Event.SELECT_ALL, and CTRL+C by capturing Event.COPY. BUT it complains that there are no SELECT_ALL static const in Event class.
I'm using Flex SDK 3.4 and Flex Builder for Linux (Ubuntu).
public function MyCanvas()
{
super();
focusEnabled = true;
addEventListener(Event.SELECT_ALL, onSelectAll); // It complains here
addEventListener(Event.COPY, onCopy); // and here
}
According to Flex 3.4 language reference there is SELECT_ALL in Event class. What version of Flex SDK are you using? Can you post example of your code?
Update: It seems the SELECT_ALL has been added in Flash Player 10. Based on this.
I don't see this from the API, but it could be an issue of targeting the right Flash player version.
You're probably not targeting Flash 10. In Project > Properties > Flex Compiler, make sure you've set either Require Flash Version: 10.0.0 (under HTML Wrapper -- yours may read 9.x.x) or otherwise specified the compiler argument -target-player=10.0.0. That ought to do the trick.