How to set swfversion - actionscript-3

I know this seems like a silly question but how can I change the swfversion that Flash Pro sets when it builds the SWF?
I'm using a 3rd party ANA and I'm getting an error message that the SWF for that ANA is greater than my SWF when it publishes the SWF.
Thanks.

In the publish settings (File -> Publish Settings), there should be a dropdown where you can select the Target flash player. I'm using Flash CC and the range it allows me is 10.3 to 11.8.

Related

SWF Movie does not appear when test the flash project

I was trying to test my flash project. As I pressed ctrl + enter, there was no pop up windows for flash player appeared. My other projects work well. Can anyone help me?
there could be many problems and solutions, these are 6 :
1- Check if there is an error in your Compiler Errors window.
2- Restart your pc.
3- If you use (ane) for different platform it won't show preview in many cases.
4- Reinstall your flash or change your flash player or Air version.
5- You might use "NativeApplication.nativeApplication.exit()" somewhere if you have adobe Air project.
6- Start a new project and test it if it shows a preview window copy your stuff from the old one .

WP8 toast notification with custom sound

I'm currenly writing an app where I need to use custom sound for toast notifications (which is sent from cloud). MSDN states that the audio clip must be stored in the app's installation directory or local storage folder. So how is this done?
I tried the CopyToIsolatedStorage() code sample from How to play background audio for Windows Phone. It fetches the audio clip correctly but when the toast should be shown the device won't play any audio or even show the toast which indicates that it can't find the audio clip correctly. In the app, I have a method which shows contents of the push notification when the app is in foreground. From there I can see that the toast notification is sent and received correctly with toast.mp3 sound tag. So the problem must be in the app but I can't figure out what I did wrong.
Tl;dr version:
I want to change toast notification sound, my device is running WP8 with Update 3 and I have a 5 sec long mp3. I can't figure out how and where I should put the audio clip.
I dont think you need to copy the sound to isolated storage, just put it in your main project and set it as content. Then in your Push just reference it.
<wp:Sound>toast.mp3</wp:Sound>
Or if it is in the Assets folder in your project do
<wp:Sound>Assets/toast.mp3</wp:Sound>
Note: This only works for Windows Phone 8 Update 3 and later, works fine for all Windows Phone 8.1.
So the problem was that I blindly assumed one can reference to the audio clip with just <wp:Sound>toast.mp3</wp:Sound> or new Uri("toast.mp3", UriKind.RelativeOrAbsolute), as in the MSDN tutorial, when the file is copied to the root of the isolated storage but this isn't the case. You'll have to include the directory where the clip is in your project to the path, in my case Audio\. Thaks goes to WiredPrairie for pointing this out.
So to wrap things up:
Copy the audio clip which you want to use to the isolated storage with CopyToIsolatedStorage() from How to play background audio for Windows Phone and follow the instructions in Using custom sounds in toasts on Windows Phone 8 Update 3 . And remember to include the directory structure to the path of the clip or put the clip in the root of your project.

Launch music from sd card in wp8

I am working a wp8 app which can read some different types file.Then launch them in a simply way.Like we can launch mp3 using MediaPlayerLauncher .But I failed.Any help will be kind to me.Thanks
I assume that you managed to use ExternalStorage. Firt of all you are not able to see this (mp3) files because they are reserved. What you can do is to change extensions to them and copy to InternalStorage. As you have done that you can play them well with MediaElement or BackGroundAudio.
Also it's not possible (for now) to play directly from ExternalStorage (SD card).

I need to import something in order to use JSON in AS3?

When using the following codeline:
var myjson:Object = JSON.parse("path_to_my.json");
I got the following error:
1120: Access of undefined property JSON.
I had to import any package in order to use the JSON.parse?
Thank you!
[with: Flash CS5 (11.0.0.485), AS3]
JSON is built in to the ActionScript default package starting at Flash Player 11, and is notably higher performance than 3rd party serializers.
With Flash CS5, you need to update the target Flash Player from the Publish Settings. By default it will target up to Flash Player 10.2.
Adobe has a blog regarding Adding Flash Player 11 support to Flash Pro CS5 and CS5.5.
At that page you will find an extension (MXP) install as well as manual instruction of updating Flash Player to 11.
Load CS5 or CS.5 MXP with Adobe Extension Manager, and you will be able to target Flash Player 11.0 from your Publish Settings:
Note that JSON parse takes an object, and not a path to a file.  Your code should give Error #1132: Invalid JSON parse input.

How do I add an event to URLLoader Class?

Keeping into consideration the Actionscript 3 event HTTPStatusEvent:HTTP_RESPONSE_STATUS, which is ONLY AVAILABLE for AIR (and not Flash 9/10)
Quote from site:
Language Version: ActionScript 3.0
Runtime Versions: AIR 1.0, Flash Lite 4
I would like to add the same EVENT by extending the HTTPStatusEvent Class of Actionscript 3 for Flash (9/10).
I'm working on Adobe Flash CS3 and I'm trying to get the "last" location of a URL loader (I'm calling a php with a header("Location: ..."); ) so I need the location after it changes. This should be made directly by flash and I cannot use php proxies not other.
Also, I cannot find the source code of the AIR HTTPStatusEvent Class, which I need to get the event (specifically, the responseHeaders and responseURL properties that the AIR class has).
Of course, if you know of any other way to accomplish this, feel free to share it.
You can't do it this way.
Think about it: You are trying to add behavior to the URLLoader class by extending an event class that is thrown from there. Figuratively speaking, it's a bit like changing the paper size when you've only written letters to your next door neighbor, and now you want them to go overseas - unless you also give them to the mail main, that's not going to be very successful...
I've stumbled across a number of forum threads discussing this, and most of them seem to agree that Adobe prevented access to response headers in Flash versions prior to FP10 / AIR due to some sort of security issue. I'm not sure how much of this information is accurate, but I am quite confident that there is no way to get around this - you can't get the Location:header in older Flash versions.
You will have to find some other workaround. For example, if you have access to the PHP script, you could add an HTML comment containing the redirect location, and parse that value in ActionScript.
<!-- Location: http://google.com/ -->