Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8711943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T05:00:31+00:00 2026-06-13T05:00:31+00:00

I am creating an openlaszlo application where an html tag will be present and

  • 0

I am creating an openlaszlo application where an html tag will be present and i have some components that are draggable in the swf. I want to drag these components over the html. This is not possible.

So what i am thinking of is to take a screenshot of the html content and replace it with the actual html content when i need to drag over it.

Theoretically this should be possible and it’s possible in flex I verified my self. I am trying to do the same thing in Openlaszlo. But i am not getting any leads

So far i have tried like this
And i am getting an error that the html tag is not object of IBitmapDrawable

<canvas width="800" height="600" bgcolor="white" debug="true">
<script when="immediate"><![CDATA[
class MagUtils {
#passthrough (toplevel: true) {
import flash.display.DisplayObject;
import flash.geom.Rectangle;
import flash.geom.Matrix;
import flash.geom.ColorTransform;
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.filters.*;
import flash.events.MouseEvent;
import mx.graphics.ImageSnapshot;
import flash.utils.ByteArray;
import flash.display.IBitmapDrawable;
}#

var temp:lz.view;
var colorTransform:ColorTransform;
var rect:Rectangle;


public function snap (m:IBitmapDrawable, t:lz.view):void {

temp = t;
var temp_mc = temp.sprite; // getMCRef();
var mainView_mc = main.sprite; // getMCRef();
var scale = 1;
var x;
var y;
var w;
var h;
  var imageSnap:ImageSnapshot = ImageSnapshot.captureImage(m);
  var imageByteArray:ByteArray = imageSnap.data;
colorTransform = new flash.geom.ColorTransform();
rect = new flash.geom.Rectangle(0, 0, temp.width, temp.height);

var bitmap:BitmapData = new flash.display.BitmapData(w, h, false);
 bitmap.setPixels(rect, imageByteArray);
var bm:Bitmap = new Bitmap(bitmap);
temp.sprite.addChild (bm);
bitmap = null;
}
}
lz.MagUtils = new MagUtils();
]]>

</script>


<button name="magnifier" text="magnifyingtool" >
<handler name="onclick">
lz.MagUtils.snap(canvas.main.ht,canvas.temp);
</handler>
</button>

<view name="main" x="5" y="15" width="200" height="200" bgcolor="yellow">
    <html name="ht" width="200" height="200" src="http:hello.html"/>
</view>
<view id="temp" name="temp" x="5" y="300" visible="true" width="200" height="200" bgcolor="gray">
</view>


</canvas> 

And the HTML Content is

<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML>
   <HEAD>
      <TITLE>
         A Small Hello
      </TITLE>
   </HEAD>
<BODY>
   <H1>Hi</H1>
   <P>Test Page</P>
</BODY>
</HTML>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T05:00:32+00:00Added an answer on June 13, 2026 at 5:00 am

    It’s no possible to take a screenshot in Flash of elements which are not managed by the Flash display list, which includes iFrame content placed below the SWF movie in the browser. And that seems to be what you are trying to do.

    If you want to drag a visual object from the iFrame into the SWF movie area, one approach might be to render the content in HTML into an HTML5 canvas element, extract the bitmap data and push that into the SWF movie to be displayed in an OpenLaszlo view. But that would mean that all visual elements you want to drag need to be drawn into an HTML5 canvas.

    Here is an example where uses Flash Player’s filter functionality to apply the filter to an image in an HTML5 canvas element:
    http://www.quasimondo.com/archives/000695.php

    Here are the links to the relevant files for this example:

    1. The HTML page embedding an invisible SWF for processing the image.
    2. JavaScript file with functions for sending the data to the SWF movie clip.
    3. ActionScript class processing the image data sent from JavaScript, and passing the processed data back to the HTML page.

    But I’m not sure that all the content you have in your iFrame can be rendered into a canvas element.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I creating a web application using JSF,Hibernate,Spring. I have added a filter for checking
Creating an installer for possible remote systems so that if they do not have
Creating a client application, want the whole DB to be embed in the software
Creating an HTA that will automate the installation of several applications it starts by
Creating liquid layouts is an immense pain. Now, I totally understand that tables should
Creating a server-side socket will fail if I'm trying to use the same port
Creating a JApplet I have 2 Text Fields, a button and a Text Area.
Creating a web mapping application in Javascript/Dojo: When I load the app in a
Creating a Blackberry app. Just a beginner, I have searched but couldn't find a
Creating a login page in xcode 4.2 I have the users fill out information

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.