I'm trying to load a local video to display it and I'm having this error ( Error #2148) at runtime, I have read in many places what this problem is, about flash security and all that stuff but there's no solution anywhere and some people say that it can't be done.
My swf works fine when loading from internet, I have my cross-domain on my server but is completely necessary for me to create a standalone version which can run without internet connection and load the videos from file system.
May be with different compiling options? I'm using Flash Builder 4.6
Any idea how could I achive a local resource loading?
P.D. I know that the trusted folder can resolve the problem but that implies a configuration change in every computer it runs and I need it to be portable like in a USB to run on any computer that has Flash Player.
Related
I am using Flash Professional authoring tool with ActionScript 3 code. Basically, I'm trying to capture a live webcam feed using NetConnection, NetStream Camera and Video classes via Flash Media Development Server. When I run the code I receive this in my output:
ArgumentError: Error #2126: NetConnection object must be connected. at flash.net::NetStream/ctor() at flash.net::NetStream()
I don't really understand what could be causing this error my code is perfectly fine..Its very frustrating. When I debug I get this:
SecurityError: Error #2028: Local-with-filesystem SWF file file:///C|/Users/Name/AppData/Local/Temp/Untitled%2D1.swf cannot access Internet URL rtmfp://localhost/flashExam.
[SWF] C:\Users\Name\AppData\Local\Temp\Untitled-1.swf - 3853 bytes after decompression
It appears the swf file cannot gain access FMS. Why is this? And, does anyone know what I can do to resolve these issues?
Are you running the SWF locally, e.g., opening in the browser or from a local HTML opened in the browser? Flash doesn't let you normally connect to servers and services outside of the domain. Try running a local server (e.g. XAMPP/Apache) or hosting it somewhere and trying again.
You could also try changing your flash settings to allow your swf location to be trusted. Generally the flash player doesn't allow a swf running from the file system to access resources on the internet. Try heading over to the settings panel and add the folder you are running your swf from.
I am new in html programing and actually I am self-taught.
Recently I found a piece of software that let me pre-render videos to 60 fps.
I thought why not share the results with the world. So i read about how to code in html5. So I created a very simple looking site and everything worked perfectly when I start the html5 file (Videos are playing). So I read that Wamp Server will give me opportunity to share this with the rest of the World.
But everytime I start Wamp and try to view the page neither the videos or tumbnails of the videos load. Everything else like margins placement of the players text works but Wamp somehow blocks every content which is loaded in the html5 file like this:
"D:/Downloads/Pixar Short Film Collection........ ".
I repeat html5 works perfect if I start the index file from any browser but loaded through Wamp it can't load anything.
In IE10 under the videos is showing that is being blocked but in Chrome just blank.
It works when I make the html5 file to load the video from the directory "www", but this is a problem for me because it is going to be a video library site. My "C:" drive will be filled so if someone knows how to fix that it will be awesome.
PS(One week ago I had no such problem but it suddenly appeared. Since then I've been installing and uninstalling Wamp, but no luck)
And another thing, no matter what I did, following every tutorial for installing Wamp configuring my router/modem for 80 port and IP forwarding nothing seems to work even in my local network (typed IP in Chrome) I can't open the web page. Yet everything works, Wamp is green, and from the PC where Wamp is installed I can open the page, but in no other PC.
(I have prefect connection between the two PC's because from the one I can play games on the other without noticeable lag, but Wamp server is like a WALL)
PS
If you are going to instruct me to unblock port 80 in my FireWall I have already done this on both PC's I am running Win8 in both machines!
Thanks in advance!
This is nothing to do with HTML5 it is an Apache configuration issue.
From what you say I assume you have been double clicking on the index file from explorer (filemanager) while you develop and test your site. BAD IDEA.
Now you are using the browser to server the file via Apache ( it does not do this when you doubleclick on filenames in explorer ) you need to tell Apache that it has access to your video library which you placed on the D:\ drive.
To do this you need to configure Apache ( https.conf ) to know about your video library and be allowed to access it. To do this you need an Alias.
Now I have no idea what your setup is but lets assume you have created your site in the wamp folder structure C:\wamp\www\ or C:\wamp\www\sitename
You will need to amend your https.conf file adding something like this to identify the video library and assign access privilages to it.
This can go at the bottom of the httpd.conf file after the Include "c:/wamp/alias/*" line
Alias /videolibrary "D:/Downloads/Pixar Short Film Collection........ "
<Directory "D:/Downloads/Pixar Short Film Collection........ ">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride all
Order Allow,Deny
Allow from all
</Directory>
You can then address the individual videos in the library from your html as
/videolibrary/video1.xxx
using the alias videolibrary setup above and not
"D:/Downloads/Pixar Short Film Collection........ ".
you can access localhost files using wamp via C:/wamp/www/webitefolder/
I'm pretty sure this can be done, but I'm honestly not sure where to begin. I've looked for tutorial after tutorial but still no use.I have a cloud host, I know my Actionscript, My PHP and everything.If somebody could just point me in the right direction I would be very grateful.Thank you!
Yes you can: "Shared objects offer real-time data sharing between multiple client SWF files and objects that are persistent on the local computer or remote server. Local shared objects are similar to browser cookies and remote shared objects are similar to real-time data transfer devices. To use remote shared objects, you need Adobe Flash Media Server." (http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/SharedObject.html)
How you do this on Adobe Flash Media Server 4.5: http://help.adobe.com/en_US/flashmediaserver/devguide/WS5b3ccc516d4fbf351e63e3d11a0773d37a-7ffaDev.html
or Red5: http://www.youtube.com/watch?v=0MuLnMKYe9k&feature=share&list=PL310F0481BCE4D194
and Simple Remote Shared Object with Red5 Flash Server
I'm developing kind of standalone kiosk and having trouble as in title.
Explanation:
Application is launched in Google Chrome with "--app=file://..." option
Application should play video files from local filesystem after user
interaction and after playback is finished app will send log-message
to web server.
Problem:
When using with "-use-network=false" i can use local files and cannot
send messages.
When using with "-use-network=true" i can send messages but cannot
red local files.
When using with debugger and Safari on Mac locally - no problems.
Is there any way to get around this?
Software used: Debian, latest Google Chrome with latest pepper Flash.
As written in Adobe docs:
The local-trusted sandbox—Local SWF files that are registered as
trusted (by users or by installer programs) are placed in the
local-trusted sandbox. System administrators and users also have the
ability to reassign (move) a local SWF file to or from the
local-trusted sandbox based on security considerations (see
Administrator controls and User controls). SWF files that are assigned
to the local-trusted sandbox can interact with any other SWF files and
can load data from anywhere (remote or local).
Besides that, I doubt there is an easy way to do both networking and access local files since this is how Flash security sandboxes work. Or you could write an AIR app (2.6 is last supported version on Linux) or wrap your swf in a native app that would act as a layer between .swf and network/filesystem interfaces.
I developed a flex application that loads images from the fileSystem. You just specify the path to the image, then the app brings some data from local webservices, and then flex loads the image and shows them to the user in an specific way.
I tested it by running the application from FlashBuilder as a WebApplication... so far no problems at all. However when loading the swf from a webpage, on a deployment environment (I.E: JBoss as the web application server) it doesn't loads anything...
My guess is that since now the swf is on the web server context, it can't load files from the local filesystem (I.E: /Users/username/files/myFile.jpg)... is this correct?? If it is... then what should I do in order to load the files correctly?? Or should I upload the files on the server first and then set the file path to an URL pointing to my web server resources?
Thanks a lot.
Flex is able to interact with the users file system without the need for httpservice middle ware. Meaning, I go to your your webpage with your flex app, I am able to load images from my filesystem to view in the app. However, if you want to the user to view images from the server that hosts the swf then you will need httpservice calls to a php, jsp, perl scripts or the like to get the data from your server.