• Home
  • New Entries
  • Popular Entries
  • Submit a Story
  • About

Access HTML from flash ...

It’s about 1 week to googling how to displaying HTML from flash. I still didn’t find a way how to display the HTML inside flash frame. I’m a flash newbie so I didn’t know much about it
anyone know that? Perhaps I’LL find the answer from you…

But the grat thing is I was learn how to display image from flash without navigate users linking to another page first.

I’m using lightbox.js in this case

First, you must download all the script we need, and then place it on head tag

<script src="prototype.js" type="text/javascript"></script>
 
 <script src="scriptaculous.js?load=effects" type="text/javascript"></script>
 <script src="lightbox++.js" type="text/javascript"></script>
 
 <script type="text/javascript">
  function LightboxDelegate(url,caption) {
   var objLink = document.createElement(a);
   objLink.setAttribute(href,url);
   objLink.setAttribute( arel,lightbox);
   objLink.setAttribute( itle,caption);
   Lightbox.prototype.start(objLink);
   }
 </script>

then in your flash file, insert this code to call the javascript function

getURL("javascript:SWFDelegate(gambarini.jpg,judul foto);");

okay we’ve already done, one thing we must do is insert the param tag inside the body tag with attribute wmode and value.

<param name="wmode" value="transparent" />

that will make the flash can access the javascript inside the HTML document.Now you will have a nice flash with previewer without linking to other page first.
The rest of all code could be like this :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- v4L (vishnu(dot)valentino(at)lenmarc.com)-->
<head>
 
 <title>Flash and ajax</title>
 
 <link rel="stylesheet" href="lightbox.css" type="text/css" media="screen" />
 
 <script src="prototype.js" type="text/javascript"></script>
 <script src="lightbox++.js" type="text/javascript"></script>
 
 <script type="text/javascript">
  function LightboxDelegate(url,caption) {
   var objLink = document.createElement(a);
   objLink.setAttribute(href,url);
   objLink.setAttribute( arel,lightbox);
   objLink.setAttribute( itle,caption);
   Lightbox.prototype.start(objLink);
   }
 </script>
</head>
<body>
<table width="300" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td align="center">
  <!--[if !IE]> -->
    <object type="application/x-shockwave-flash" data="myflash.swf" width="300" height="100">
  <!-- <![endif]-->
  <!--[if IE]>
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="300" height="100">
      <param name="movie" value="myflash.swf" />
  <!--><!-- http://Validifier.com -->
      <param name="allowscriptaccess" value="samedomain" />
 
      <param name="quality" value="high" />
      <param name="wmode" value="transparent" />
    </object>
  <!-- <![endif]-->
 </td>
  </tr>
</table>
 
</body>
</html>

 Original Source:

AddThis Social Bookmark Button

Posted at 10:33:04 am | Permalink | Posted in Html  Flash  

Related Stuff

  • MooV: Using cutting edge Video phones and Software Video Phones - coupling all that with VoIP and empowering the disabled.

  • Moo Telecom: VoIP communications made easy - Ring anyway with the fun and ease of using a normal phone

  • TagR:Mobile Social Network with Real Time Locations Based services, and Ambience Intelligence, VoiP, IM, Skype, Googletalk, Mapping, Flickr, Events, Calendaring, Scheduling, SecondLife Support

  • ClearSMS : ClearSMS is a Web-based application that lets you send bulk SMS messages to your customers, contacts, or just about anyone.

  • Jajah:jah is a VoIP (Voice over IP) provider, founded by Austrians Roman Scharf and Daniel Mattes in 2005[1]. The Jajah headquarters are located in Mountain View, CA, USA, and Luxembourg. Jajah maintains a development centre in Israel.

  • Skype: It’s free to download and free to call other people on Skype. Skype the number one voice over ip software

  • PrivatePhone: a free local phone number with voicemail and messages you can check online or from any phone.

Top Stuff

e-messenger

MSN Web Messenger

eBuddy

ASP.NET Ajax CalendarExtender and Validation

AIM Express

Ajax Tools for ASP.NET Developers



About Ajaxlines

Ajaxlines is a project focused on providing its audience with a database of most of Ajax related articles, resources, tutorials and services from around the world.

Its purpose is to showcase the power of Ajax and to act as a portal to the Ajax development community.


Search


Topics

  • .Net (176)
  • Ajax (112)
  • Ajax Games (10)
  • Articles (95)
  • Bookmarking (35)
  • Calendar (21)
  • Chat (45)
  • ColdFusion (3)
  • CSS (84)
  • Email (23)
  • Facebook (84)
  • Flash (20)
  • Google (54)
  • Html (29)
  • Image (12)
  • International Calls & VOIP (7)
  • Java (58)
  • Javascript (280)
  • jQuery (200)
  • JSON (75)
  • Perl (2)
  • PHP (172)
  • Presentation (19)
  • Python (3)
  • Resources (2)
  • RSS (8)
  • Ruby (32)
  • Storage (4)
  • Toolkits (103)
  • Tutorials (227)
  • UI (11)
  • Utilities (174)
  • Web2.0 (18)
  • XmlHttpRequest (29)
  • YUI (13)

© 2006 www.ajaxlines.com. All Rights Reserved. Powered by IRange