AIR App in a DVD - actionscript-3

I've created an Air app that includes a quiz and some videos. One of the videos is an embedded .flv clip which plays fine. However, the FLVPlayBack video which is an external .mov file doesn't show/play when I burn the app to a DVD. Also, the FLVPlayBack Controls such as stop/play buttons are no show.
I made sure the external .mov file is in the correct path and present in the DVD. I also tried different exports like mpeg4,mp4 etc. Burning it using Nero and as a Data DVD UDF. Everything works fine if the app is running on my computer.
Can someone point me to the right direction? Thanks in advance for your time.

Related

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.

Windows 8 store app HTML-Javascript Developing Music Player Application to play local music files

I am developing a Music Player application which plays local mp3 files from music player.
In my app there is an option to add mp3 files from music folder to the Playlist.
The problem I am facing is when I set local path of the mp3 file as source to Html 5 audio tag it throws an error.
Below is the code
audioPlayer.src = "C:\Users\Sharma\Music\JiveHD Songs";
I am using sqlite database to maintain playlist.
Can anyone help me on this.
So that I can play local mp3 files in my html5-javascript windows store app.
Have you selected the Music Library capability in your package.appxmanifest? You will need to select that for programmatic access to the user's music library. See http://msdn.microsoft.com/en-us/library/windows/apps/hh464936.aspx for more details.
Double-click the Package.appxmanifest file in Visual Studio, click the Capabilities tab, and make sure "Music Library" is checked.

in-app purchases (swf) for ios

I'm creating a game in starling (as3) and i'm offering extra content through in-app purchases. The in-app purchase is in the form of an .swf file.
Now when i try to upload it using apple's application loader, i cant select the swf files.
It seems i can only pass signed zip files? Is this correct and how would this work for me?
Isn't there any other way to upload it? Or is there a way to upload swf files after all?
I'm a bit stuck here, so every help is appreciated.
Go to the settings of Air for IOS and there should be something that says 'included files'. Include your SWF there, also include it in the same folder as your FLA. Import the SWF in your code if you would want to use it, but you shouldn't upload SWFs to Application Loader, only IPAs.

Flash swf publishing

I have a problem here regarding flash+as3.
I'm makin an application that take data from XML file and show it on flash.
Now here's my problem.
When I preview the file, it went just fine. All the data been shown on the flash.
When I published it into .exe file, it also went just fine. All data been shown.
But...
When I published it into .swf file, there's a problem. All the graphical images been show, but data that i got from the XML file does not shown.
But when I took the published file and drag it into flash, it went just fine. All the data been shown.
I'm not quite sure what happen. Is there any setup that I have to do to solve this problem?
Thanks guys.
2 possible problems:
your path to the xml data is relative and your published swf can't find it.
More likely your xml data is on a web server and you are looking at the swf through a local webpage using file:///myfile.html. This fails because of security. Adobe have decided that local swfs can only look at local content, and network swfs can only look at network content. This rule is disregarded in the flash ide because if you have the flash ide you are a developer and you should know what you are doing.
Check out your swf on a web server and report back.

FLVPlayback clip loading delays

I'm building a narrative click-through kiosk app in Flash/AS3. Currently, there are several (10+) locally loaded .flv files that I'm loading into an FLVPlayback component on the timeline. I am experiencing loading delays and am wondering what the best practice / best case scenario for this case. These are all using the "Load external video with playback component" option for Video importing.
So far I've tried implementing it two ways:
One frame, one FLVPlayback playback on the stage named "video_player", and upon the click through / user action to switch the video, I do the following:
var new_flv:String = "next_flv.flv";
video_player.stop();
video_player.source("_flvs/"+new_flv);
video_player.seek(0);
video_player.play();
This results in delays anywhere from a few seconds to 10 seconds.
This is unconventional to me, but I used multiple frames on the timeline. Each frame had an FLVPlayback instance on the stage, each with a different relative path placed in the 'source' property in the component parameters (see http://www.ashleylovespizza.org/stuff/flv_example.png ). The code is switching between frames based on frame label and then hitting play (autoplay is off in the component parameters as well).
var new_flv_frame_name:String = "next_frame";
this.gotoAndStop(new_flv_frame_name);
this.video_player.play();
The issue, again, is that loading is taking a long time. What could prevent this behavior? One long flv that I seek() to different moments of time on the playhead? Can I preload in a separate FLVPlayback instance, similar to double buffering?
Any tips or best practices are appreciated.
Although you have not told me where the flv files are being loaded from (locally or remote), and as you have said you are building a kiosk style app, I am going to go out on a limb here and say that you should almost certainly use Adobe AIR for a kiosk app.
There is no reason for creating more than one FLVPlayback instance, its capable of playing multiple videos using getVideoPlayer(index), its up to you to manage the streams by calling close() on them.
If you are loading files remotely, then using Adobe AIR you can download each video to a local folder using the FileStream class. This will speed up the process of playing back these files.