New topic: This is how to put youtube videos on your desktop app :)
<http://forums.realsoftware.com/viewtopic.php?t=47060> Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message seanclancy Post subject: This is how to put youtube videos on your desktop app :)Posted: Sun Feb 24, 2013 10:04 pm Joined: Fri Jan 08, 2010 9:59 am Posts: 268 Here's a really easy way to put youtube videos on your app First of all, put a HTMLViewer control on your screen then, in the open event of your window paste this: dim a,js as string js="<script type="+chr(34)+"text/javascript"+chr(34)+"><!--"+EndOfLine+"var message="+chr(34)+chr(34)+";function clickIE() {if (document.all) {(message);return false;}}function clickNS(e) {if(document.layers||(document.getElementById&&!document.all)) {if (e.which==2||e.which==3) {(message);return false;}}}if (document.layers){document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}document.oncontextmenu=new Function("+chr(34)+"return false"+chr(34)+")//--></script>" a="<iframe width="+chr(34)+"420"+chr(34)+" height="+chr(34)+"315"+chr(34)+" src="+chr(34)+"http://www.youtube.com/embed/r6GuWfAPJPw"+chr(34)+" frameborder="+chr(34)+"0"+chr(34)+" allowfullscreen></iframe>" Dim f As New FolderItem HTMLViewer1.LoadPage(a, f) the JS is a javascript chuck that stops people right-clicking on your HTMLViewer. You can leave that out if you want to... just change JS to JS="" The video in this event is me doing a demo for lancaster guitars (Guitar is my real job!) a is simple the youtube embed code. You have to replace " in a string with "+chr(34)+" enjoy, Sean Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 1 post ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
