elementImage Method

MS Office DHTML, HTML & CSS

elementImage Method


Returns a Microsoft® DirectAnimation® image (daimageInternet Link Non-MSDN link) object.

Syntax

oImage = object.filters.redirect.elementImage()

Return Value

Returns a DAImage object.

Example

Note This example requires the DirectAnimation browser component.

This example uses the elementImage method and a 2-D transformation to convert a DIV object containing text and an image into a DirectAnimation image that rotates continuously.

Sample Code

<BODY>
<OBJECT ID="DAControl"
    STYLE="position:absolute; left:200; top:125; width:350; height:300; 
        z-index: -1"
    CLASSID="CLSID:B6FFC24C-7E13-11D0-9B47-00C04FC2F51D">
</OBJECT>

<DIV ID="oDiv" STYLE="WIDTH:250; FILTER:Redirect">
    <H2>This is the DIV after being converted into an image.</H2>
    <P><IMG SRC="sphere.jpg"></P>
</DIV>

<SCRIPT LANGUAGE="JScript">

    // The DirectAnimation library
    oLib = DAControl.MeterLibrary;

    // get the filter
    oFilter = oDiv.filters[0];
    
    // grab the image converted by the filter
    oImage = oFilter.elementImage();
  
    // perform the image transformation
    DAControl.Image = oImage.Transform(oLib.Rotate2RateDegrees(30)) ;  
    DAControl.Start();

</SCRIPT>
</BODY>
This feature requires Internet Explorer 5 or later. Click the icon below to install the latest version. Then reload this page to view the sample.
Microsoft Internet Explorer

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
Version data is listed when the mouse hovers over a link, or the link has focus.
redirect

See Also

microsoft directanimation sdkInternet Link Non-MSDN link


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? write us!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.