PageRenderTime 46ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/qooxdoo-2.1.1-sdk/documentation/manual/pages/widget/flash.html

https://bitbucket.org/vegansk/test_qooxdoo
HTML | 337 lines | 311 code | 21 blank | 5 comment | 0 complexity | 1ab82b2da56171691792ca943aa3574e MD5 | raw file
  1. <!doctype html>
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>Flash &mdash; qooxdoo 2.1.1 documentation</title>
  6. <link rel="stylesheet" href="../../_static/theme.css" type="text/css" />
  7. <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
  8. <link rel="stylesheet" href="../../_static/copies/reset.css" type="text/css" />
  9. <link rel="stylesheet" href="../../_static/copies/base.css" type="text/css" />
  10. <link rel="stylesheet" href="../../_static/copies/layout.css" type="text/css" />
  11. <script type="text/javascript">
  12. var DOCUMENTATION_OPTIONS = {
  13. URL_ROOT: '../../',
  14. VERSION: '2.1.1',
  15. COLLAPSE_INDEX: false,
  16. FILE_SUFFIX: '.html',
  17. HAS_SOURCE: true
  18. };
  19. </script>
  20. <script type="text/javascript" src="../../_static/copies/html5shiv.js"></script>
  21. <script type="text/javascript" src="../../_static/copies/q.js"></script>
  22. <script type="text/javascript" src="../../_static/copies/q.placeholder.js"></script>
  23. <script type="text/javascript" src="../../_static/copies/q.sticky.js"></script>
  24. <script type="text/javascript" src="../../_static/copies/application.js"></script>
  25. <script type="text/javascript" src="../../_static/jquery.js"></script>
  26. <script type="text/javascript" src="../../_static/underscore.js"></script>
  27. <script type="text/javascript" src="../../_static/doctools.js"></script>
  28. <link rel="top" title="qooxdoo 2.1.1 documentation" href="../../index.html" />
  29. <link rel="up" title="Widget Reference List" href="toctree.html" />
  30. <link rel="next" title="Image" href="image.html" />
  31. <link rel="prev" title="Iframe" href="iframe.html" />
  32. <link rel="shortcut icon" href="http://resources.qooxdoo.org/images/qx-favicon.png" />
  33. </head>
  34. <body>
  35. <div id="main-wrapper" class="sphinx">
  36. <div id="header-wrapper">
  37. <section id="header">
  38. <h1><a href="http://qooxdoo.org/">qooxdoo</a></h1>
  39. <nav>
  40. <ul>
  41. <!--
  42. <li>
  43. <a class="" href="http://qooxdoo.org/">home</a>
  44. </li>
  45. -->
  46. <li>
  47. <a href="http://news.qooxdoo.org">blog</a>
  48. </li>
  49. <li>
  50. <a class="" href="http://qooxdoo.org/demos">demos</a>
  51. </li>
  52. <li>
  53. <a class="" href="http://qooxdoo.org/downloads">downloads</a>
  54. </li>
  55. <li>
  56. <a class="active" href="http://qooxdoo.org/docs">docs</a>
  57. </li>
  58. <li>
  59. <a class="" href="http://qooxdoo.org/community">community</a>
  60. </li>
  61. </ul>
  62. </nav>
  63. <script type="template" id="search-options-template">
  64. <select>
  65. <option value="site">Site</option>
  66. <option value="manual">Manual</option>
  67. <option value="blog">Blog</option>
  68. <option value="bugs">Bugs</option>
  69. </select>
  70. </script>
  71. <script type="template" id="search-site-template">
  72. <form action="http://qooxdoo.org/" id="search-form">
  73. <input type="hidden" name="do" value="search">
  74. <input type="search" name="id" placeholder="Search"></input>
  75. </form>
  76. </script>
  77. <script type="template" id="search-blog-template">
  78. <form method="get" id="searchform" action="http://news.qooxdoo.org/" id="search-form">
  79. <input type="search" class="field" name="s" id="s" placeholder="Search">
  80. </form>
  81. </script>
  82. <script type="template" id="search-manual-template">
  83. <form action="../../search.html" id="search-form">
  84. <input type="search" name="q" placeholder="Search"></input>
  85. </form>
  86. </script>
  87. <script type="template" id="search-bugs-template">
  88. <form action="http://bugs.qooxdoo.org/buglist.cgi" id="search-form">
  89. <input type="search" name="quicksearch" placeholder="Search"></input>
  90. </form>
  91. </script>
  92. <div id="search">
  93. </div>
  94. </section>
  95. <div class="decoration"></div>
  96. </div>
  97. <section id="main">
  98. <section id="breadcrumb">
  99. <a href="http://qooxdoo.org">Home</a> &raquo;
  100. <a href="../../index.html">Manual (v2.1.1)</a>
  101. &raquo;
  102. <a href="../references.html" >References</a>
  103. &raquo;
  104. <a href="widget_ref.html" >Widget Reference</a>
  105. &raquo;
  106. <a href="toctree.html" accesskey="U">Widget Reference List</a>
  107. &raquo;
  108. <a href="">Flash</a>
  109. </section>
  110. <section id="content">
  111. <div class="body">
  112. <div class="section" id="flash">
  113. <span id="pages-widget-flash-flash"></span><h1>Flash<a class="headerlink" href="#flash" title="Permalink to this headline"></a></h1>
  114. <p>Container widget for Flash.</p>
  115. <div class="section" id="preview-image">
  116. <span id="pages-widget-flash-preview-image"></span><h2>Preview Image<a class="headerlink" href="#preview-image" title="Permalink to this headline"></a></h2>
  117. <p><a class="reference external" href="../../_images/flash.png"><img alt="widget/flash.png" src="../../_images/flash.png" style="width: 419px;" /></a></p>
  118. </div>
  119. <div class="section" id="description">
  120. <span id="pages-widget-flash-description"></span><h2>Description<a class="headerlink" href="#description" title="Permalink to this headline"></a></h2>
  121. <p>A flash movie can be controlled to a certain extent directly from JavaScript with a number of commands.</p>
  122. <p>These commands do not cover all Flash commands, so if you need more functionality you have to fuse an ActionScript with the Flash movie and start using the ExternalInterface to communicate.</p>
  123. <p>To be able to use the JavaScript commands, three conditions must be full-filled:</p>
  124. <ol class="arabic simple">
  125. <li>the flash object must have been loaded to the DOM tree</li>
  126. <li>the flash object must have received an id</li>
  127. <li>the flash movie or document must have been enough loaded</li>
  128. </ol>
  129. <p>To implement this functionality in qooxdoo we have added three events: &quot;loading&quot;, &quot;loaded&quot; and &quot;timeout&quot;. When the event &quot;loading&quot; is fired the three conditions have not been full-filled, and therefore the commands can't be used. If you wanna make sure the flash object is fully loaded and ready to be used listen to the &quot;loaded&quot; event. When the &quot;loaded&quot; event is fired you can start communicating directly with the Flash object. A &quot;timeout&quot; event is fired when the flash objects fails to load. You can also use the method isLoaded() in code to make sure that the Flash object is actually loaded.</p>
  130. <p>Here's an example that shows how you can control changing to previous frame of a flash movie.</p>
  131. <div class="highlight-javascript"><div class="highlight"><pre><span class="kd">var</span> <span class="nx">flashWidget</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">qx</span><span class="p">.</span><span class="nx">ui</span><span class="p">.</span><span class="nx">embed</span><span class="p">.</span><span class="nx">Flash</span><span class="p">(</span><span class="s2">&quot;/flash.swf&quot;</span><span class="p">);</span>
  132. <span class="nx">flashWidget</span><span class="p">.</span><span class="nx">addListener</span><span class="p">(</span><span class="s2">&quot;loaded&quot;</span><span class="p">,</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
  133. <span class="kd">var</span> <span class="nx">flashFE</span> <span class="o">=</span> <span class="nx">flashWidget</span><span class="p">.</span><span class="nx">getFlashElement</span><span class="p">();</span>
  134. <span class="kd">var</span> <span class="nx">currentFrame</span> <span class="o">=</span> <span class="nx">flashFE</span><span class="p">.</span><span class="nx">CurrentFrame</span><span class="p">();</span>
  135. <span class="kd">var</span> <span class="nx">totalFrames</span> <span class="o">=</span> <span class="nx">flashFE</span><span class="p">.</span><span class="nx">TotalFrames</span><span class="p">();</span>
  136. <span class="kd">var</span> <span class="nx">newFrame</span> <span class="o">=</span> <span class="nb">parseInt</span><span class="p">(</span><span class="nx">currentFrame</span><span class="p">)</span> <span class="o">-</span> <span class="mi">1</span><span class="p">;</span>
  137. <span class="k">if</span><span class="p">(</span><span class="nx">totalFrames</span> <span class="o">&gt;</span> <span class="mi">0</span> <span class="o">&amp;&amp;</span> <span class="nx">newFrame</span> <span class="o">&gt;=</span> <span class="mi">0</span><span class="p">)</span>
  138. <span class="p">{</span>
  139. <span class="nx">flashFE</span><span class="p">.</span><span class="nx">GotoFrame</span><span class="p">(</span><span class="nx">newFrame</span><span class="p">);</span>
  140. <span class="p">}</span>
  141. <span class="p">});</span>
  142. </pre></div>
  143. </div>
  144. </div>
  145. <div class="section" id="demos">
  146. <span id="pages-widget-flash-demos"></span><h2>Demos<a class="headerlink" href="#demos" title="Permalink to this headline"></a></h2>
  147. <p>Here are some links that demonstrate the usage of the widget:</p>
  148. <ul class="simple">
  149. <li><a class="reference external" href="http://demo.qooxdoo.org/2.1.1/demobrowser/#widget~Flash.html">Embeded Flash in qooxdoo</a></li>
  150. </ul>
  151. </div>
  152. <div class="section" id="api">
  153. <span id="pages-widget-flash-api"></span><h2>API<a class="headerlink" href="#api" title="Permalink to this headline"></a></h2>
  154. <div class="line-block">
  155. <div class="line">Here is a link to the API of the Widget:</div>
  156. <div class="line"><a class="reference external" href="http://demo.qooxdoo.org/2.1.1/apiviewer/#qx.ui.embed.Flash">qx.ui.embed.Flash</a></div>
  157. </div>
  158. </div>
  159. </div>
  160. </div>
  161. <div class="bottom-nav">
  162. <a class="prev" href="iframe.html"
  163. title="previous chapter">« Iframe</a>
  164. <span class="separator">|</span>
  165. <a class="next" href="image.html"
  166. title="next chapter">Image »</a>
  167. </div>
  168. </section>
  169. <section id="sidebar">
  170. <div class="sphinxsidebar">
  171. <div class="sphinxsidebarwrapper">
  172. <ul>
  173. <li><a class="reference internal" href="#">Flash</a><ul>
  174. <li><a class="reference internal" href="#preview-image">Preview Image</a></li>
  175. <li><a class="reference internal" href="#description">Description</a></li>
  176. <li><a class="reference internal" href="#demos">Demos</a></li>
  177. <li><a class="reference internal" href="#api">API</a></li>
  178. </ul>
  179. </li>
  180. </ul>
  181. <h4>» Next topic</h4>
  182. <p class="topless"><a href="image.html"
  183. title="next chapter">Image</a></p>
  184. <h4>« Previous topic</h4>
  185. <p class="topless"><a href="iframe.html"
  186. title="previous chapter">Iframe</a></p>
  187. <div id="searchbox" style="display: none">
  188. <h3>Quick search</h3>
  189. <form class="search" action="../../search.html" method="get">
  190. <input type="text" name="q" />
  191. <input type="submit" value="Go" />
  192. <input type="hidden" name="check_keywords" value="yes" />
  193. <input type="hidden" name="area" value="default" />
  194. </form>
  195. <p class="searchtip" style="font-size: 90%">
  196. Enter search terms or a module, class or function name.
  197. </p>
  198. </div>
  199. <script type="text/javascript">
  200. // $('#searchbox').show(0);
  201. </script>
  202. </div>
  203. </div>
  204. </section>
  205. </section>
  206. </div>
  207. <div id="footer-wrapper">
  208. <footer id="footer">
  209. <div id="supported-by">
  210. <a href="http://1and1.com">
  211. <img src="http://resources.qooxdoo.org/images/1and1.png">
  212. </a>
  213. <p class="claim">
  214. Brought to you by <a href="http://1and1.com">1&amp;1</a>, one of the world's leading web hosts
  215. </p>
  216. <p class="legal">
  217. © 1&amp;1 Internet AG<br>
  218. <a href="http://qooxdoo.org/legal">Legal notice</a>
  219. </a>
  220. </div>
  221. <div id="sitemap">
  222. <div>
  223. <h3><a href="http://qooxdoo.org/">Home</a></h3>
  224. <ul>
  225. <li>
  226. <a href="http://qooxdoo.org/demos">Demos</a>
  227. </li>
  228. <li>
  229. <a href="http://qooxdoo.org/download">Download</a>
  230. </li>
  231. <li>
  232. <a href="http://news.qooxdoo.org">Blog</a>
  233. </li>
  234. <li>
  235. <a href="http://bugs.qooxdoo.org">Bugs</a>
  236. </li>
  237. <li>
  238. <a href="http://qooxdoo.org/license">License</a>
  239. </li>
  240. </ul>
  241. </div>
  242. <div>
  243. <h3><a href="http://qooxdoo.org/docs">Docs</a></h3>
  244. <ul>
  245. <li>
  246. <a href="http://manual.qooxdoo.org/2.1.1/pages/introduction/about.html">About</a>
  247. </li>
  248. <li>
  249. <a href="http://manual.qooxdoo.org/2.1.1/pages/getting_started.html">Getting Started</a>
  250. </li>
  251. <li>
  252. <a href="http://manual.qooxdoo.org/2.1.1/pages/website.html">Website</a>
  253. </li>
  254. <li>
  255. <a href="http://manual.qooxdoo.org/2.1.1/pages/mobile.html">Mobile</a>
  256. </li>
  257. <li>
  258. <a href="http://manual.qooxdoo.org/2.1.1/pages/desktop.html">Desktop</a>
  259. </li>
  260. <li>
  261. <a href="http://manual.qooxdoo.org/2.1.1/pages/server.html">Server</a>
  262. </li>
  263. </ul>
  264. </div>
  265. <div>
  266. <h3><a href="http://qooxdoo.org/community">Community</a></h3>
  267. <ul>
  268. <li>
  269. <a href="http://qooxdoo.org/community/contribution">Get Involved</a>
  270. </li>
  271. <li>
  272. <a href="http://qooxdoo.org/community/mailing_lists">Mailing List</a>
  273. </li>
  274. <li>
  275. <a href="http://qooxdoo.org/community/real_life_examples">Real Life Examples</a>
  276. </li>
  277. <li>
  278. <a href="http://qooxdoo.org/community/events">Events</a>
  279. </li>
  280. <li>
  281. <a href="http://qooxdoo.org/community/jobs_services">Jobs &amp; Services</a>
  282. </li>
  283. <li>
  284. <a href="http://qooxdoo.org/contrib">Contributions</a>
  285. </li>
  286. </ul>
  287. </div>
  288. </div>
  289. <div id="meta">
  290. <div class="social">
  291. <a href="http://twitter.com/qooxdoo">
  292. <img src="http://resources.qooxdoo.org/images/twitter.png">
  293. </a>
  294. <a href="https://www.facebook.com/pages/qooxdoo/187101324711780">
  295. <img src="http://resources.qooxdoo.org/images/facebook.png">
  296. </a>
  297. <a href="http://feeds.feedburner.com/qooxdoo/news/content">
  298. <img src="http://resources.qooxdoo.org/images/feed.png">
  299. </a>
  300. </div>
  301. <div class="notice">
  302. <p class="source">
  303. <strong>
  304. <a href="../../_sources/pages/widget/flash.txt" rel="nofollow">Show Source</a>
  305. </strong>
  306. </p>
  307. <p class="page">
  308. &copy; Copyright 2011-2012, qooxdoo developers.
  309. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
  310. </p>
  311. </div>
  312. </div>
  313. </footer>
  314. </div>
  315. </body>
  316. </html>