SWF Video with JS Controls - javascript

I'm new to flash and just need to do a simple task but I can't manage to get it to work.
I'm trying to import a video (flv) into a SWF container and need to AS functions which should be exposed to JS (using liveconnect or anything else).
These two function should toggle sound on/off and toggle play/pause. I dont need any user interface or a full featured player, just these two functions.
Does anyone know a straight foward tutorial which covers these issue?
Thanks in advance!

If I am interpreting your question correctly , then I think you want to trigger Actionscript functions using javascript. Well, that this possible. You need to explore the ExternalInterface class. Here are some useful tutorials.

Related

How can I use Javascript to play media on clicking an object?

I apologize for the basic question but I am new to programming and I cannot find the answer to my question in the tutorials I have. I have developed a HTML/CSS page for a project due in two days. I would like users to click an object on the page to access a presentation (which will play full screen). At the end of the presentation the user should be returned to my HTML page.
Can this be done using Javascript with HTML? If so, how?
Will I need to convert the presentations into mp4s?
Thanks, Amit.
You can do 2 things,
1.- you can convert the pptx to a mp4 an playit in fullscreen or
2.- you can use a presentation js framework to help you with that (you will not use a fullscreen)
http://lab.hakim.se/reveal-js/#/13 here is the link to a presentation js framework =)
(this is the first one i click in google results but i guess you can get anothers, there are few of it)
I can not gess your code, but I think, what you are looking for is here:
http://jplayer.org/latest/developer-guide/#jPlayer-event-type
http://jplayer.org/

Super simple flash player for audio?

I'm looking for a super simple plugin or flash file for audio to fallback from HTML5 <audio> tag with.
I want to be able to connect this to my own element rather than have an existing interface/player. Super leight weight with the only functionality being stop() and play(). Or even easier a play that automatically calls stop first then replays.
Also would be nice to have a dynamic swf for fallback so I don't have to load multiple copies of it on the same page and can just load it once and feed in a file path for it to play.
A jQuery or JS plugin would be great or if anyone has a link to just a swf file that would be awesome and I can just create my own plugin for that.
I've used Flowplayer for quite a while now. Its API allows us to control the player easily through Javascript.
http://flowplayer.org/
If you're looking for something even simpler, take a look at Dewplayer. Never used it, but seems nice and simple enough.
http://www.alsacreations.fr/dewplayer-en.html
I'd recommend SoundJS, which I've helped develop. It allows you to write a single code base that works anywhere, and gracefully uses Web Audio, html audio tags, or flash as appropriate.
Hope that helps.

How do I build an 'embeddable widget'?

My webapp uses both Rails and JS and I would like users to be able to embed the images they upload to any blog/site.
What do I need to know, from a development point-of-view to allow me to create the functionality that generates an 'embed' link. It can be either a link like YouTube does, or a JS snippet or anything.
Just want to get a high-level overview of what I need to be able to do and how to proceed.
Thanks.
I would try using iframe. I created a widget which used javascript and I put it all into a single html file hosted on my website. Then I gave away an iframe snippet like this for example...
<iframe src="http://mywesbite.com/myWidget.html"></iframe>
The user can simply place the iframe snippet into their website and that's it!
I'm a little bit late to the party here, but I just wanted to add to Jacob's answer.
You can easily allow the user to customize the embedded content (perhaps choose light on dark vs. dark on light text to more closely match the page's environment/design) by using query params within the iframe src:
<iframe src="http://___.com/widget?theme=light&size=large"></iframe>
of course you'd probably want to build a UI to allow the user to make these distinct changes... you can't expect average user's to do that by hand:)
Vimeo's UI for customizing embedded videos is pretty nice if you want a best case scenario.

Using Javascript /jquery displaying a single file in a fly out

I am trying to add a player that will play audio on the site. It will play music randomly and display only play/pause? are there any good javascript or jquery plugin/api?
What is the best way to display a single music filefrom a list of files on a flyout on hover? it will have the option to display filename and download option.
Any examples would be much appreciated.
Thanks
I'm not sure of any preexisting libraries that handle this, but it wouldn't be hard to accomplish with HTML5's <audio> tag. You can control it using the play() and pause() methods. Check out HTMLMediaElement on MDC for how to interact with the element.
You could use JQueryUI to create some sort of a dialogue for presentation.

How to convert a PowerPoint slide into HTML?

I am trying to insert PowerPoint slides into HTML preserving links in the PowerPoint slide. I was just wondering if any of you knew a good method to maybe exporting a PowerPoint slide to an HTML and then displaying it in a div on your page, with a link to say do a JavaScript function on that same page.
I've never used it, but PPT2HTML might help. There's also this blog that describes how to save your presentation for the web then modify it.
This isn't exactly what you're after, but there are some html-based presentation tools like S5, DOMSlides you might want to consider as they wouldn't suffer from being translated.
You can use the jQuery plugin called PPTXjs.
This plugin convert pptx to html using javascript only (no server side code needed).
It is based on PPTX2HTML but support a lot more shapes, media (audio, video) and more.
Using:
$("#result").pptxToHtml({
pptxFileUrl: "path/to/slide.pptx"
});
For more details : https://github.com/meshesha/PPTXjs.
1)u can convert it to flash swf
2)convert all slides to an image file and then add 2 buttons(Back,Next) with calling the next and previous images based on an integer variable and this buttons will show u the previous and next slides :)
sorry but u cant embed it without copying all the Powerpoint-exported HTML code in your div tag
Though not quite what you asked, Google Docs or Slideshare both let you embed Powerpoint as flash - perhaps that would be a more elegant way to do this. That is, if embedding is the aim!
I remember there was a function in PowerPoint to export it to an HTML, I would do that and then have it in the page using an <iframe> and then put that inside a <div>

Categories

Resources