Facebook with actionscript 3 on Flashdevelop : JSON Conventions Issue - json

I'm trying to use Facebook with Actionscript 3 on Flashdevelop, i've been following this tutorial about setting Facebook :
http://supertommy.me/content/2012/getting-started-open-graph-as3/
The code seems to be clean but i get this error :
WARNING: For content targeting Flash Player version 14 or higher, ExternalInterface escapes strings using JSON conventions. To maintain compatibility, content published to earlier Flash Player versions continues to use the legacy escaping behavior.
I checked the flash player target on my Flashdevelop in the project properties, in tab Output the flash player was set to 10.1, am i missing something ?

Use the clause at the end:
content published to earlier Flash Player versions continues to use the legacy escaping behavior.
as a warning that newer players may render the JSON string differently than the one in FlashDevelop, so you may need to test using a newer debug player as well to avoid security issues.
References
Adobe Security Bulletin: APSB13-08
V-100: Adobe Flash Player Bugs Let Remote Users Execute Arbitrary Code

Related

Is ActionScript a more secure alternative to Flash Player?

With all the security issues with Flash lately I am looking at alternatives for if/when Flash is retired at my work. We use strictly IE 11 and IE11 seems to be very finicky about css3 animations. I see the new Flash has the ability to publish the file as embeddable actionscript files instead of a swf file. Is this a viable alternative to Flash or is this vulnerable to the same security issues Flash has? My assumption is the vulnerabilities exist in the Flash players but I want to be certain.
No. Apples and Oranges, really.
The Flash Player is a runtime environment of the Flash platform (AIR being another). It "plays" .swf files.
ActionScript is the scripting language that an apropriate compiler (mxmlc, for example) compiles into .swf files.
I see the new Flash has the ability to publish the file as embeddable ActionScript files instead of a swf file.
You can embed any file, but guess where you embed it into? Into the swf file.
Again, ActionScript is the programing/scripting language and an swf file is the compiled result.
Flash CC can also export to JavaScript/HTML/CSS. That means that instead of creating a .swf file, a bunch of JavaScript/HTML/CSS files are created.
As you can see in the link you provided, the feature sets are not equivalent.
Note: The 3D Rotation tool in the toolbar of the Flash Professional CC workspace is disabled when creating HTML5 Canvas documents because it is specific to SWF projects and not supported in the HTML5 specification (see Figure 3).
There's a whole bunch of other things not supported
Recommendation
If one comes to the conclusion that the Flash platform is not an appropriate publishing platform any more, why bother sticking to the Adobe Flash program?
It appears to be disadvantageous to cling to the program, just for the sake of keep on using it.
Why not use the CreateJS library on its own? Or any of the other dozens of great JS libraries? There's a lot to explore in the post-Flash era and it is very exiting. It's not a good idea to stay behind, still coding in dead languages, hoping that there's a translator to communicate with the Present. Try to order a pizza in Latin and you know what I mean.
If the goal is to target multiple different platforms, there are alternative tools to do this like defrac or Haxe that allow you to compile from one languages to many platforms.
The answer to the question if compiling ActionScript to JavaScript/HTML/CSS is a reasonable workflow for the future is no. It might be a good tool to port existing projects, but not to neglect the current developments in the JavaScript/HTML/CSS realm.
I seem to get almost weekly Java updates. All these technologies can have security issues, it's just that Adobe react quickly, and release a fix as soon as possible. That does come with a certain amount of publicity.
About using CreateJS on its own, you could do that, and come up with your own libraries to create hierarchy, synchronizing sound to visual events, asset management, etc. You could also do everything purely in code, if your imagination is good enough to do that. Or, you could just use Flash Pro, and get all of those things for free.

Can we use Flash Player 11 abilities through Flex SDK 4.5.1?

As you know BitmapData has some limitation for image size and resolution in Flash Player 10 (maximum resolution is 8192) and for Flash Player version 11 and later, Adobe fixed this limitation and depends on OS we can have all type of huge resolutions in BitmapData.
But my problem is now I'm using Flex SDK 4.5.1 which base Flash Player is 10.2.159.1.
So is there any possibility to use this benefit of Flash Player 11 with my current Flex SDK with implementing a restriction based on Flash version with something like Capabilities.version or not?
Thanks in advance
Yes. You have to :
add the -swf-version=XX arguments to your compiler settings
add the -target-player=11.X arguments to your compiler settings
optionally, grap the corresponding playerglobal.swc and duplicate your FlexSDK, replacing the original SWC file (this is if you need to access new APIs)
Here is a comprehensive tutorial on how to this, and also a very useful chart to know what SWF version to use.
So is there any possibility to use this benefit of Flash Player 11
with my current Flex SDK with implementing a restriction based on
Flash version with something like Capabilities.version or not?
Generally, I don't think the approach of targeting a earlier version and check the actual one at runtime will work because the Player, even if it's version 11.0, will try to act just like the 10.2 if this the version your SWF was compiled for. See the very beginning of this presentation for more details. Use SWFObject to set the minimum player version for your application.
However, since your need is support for larger images, which is somehow transparent to programmers, I am not sure it is actually disabled for older SWFs. That should be tested.

Workflow for app variants targeting different versions of Flash Player

I'm targeting Flash Player 10+ in my application. For Flash Player 10.3+, I'd like to use the EnhancedMicrophone capabilities introduced in 10.3. The difference between the app variants will thus be a couple of lines of code.
Should I create and maintain two separate projects in Flash Builder (and copy any changes from one to the other), or there's a smarter way? Some kind of "preprocessor directives" perhaps that would turn on/off blocks of code depending on the target player?
The following will give the version of the player :
var versionNumber:String = Capabilities.version;
trace(versionNumber);
For me on windows it traces this :
WIN 11,5,502,146
You can parse that and get the 11,5 part for the major/minor version and execute code based on that.

No Hand Cursor or Mouse Events on Sprites in Flash Player 10

My movie targets flash player 10, and I compile it with FlexSDK v 4.51. It compiles and plays with no errors.
But if I view the swf in Flash Player 10, some sprites that are set to buttonmode do not show a hand cursor or dispatch MouseEvents.
In fact, if I play it in the Flash Player 10 debug player, I get an error:
"VerifyError: Error #1053: Illegal override of z in mx.core.BitmapAsset."
So to fix this, I can switch to using an older SDK, version 4.1. Now the error message is gone, but the mouseover problem persists - now for Flash Player version 10 and 11.
There are no flash 11 specific features used. It should be targetable using flash player 10. Any ideas how to fix this problem or what is causing it?
==========
Update
I have determined that the mouse event and the override error are not related.
The mouse event error seems to being caused by using filters. and I have found a workaround, by applying the filter to a child object, instead of the parent.
The error thrown above, is getting caused by an embedded bitmap. And it seems like a fix to that is to use flex SDK 4.1. Any reason not to just use the 4.1 SDK? Any way to make 4.5 sdk compatible with Flash player 10?
You surely have a class that extends BitmapAsset with a property called z. This was not a problem until Flash 10 introduced this as a built-in member variable of any DisplayObject.
You should edit this class and change the name of your property.
Are you sure you're using the latest Flash player? My best guess is you're compiling your program using a Flash version greater than the player is capable of running, e.g. compiling for 11 then running on 10. Have you tried running this in the latest player available?
The error happens because no maybe not any features of 4.5 are use but changed ones are. Simply release with flash player 11 and everything should work fine.

Can a Flash movie targeted for Flash 8 load in a Flash 10 movie and can the 2 pass variables and call methods?

I have existing flash 8 AS2 work that I want to update to Flash 10. Can I update only those elements i need to be Flash 10 and load them in to the Flash 8 movie as an external swf and pass variables and call methods? Is this a good option and what are the issues to be aware of? Eg will a user with player lower than 10 be able to load the flash 8 movie and then find that it breaks because the flash 10 wont load or will the player realise that there is flash 10 content and inform the user that they need to upgrade their player?
thanks
Several questions are overlapping here.
You can update parts of your content without updating the root, but interoperability becomes hairy. When the Flash player plays a SWF, it executes it according to the version tag in the file, not the version tag of the SWF that loaded it. So your F8 content can load in F10 SWFs without any particular issue, except for the following point.
However, if an AS2 SWF loads in an AS3 SWF (or vice versa), communication between them is hairy. I seem to recall there's some limited hand-waving support for setting variables in the root of one or the other, but for anything complicated the recommended method is to use LocalConnection. I've played with it and as I said it's hairy.
Whether content updated to version 10 will play in older versions of the Flash player is a separate question from either of the previous, and the answer is the same regardless of whether it's a lone SWF or newer SWFs loaded into older SWFs. And the answer is, the older player will attempt to play the content, but any newer features won't work, and Flash will not automatically tell the person to upgrade, or refuse to show your content until they do.
You might be able to load Flash 8 into Flash 10 but I would be very surprised if the reverse is true.