I was wondering if there was some way to be able to load Flash objects from a custom Java web-browser. I want to be able to view YouTube videos for example.
I have read this: Embedding Flash Component into Java App, but I am not sure how I would use this seeing as I do not have the Flash locally as a .swf. I do not know where it loads the Flash file from. Also, I would prefer the solution to not require buying a product.
I know for sure that this is do-able using C# and the WebBrowser class because that uses the Flash plugin for IE, I was just wondering if there was a way to do this with Java.
Related
I want to make an interactive trainer for a BIG program. Instead of just making video tutorials, I was thinking to make the videos in camtasia, and edit them with flash. After the videos are ready, I want to upload them to my server, and the C# application should load the flash videos from my server.
I found the solution of adding flash videos to C# with the axShockwaveFlash control.
I can load videos from youtube for example like:
axShockwaveFlash1.Movie = "https://www.youtube.com/v/N6O2ncUKvlg";
But if I have the flash videos to my server like http://mywebsite.com/intro.flv how can I load them ?
I guess I need to set them in a player or something like that.
Another idea would be to just make the videos in camtasia, and export them to "web" directly from camtasia. But still, don't know how to tell the control to load it.
I just want to make this, so that it will be a little harder to download the videos. I know they can be easily downloaded also in this way, but it's more safer than just uploading them to youtube.
Here is an extended article on how to load flash in a WinForms application
In short:
Add toolbox reference to COM Component Shockwave Flash Object (found in C:\Windows\System32\Macromed\Flash)
Add control Shockwave Flash Object to Form
Set property Movie: [control].Movie = "[path]\animation.swf";
Start movie: [control].Play();
Apparently, there is a way to add C# XNA projects to websites such that they can be viewed on the site from a normal web browser, presumably there are concessions to safety that the browser will enforce.
How is this done?
edit: I think the C# project might only ever runs on the server, the client being sent something it can understand.
There is http://jsil.org which will convert a compiled .Net application into a client side Javascript "app" ... and has been demonstrated to work rather successfully on XNA games.
It only handles 2D stuff and sound is / was needing to manually rewritten last time I checked but it does a pretty impressive job from what I've seen of it.
It should be noted that whilst this may get the job done, it's certainly not going to produce JS that is anywhere near the quality (i.e. maintainability) of a game that was written in JS from the start (using something like three.js or easle.js)... so if this for a commercial product, you may wish to explore rewriting / porting the game specifically for web as a serious alternative.
This isn't possible without a plugin. The plugin would work only on Windows, obviously, since XNA is built on DirectX.
There's no plugin that currently does this, to my knowledge.
It's not difficult to write a plugin, however, you'd have to do this for each browser you want the plugin to run in.
If you want your game content on the web, a better route is probably HTML5 and its Canvas functionality, which works on all modern browsers. You might be interested in this article, which discusses porting a 2D XNA game to HTML5 Canvas.
If you need 3D support, you could go the HTML5 WebGL route, although Internet Explorer doesn't support it.
Probably what you want is Google Native Client (NaCl). I haven't played with it (yet), but as far as I know, some game engines like Unity works on it.
Hope it helps.
I am attempting to make a web browser object in C# which support html5 as good as Safari or Chrome. My main goal is for playing video, or supporting the video tag. So far i have got WebKit.Net working and playing html5 video off w3schools website, but this only works when quicktime is installed; and i really hate that route. I read http://en.wikipedia.org/wiki/HTML5_video so i know somewhat why quick time is needed.
I am currently attempting to wrap up chromium into a C# web browser object. Do you have any suggestions on how i can accomplish creating a C# Web Browser which support html5?
You could also check out my new project: https://github.com/chillitom/CefSharp
This brings the Chromium Embedded Framework to .Net / C#. See the Github page for source, binaries and example.
Some features:
a browser control with navigation commands
INotifyPropertyChanged events
ExecuteJavascript
Register your own scheme/protocol handlers
intercept resource downloads
bind CLR objects into Chromium's JavaScript context.
It's still in the pre-alpha stages so all feedback appreciated.
If you're using WPF, you can use http://chriscavanagh.wordpress.com/2009/08/25/a-real-wpf-webbrowser/. This is a Chromium implementation for WPF.
Using ExternalInterface in AS3 is it possible to call OS (C#?) functions within XP?
Example: Set the desktop background to a image supplied by a flash app?
If it is possible would it be different calls when applied to different OS. And what about cross over the Mac?
Any information would be great
Thanks
If you're launching the swf from within a C# app, external interface will do just fine. Nothing will change on the flash side, but you'll need to go through a couple hoops to get it to work in C#. It's not as simple as AMF or External Interface to JS.
All the communications to C# get converted to XML describing the data, and you've gotta write XML to send back to flash. Other than that though, its relativly simple.
Here's some info on how to do it. The AS portion is Flash 8/AS2, but the C# portion should say the same.
When working with Flash from a webpage or as a desktop app, you are limited to a small security sandbox and you will not be able to make any relevant OS call. I thought that switching to AIR would give the developper more flexibility but it doesn't seem correct either. From "The Pros and Cons of Adobe Air":
AIR apps have
file access, clipboard access, support
multiple windows, support drag and
drop, and can trigger notifications
(toast in Windows). If you app needs
to interact with the desktop in other
ways, the chances are that AIR is not
suitable. For example, there is no
access to COM automation, and no way
to execute external applications. The
reason is to maintain cross-platform
compatibility. That's a worthy goal,
but it would be good to have a way out
of the sandbox. Unlike Java or .NET,
you cannot extend AIR with custom
native code libraries. Nor can you
call operating system APIs.
As Alex Jillard commented, if your swf is called inside a C# desktop application, you should be able to access more OS funcionalities although I'm not sure how.
You could use as already mentioned AIR. Another idea would be to use HippoHX (I haven't written this, the similarity with my username is just coincidence). It runs on top of the NekoVM and gives you unrestricted (so no limitations like in AIR ) access to the system.
Does anyone know of a way to script flash objects using WatiN?
I need a way to send arbitrary keystrokes to a flash application. I'm able to login with code such as this:
ie.TextField(Find.ById("email")).TypeText(username);
ie.TextField(Find.ById("password")).TypeText(password);
I'm looking for something like:
ie.FlashObject(Find.ById("flash-object")).TypeText("123");
Or if focus is set to the browser, flash responds, so free text would work:
ie.FreeText.TypeText("123");
Currently I'm using a windows forms app with SendKeys() and it's not very robust.
Thanks.
There is Ruby library called FlashWatir. Not exactly what you were looking for, but close.