VMLFrame Element | Internet Development Index |
Defines a frame for an external shape.
The following attributes modify a frame.
Attribute | Description |
Clip | Determines whether the image will be clipped. |
ID | Defines a unique identifier for the frame. |
Origin | Specifies the origin of the frame. |
Size | Specifies the size of the frame. |
Src | Specifies the source of the data that will be displayed in the frame. |
Style | Defines the normal CSS styles that can be used to position the frame. |
Remarks
The source data to be displayed in the frame can be contained in the same Web page or be part of another page. Through scripting, the source can be changed dynamically and the display characteristics can be modified.
Objects inside the VMLFrame are “zoom scaled.? That is, they scale like metafiles, where line weights, shadow offsets, and text area are all scaled proportionally. This is different from a group, where object size and position are scaled proportionally, but line, shadow, etc. are not.
The following is the minimum code needed to load an image into a frame.
<v:vmlframe style="position:relative;top:1;left:1;width:50;height:50"> src="external.vml#rect01"/> </v:vmlframe>
If the file is external, it must be an XML file. The following code is the minimum code needed to specify an external source file that must contain an identifiable shape. This sample contains an image shape that displays a bitmap.
<xml xmlns:v = "urn:schemas-microsoft-com:vml"> <v:image id="rect01" style="height:100;width:100;top:50;left:50" src="kids.jpg"> </v:rect> </xml>Note that in beta releases of VML, this element was called VMLCanvas.
Examples
Click here to view a sample that sets up a frame and pulls in a simple shape from a separate file.
Click here to view a sample that sets up a frame and pulls in an image shape from a separate file. The image shape references a bitmap from yet another file.
Click here to view a more complex sample that shows VMLFrame clipping. Also, this example shows how to reference a shape in the same file as the frame.