Play local FLV files in AIR
Hello,
Here is another question regarding FLV files: I'm developing my AIR application using Dreamweaver. My app will need to play some local FLV files wich will be delivered together with the application (they are not online).
I'm using the built in feature of Dreamwever, wich creates a small SWF called "FLVPlayer_Progressive.swf" when you insert an FLV in the page. If I preview the page in Firefox, everything works fine and the video is played, but if I preview it in AIR, there is just a blank box where the video should be.
All the files are in the site's root folder and are included in the "AIR application settings" (FLVPlayer_Progressive.swf, Clear_Skin_2.swf, video.flv, index.html and application.xml).
I tryed importing the video in Flash (through progressive download) and then creating a small SWF wich would work only as a player but it didn't work either. The only way it worked was if I actually embedded the video in the SWF (so there is no external file), but then I have some audio synchronization problems and I loose quality...
So the problem seems to be that AIR doesn't allow the SWF file to access external files, even if they are in the same folder. Is this a bug or is there a workaroud?
Regards,
Manuel
Well, I just spent a few hour trying to make this work, and still nothing... but I think I know now what the problem is.
As you said, after putting an absolute path in (I used "C:\video.flv" for testing) it worked fine! So what I did was create a code that would get the absolute path to the video located in the app-storage folder. I came up with the following:
var flvFile = air.File.applicationStorageDirectory.resolvePath("data/flv/video.flv");
var flvFilePath = flvFile.nativePath;
This code returns flvFilePath as "C:\Documents and Settings\Manuel\Application Data\Test.08196269638DC859464A7A09369FF97BAC18DD7A.1\Local Store\data\flv\video.flv".
I tried suplying this path to the player but it didn't work. So I inserted a new player in Dreamweaver using the path above and I got a message saying that the path can't have any spaces. This seems to be the cause of all my problems! I tried substituting the spaces with "%20" but it didn't work either.
Do you have any ideas?
Similar Messages
-
Standalone app (AIR?) for playing local FLV files
Can someone point me to a desktop app (Windows and Mac) that can play local FLV files?
Thanks!I don't know about an AIR application but you could make any Flash video player you want to create into a stand-alone simply by publishing it as a "Projector" file. So create your own custom player and include your own branding in the design.
Or does this need to have a "browse to file" capability? Have never added that to a vid player so I'm not sure how that would work out.
But here is a simple little .flv video editor that I sometimes use to check out video files:
http://download.cnet.com/Moyea-FLV-Editor-Lite/3000-2168_4-10912717.html
It's a video editor, not just a player... but it's free, and allows you to open and play .flv files.... maybe a temp solution ??
Best wishes,
Adninjastrato -
How do I protect my FLV files? or How to encrypt and decrypt FLV files using AIR?
Hi,
I am working on an AIR application, which is developed on eLearning concept. The application mainly deals with flv files. The application contains a video player component, which will stream flv files from an Apache Server and played in my application. Here my concern is I would like to protect my flv files some how against users who may stream them from Apache Server and use them without my application.
I thought of with an idea to do it. But I don't know whether it will work or not. So I am requesting for your suggestions and better ways to do this with a sample.
Here is my thought:
I would like to place the encrypted FLV files at Apache Server side [ Need to know how to encrpt the FLV files using Flex]
As my AIR application send a request for a FLV file, the Apache server should send the decryption key and a stream of FLV file.
AIR application should take the decryption key, stream of flv file and it should capable enough to decrypt the FLV file and play it in my application. [ But I don't know how to encrypt/decrypt FLV files through flex]
I can do encryption of FLV files using Mac Address of Apache Server system and using Java. But I don't know how can I decrypt the same FLV file ( Encrypted using Mac Address and java ) at AIR application side.
So I would be greatfull If any body help me in encrypting and decrypting of FLV file with a sample using Flex 3.0.
Thanks
Sudheer Puppalarussellfromblackburn south wrote:
Is it because the portable drive is NTFS format and the Mac wont recognise this? If so what do I do?
Yes, this is exactly what is causing the problem. Macs cannot write to NTFS formatted drives, only read. You must move the documents to the internal HDD/SSD of the Mac to be able to edit them.
Or, since you say you don't want to move the documents to the internal storage, you'll need to format the external HDD as FAT32. -
How to play a FLV file located in a second FMS?
How to play a FLV file located in a second FMS not directly accessible by the flash client?
- I am publishing an audio stream from the flash client to a FMS;
- This FMS then publishes the stream to a second FMS, which records the stream to a FLV;
How can I play in the client the FLV audio file that I recorded in the second FMS?
- The first FMS is accessible by the flash client, but the second FMS is only accessible by the first FMS.
thanks in advance
fabioAnswer in http://www.flashcomguru.com/forum/forum_posts.asp?TID=4276&PN=1&TPN=1
-
Anyone have Simple Code to Play an .Flv file on a Website?
Hi,
Can someone please tell me how to make a web page play a .flv file.
Simple, basic code would do.
I have an .flv file uploaded on my website.
How do I get the Flash Player to play the file when someone visits the page?
Again, all I'm looking for is simple code.
Thanks,
Joeadd an flvplayback component to your swf. give it an instance name (say flv). then use:
flv.contentPath="yourflv.flv"; // for as2
flv.source="yourflv.flv"; // for as3 -
Play another flv file in between a flv file
Hi,
I am trying to find a way to play another flv file in between
a flv file. Say, I play flv A for 10 seconds then play flv B and
then resume back to flv A where it just stopped.
Is it possible to do this and roughly how to do it?
Thanks!
Rexhhhzzz wrote:
> I am new to flash. Can the Adobe Flash player play an
external flv file
> directly?
No it can't, you need SWF to load the file within.
Best Regards
Urami
Beauty is in the eye of the beer holder...
<urami>
If you want to mail me - DO NOT LAUGH AT MY ADDRESS
</urami> -
Differences between the 2 ways to play local swf files in flash player
There are 2 ways to allow the flash player to play local swf files:
Add the directory/file of the swf to the Global Flash Player Trust directory. http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9 b90204-7c95.html
Add the directory/file of the swf to the Trusted Location Settings in the Local Settings Manager.http://help.adobe.com/en_US/FlashPlayer/LSM/WS6aa5ec234ff3f285139dc56112e3786b68c-7ff0.htm l#WS6aa5ec234ff3f285139dc56112e3786b68c-7fea
Adobe doesn't mentioned in the document what's the differences between these 2 methods, and they look has the same effect. But when I'm doing it on OS X, Safari 6.1, the first method doesn't work (It was working when I was using Safari 6.0). And then I tried method 2, it works…
So I'd like to ask what are the differences between these 2 methods to play local swf files?For playing local SWF files, Download the Macintosh Flash Player 11.9 Projector
It's a standalone app. Just copy it to your Applications folder. Launch it, and drag the SWF to the Dock icon. It'll play. -
Playing a FLV-File in a projector.exe from a network shared folder failes
We want to load and play FLV-Files while our project files
(Projector.exe) and FLV-files are sitting on a network shared
folder with UNC-Path access (\\FILESERVER\sharename\). The problem
is, that the flv-files do not play. If the same application runs on
a local system it works fine. The System.security.sandboxType is
"localTrusted" because it runs in a projector.
We do not want to map the shared folder to a drive letter!
Thank you
Example:
downloadI apologize if u can not load the page, its a hosting company issue, their server goes up and down randomnly so please to retry 15mn later, it will be available. Thanks.
-
I need to play an mp3 file in my AIR app. But I won't
necessarily know the path to the file because I need to use things
like the storage directory. So, would I have to do something like
this to get that done:
var file:File =
File.applicationStorageDirectory.resolvePath("path/to/mp3");
var urlRequest:URLRequest = new URLRequest(file.nativePath);
and then load the sound from that? Or is there some way that
AIR has provided to skip the first step?
Thanks!
Kyle@ paus akid,
There are two things wrong here.
One, you should never use a nativePath in place of a URL.
This happens to work on Windows because the nativePath is
interpreted as an absolute path. However, on Mac and Linux, a
nativePath is indistinguishable from a relative URL. Since relative
URLs are resolved against the application directory (in general),
you get the app:/ URL scheme. So change:
var req:URLRequest = new URLRequest(file.nativePath);
to:
var req:URLRequest = new URLRequest(file.url);
The second issue is that you don't initialize your file
object before using it to resolve a second path. Instead of:
var file:File = new File();
file = file.resolvePath(currentRandomSong);
You should do something like this (using the appropriate
directory):
var file:File = File.usersDirectory("path/to/mp3");
See
Developing
cross-platform AIR applications for more information. -
Use space bar to play an FLV file
I have an external FLV file on frame 25 of my flash movie. I
would like to make it so the user has to press the space bar for
that FLV to play. Right now it plays automatically when we get to
frame 25. How can I do this?
Thanks,
RichHow do I change to Actionscript 2.0? It won't let me enter
the code. If something is done in Actionscript 3 already, I am
guessing that I can't used 2.0. Then what should I do?
Thanks,
Rich -
Embedding local .swf file in AIR app
Hi all,
I want to include a small Google Maps .swf file as part of my overall HTML based AIR application and I was wondering whether anyone here has had any success in achieving this. Currently, my set up looks like this:
AIR xml file:
<?xml version="1.0" encoding="utf-8" ?>
<application xmlns="http://ns.adobe.com/air/application/1.5">
<id>gmaps</id>
<filename>gmaps</filename>
<version>0.1</version>
<initialWindow>
<title>gmaps2</title>
<content>gmaps2.html</content>
<systemChrome>standard</systemChrome>
<transparent>false</transparent>
<visible>true</visible>
<width>1200</width>
<height>1000</height>
<x>20</x>
<y>20</y>
<minimizable>true</minimizable>
<maximizable>true</maximizable>
<minSize>850 636</minSize>
<resizable>true</resizable>
</initialWindow>
My gmaps2.html file:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>GMAPS</title>
</head>
<body>
<div id="map_canvas" name="map_canvas">
<object
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
width="800px"
height="600px">
<param name="movie" value="app:/flex/GMapsController.swf">
<param name="quality" value="high">
<param name="flashVars" value="key=CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC CC">
<embed
width="800px"
height="600px"
src="app:/flex/GMapsController.swf"
quality="high"
flashVars="key=CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC CCCCCC"
pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash">
</object>
</div>
</body>
</html>
My GMapsController.mxml file:
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<maps:Map xmlns:maps="com.google.maps.*" id="map" mapevent_mapready="onMapReady(event)" width="100%" height="100%"
url="http://my.domain.com" key="CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC"/>
<mx:Script>
<![CDATA[
import com.google.maps.LatLng;
import com.google.maps.Map;
import com.google.maps.MapEvent;
import com.google.maps.MapType;
private function onMapReady(event:Event):void {
this.map.setCenter(new LatLng(40.736072,-73.992062), 14, MapType.NORMAL_MAP_TYPE);
public function setLocation(lat:Number, long:Number):void {
]]>
</mx:Script>
</mx:WindowedApplication>
When I open my air app, I don't get any error messages and it appears that the swf is not loaded at all.
When I switch my AIR .xml file to point to the GMapsController.swf file instead of the gmaps2.html file, it works perfectly - this gives me the impression that there's either:
1. Something wrong with including a WindowedApplication in a HTML file.
2. Something wrong with including a local .swf file in HTML based application.
I've tried referencing the .swf file in the html file from a remote server with the following:
<div id="map_canvas" name="map_canvas">
<object
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
width="800px"
height="600px">
<param name="movie" value="app:/flex/GMapsController.swf">
<param name="quality" value="high">
<param name="flashVars" value="key=CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC CC">
<embed
width="800px"
height="600px"
src="http://my.server.com/GMapsController.swf"
quality="high"
flashVars="key=CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC CCCCCC"
pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash">
</object>
</div>
but no luck with that.
Any help would be greatly appreciated.
Thanks
SeanBrandon,
Thanks for the link - I wasn't aware about the HTML Loader class and how it relates to loading Google Maps. I'm not using the HTML loader class though, so I'm not sure how it relates to the issue I'm having.
I'm currently following the advice outlined at http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS4B441C24-BAE3-4110-91FD-A4E5EEFB2467.htm l where the SWF object is loaded through JavaScript, but I haven't had any luck with it yet. I'm pretty new to Flex/Flash/AIR applications - I'm starting to think it could be something simple wrong with my .mxml file:
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<maps:Map xmlns:maps="com.google.maps.*" id="map" mapevent_mapready="onMapReady(event)" width="100%" height="100%"
url="http://my.server.com" key="CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC"/>
<mx:Script>
<![CDATA[
import com.google.maps.LatLng;
import com.google.maps.Map;
import com.google.maps.MapEvent;
import com.google.maps.MapType;
private function onMapReady(event:Event):void {
this.map.setCenter(new LatLng(40.736072,-73.992062), 14, MapType.NORMAL_MAP_TYPE);
public function setLocation(lat:Number, long:Number):void {
]]>
</mx:Script>
</mx:WindowedApplication>
I've tried creating a different .mxml file from the code outlined http://www.mikechambers.com/blog/2007/11/07/air-example-native-drag-and-drop/ (just as an example), just to make sure that the problems I'm having are not related in any way to the Google Maps API for Flash. Even with this second .mxml file, I still haven't had any luck in getting the swf content to load locally from the HTML file. However, if I set the content element in the AIR .xml file to look like this:
<content>DragAndDropExample.swf</content>
... it works as expected.
So, this has started me thinking that you cannot include a .swf file which has a base tag of WindowedApplication in a HTML based application? Can anyone confirm that this thinking is correct?
Has anyone here managed to load .swf content in a HTML based application using the code outlined at http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS4B441C24-BAE3-4110-91FD-A4E5EEFB2467.htm l?
Thanks
Sean -
Playing local authorware files in IE 7
I cannot play published Authorware files in the Internet
Explorer 7 from my local computer. I get error messages "invalid
map files etc". The published files play correctly in a local
Mozilla browser and also if I upload them on a server and play them
online with Internet Explorer 7. Is there a local setting, which
solves the problem? Normally I like to test the files on my
computer before uploading all the published files.
Thanks
Ruth"ivoryruth" <[email protected]> wrote in
message
news:f1s522$ctd$[email protected]..
>I cannot play published Authorware files in the Internet
Explorer 7 from my
> local computer. I get error messages "invalid map files
etc". The
> published
> files play correctly in a local Mozilla browser and also
if I upload them
> on a
> server and play them online with Internet Explorer 7. Is
there a local
> setting,
> which solves the problem? Normally I like to test the
files on my computer
> before uploading all the published files.
There is no local setting, as such. What you must do is
reference the aam
file as a literal folder path - File://c:/work/test.aam
(that's not quite
right, the File:// should be a little different), instead of
the default
relative reference that is used by Authorware.
Alternatively, I think you can still test by clicking on the
aam file
instead of the htm ...
Steve
EuroTAAC eLearning 2007
http://www.eurotaac.com
Adobe Community Expert: Authorware, Flash Mobile and Devices
My blog -
http://stevehoward.blogspot.com/ -
How do I play an .flv file ?
I got an email with a .flv attachment. I understand this is a flash file. What do I need to do to play this file?
Windows XP 32 bit
Your site check says I have flash version 10.1.53.64
I never explicitly installed flash, I understand it came bundled with my Chrome browser.
The little twirling thing played ok on your site so I think the software is ok, I just don't know how to invoke it to play the file in my email
EdYou have to install Flash Professional to get the"stand alone" Flash Player. It's a testing component for projects without having to open them in a browser/webpage.
As far as "invoking" an flv. You'd do it like any other media file. "Double click". If Windows then asks you to choose a program to open it with (assuming you downloaded VLC Player), choose VLC as the default for flv files and it will open, your flv will play.
I have about 1500 flv files downloaded from YouTube and hundreds of other news and tube sites. They play just like AVI or MPEG files in VLC. -
Playing a FLV file on the browser
Hello,
I've made and extensive research on the forum about this one but couldnt resolve it here, so i've came up with my own case.
I can only make a swf video to work on a DW page using the insert/media procedure. The flv file shows as a blank window not even the player is showing.
Here is a testing version of the page: http://www.bedeco.ma/TCL.php
The script folder (swfobject_modified.js and expressInstall.swf) as well as the flv file itself, the skin file and the flvplayer progressive file are all there in the root directory at exactely the same level as the testing page.
I've also checked that there is no space whatsoever in the files names...also the flv file is tested successfly using Adobe media player.
the swf file is working but loops endelessely so i want to add controls for the user ..and obviousely the flv format is the way to go.
Help please.I apologize if u can not load the page, its a hosting company issue, their server goes up and down randomnly so please to retry 15mn later, it will be available. Thanks.
-
Playing various flv files in FLVPlayer from HTML
I have a .swf file (id=myVideo) that contains an FLVPlayer
instance (myFLVPlayer) embedded (object and embed) on my web page.
In a separate <DIV> I feature several thumbnails and
descriptions of videos that the visitor can play by clicking the
image.
Can I use javascript to call
myVideo.myFLVPlayer.contentPath="myselection.flv" as an onClick
action in the HTML?
I'm using Flash 8 and AS2.
Any suggestions, examples, or links would be
appreciated.Thanks for the input.
The approach of opening another window doesn't fit in with
the look and feel (design values and aesthetics) of the site. I
suppose I could make a separate .html for each video, keeping the
remainder of the page identical. But this would create a
maintenance nightmare as well as creating more interaction with the
server.
I also realize that I could just put the thumbnails and AS
directly into the .swf and make it work technically. But then as I
add new videos in the future I'd have to make changes to the .fla
and re-publish the .swf. At some point in time, the Stage would
have to be so large as to render that approach impractical. In
addition, it would reduce my flexibility to place thumbnail objects
in the browser window with respect to other HTML/CSS.
So, bottom line is that what I'm looking for is the right way
to go HTML->Javascript->Flash. I know that Javascript can
talk to the Flash instance. The question is, what is the best
approach to allow it to touch the FLVPlayer instance within my
.swf?
Admittedly, it's become more of an issue with me because I'm
using Flash 8 and AS2. Much of the documentation I've found applies
to later versions of both. Because of design changes as the
products evolved, most of that isn't useable for me. It does get
confusing.
Any help, examples, or links would be appreciated.
Maybe you are looking for
-
Insert sysdate value to date type column in DB
Hi All I need you help. How to set Last_Update_Date to a default date in sql- For example when a user runs the query, the query show display only those values which got changed as of that day's date. For Example. If I run the query on May 22nd the qu
-
How do you get your imessage to start working again after getting IOS6? On your ipod
I recently updated my ipod 4th generatiom to IOS6, imessage was first working great and now it has seemed to stop working... Does anyone know how to this fix this? Iv tried resetting the network connections and signed in and out of imessge
-
How to compile .java to .class in .jar file
Hey. I have code to make a .jar file, read .java files, and save them as .class files in the .jar file. When I open the .jar file, it says that the magic numbers on the classes are wrong. So I figured that Java must compile the .java files to .class
-
Finding Non Standard Service Accounts from all AD Computers / Servers
Hi Guys, I am trying to get the list of all Service Accounts, which are non-standard from an AD domain network using PowerShell. The code is provided below. But it is not working (Through individual cmdlet through console, working fine.) Tried withou
-
Can I set current location in Safari?
Safari always passes a zip code to web sites that is 50-80 miles away from me. My Wi-Fi is connected to a Dual Wan router attached to two DSL modems. I live in the middle of 52 acres so my Wi-Fi signal is not in range of anything other than my house.