Giving up on VML

A

Aaron Gray

Unless someone can show me how to use it I am giving up on VML.

Problems

1) I cannot work out how to detect whether it is present.

I tried some VB IsObject( CreateObject( ...)) but that did not work.

2) I cannot seem to get it to draw properly

cannot draw a circle(oval) crossed by a line to two.

Any help welcome,

Aaron
 
V

VK

Aaron said:
Unless someone can show me how to use it I am giving up on VML.

Problems

1) I cannot work out how to detect whether it is present.

You dnt have to - it is presented by default. VML over ActiveX was on
the testing stage for IE 4, you can happily forget of it. If it's IE -
then you have native VML support
2) I cannot seem to get it to draw properly

cannot draw a circle(oval) crossed by a line to two.

<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<style>
v\:* {behavior:url(#default#VML);}
</style>
</head>
<body>
<v:eek:val coordsize="21600,21600" style='width:156pt;height:156pt'>
</v:eek:val>
<v:line coordsize="21600,21600" from="7.5pt,.75pt" to="123pt,6pt">
</v:line>
</body>
</html>

Just place the line yourself wherever you want. Overall I do not
understand why are you refusing to google for and to read VML and SVG
references? The things do not have to be found in starvations by
yourself, just read the manual.
 
A

Aaron Gray

Unless someone can show me how to use it I am giving up on VML.
You dnt have to - it is presented by default. VML over ActiveX was on
the testing stage for IE 4, you can happily forget of it. If it's IE -
then you have native VML support

I have came across a friends machine that does not support it.
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<style>
v\:* {behavior:url(#default#VML);}
</style>
</head>
<body>
<v:eek:val coordsize="21600,21600" style='width:156pt;height:156pt'>
</v:eek:val>
<v:line coordsize="21600,21600" from="7.5pt,.75pt" to="123pt,6pt">
</v:line>
</body>
</html>

Just place the line yourself wherever you want.

AND now in JavaScript ?
Overall I do not
understand why are you refusing to google for and to read VML and SVG
references? The things do not have to be found in starvations by
yourself, just read the manual.

I have read both W3C and MS'es documentation.

MS seems not to follow W3C documentation AFAICT.

Aaron
 
A

Aaron Gray

2) I cannot seem to get it to draw properly
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<style>
v\:* {behavior:url(#default#VML);}
</style>
</head>
<body>
<v:eek:val coordsize="21600,21600" style='width:156pt;height:156pt'>
</v:eek:val>
<v:line coordsize="21600,21600" from="7.5pt,.75pt" to="123pt,6pt">
</v:line>
</body>
</html>

They appear as separate elements not as one. As if they were in two separate
DIV's.

Also why the style rather than the position attribute as in W3C
documentation ?

Aaron
 
R

Randy Webb

Aaron Gray said the following on 12/31/2006 3:57 PM:
They appear as separate elements not as one.

Because they *are* two separate elements.
As if they were in two separate DIV's.

span elements maybe, div tags - unless told otherwise - fill an entire line.

Use CSS to "stack" them:

<v:eek:val coordsize="21600,21600"
style='width:156pt;height:156pt;position:absolute;top:0px;left:0px'>
</v:eek:val>
<v:line style="position:absolute;top:0px;left:0px"
coordsize="21600,21600" from="0pt,0pt" to="156pt,156pt">
</v:line>
 
A

Aaron Gray

They appear as separate elements not as one.
Because they *are* two separate elements.


span elements maybe, div tags - unless told otherwise - fill an entire
line.

Use CSS to "stack" them:

<v:eek:val coordsize="21600,21600"
style='width:156pt;height:156pt;position:absolute;top:0px;left:0px'>
</v:eek:val>
<v:line style="position:absolute;top:0px;left:0px"
coordsize="21600,21600" from="0pt,0pt" to="156pt,156pt">
</v:line>

Thats crazy if you look at the W3C spec.

And how do you put them in a <group> element without them disappearing ?

Aaron
 
A

Aaron Gray

I just cannot seem to get the following to work :-

<html xmlns:vml="urn:schemas-microsoft-com:vml">
<head>
<style>
vml\:* { behavior: url(#default#VML) }
</style>
</head>
<body>

<vml:group coordsize="1000,1000" coordorigin="0, 0">
<vml:eek:val style="width:500; height:500" position="500, 500" size="450,
450" />
<vml:line from="0, 0" to="500, 500" />
</vml:group>

</body>
</html>

Totally stumped...

Aaron
 
A

Aaron Gray

And how do you put them in a <group> element without them disappearing ?

Okay add a 'style' statement. This is horrible !

Aaron
 
R

RobG

Aaron said:
Unless someone can show me how to use it I am giving up on VML.

Problems

1) I cannot work out how to detect whether it is present. :)

If the browser isn't IE 5+, it's not present.

I tried some VB IsObject( CreateObject( ...)) but that did not work.

2) I cannot seem to get it to draw properly

cannot draw a circle(oval) crossed by a line to two.

Any help welcome,

Why are you pursuing VML? It is a proprietary IE technology that is
not well supported (if at all) in other browsers. It will likely be
more useful to get into SVG or maybe XAML, try this post from Laurent
Bugnion:

<URL:
http://groups.google.com.au/group/c...4?lnk=gst&q=SVG&rnum=5&hl=en#14d8b317f3896154
The canvas element:
<URL: http://www.whatwg.org/specs/web-apps/current-work/#canvas >

Check out this article which discusses implementing SVG in IE using
VML:
<URL: http://me.eae.net/archive/2005/12/29/canvas-in-ie/ >

The Mozilla canvas tutorial:
<URL: http://developer.mozilla.org/en/docs/Canvas_tutorial >

Regarding vector drawing in browsers:
<URL: http://wiki.svg.org/Vector_Format_Comparisons >
 
V

VK

You dnt have to - it is presented by default. VML over ActiveX was on
I have came across a friends machine that does not support it.

Tell your friend to reinstall immediately - the machine is badly broken
or (s)he's using very obsolete IE version wide open for all
vulnerabilities found in IE over the last 6 years.
AND now in JavaScript ?

Think! Learn! Then think again! ;-) :-|

SVL is not Prototype/Scriptaculous crap linking: you have to _think_
and be ready to work over differences in SVG and VML. It also presume a
good understanding of the involved entities: finit viewport, infinit
Descartes space, their relations, geometrical shape vs. physical body.
Briefly if you wanted to surprise your girl by the next week-end you've
chosen a wrong matter to deal with ;-) :-|

As an inside info: VML is noticeable more powerful and _much_ more easy
to script than SVG. You cannot do it with VML - you have little chances
with SVG.

<http://www.dynamicdrive.com/dynamicindex11/editor.htm> is not an ideal
sample to copy - not at all, it is just a proof of concept that behind
the knowledge you'll obtain the things will be much more easy than they
are right now.
 
A

Aaron Gray

As an inside info: VML is noticeable more powerful and _much_ more easy
to script than SVG. You cannot do it with VML - you have little chances
with SVG.

I did my SVG example in about 1/2 an hour.

SVG is much much nice that VML particularly MS'es VML.

Anyway I am getting there but there are so many oddities, styles used
instead of attributes in the MS version which is just horrible.

Aaron
 
A

Aaron Gray

Anyway I am getting there but there are so many oddities, styles used
instead of attributes in the MS version which is just horrible.

opacity and fill=false do not seem to work I cannot seem to get a see
through oval.

<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns="http://www.w3.org/TR/REC-html40">
<head>
<style>
v\:* {behavior:url(#default#VML);}
</style>
</head>
<body>
<v:group style='width: 100%; height:100%'>
<v:line from="0, 0" to="1000, 1000" stroke='true' strokecolor='black'
strokeweight='2px'>
</v:line>
<v:eek:val opacity="1.0" fill="false"
style='top:50;left:50;width:900;height:900'>
</v:eek:val>
</v:group>

</body>
</html>

moan, moan, moan, happy new year, hackers, ...

Aaron
 
A

Aaron Gray

Unless someone can show me how to use it I am giving up on VML.
Problems

1) I cannot work out how to detect whether it is present.

I tried some VB IsObject( CreateObject( ...)) but that did not
work.

Still none the wiser as to why that did not work.
2) I cannot seem to get it to draw properly

cannot draw a circle(oval) crossed by a line to two.

Here's where I am with a JavaScripted DOM version :-

http://www.aarongray.org/Test/VML/VML-DOM.html

Again still non the wiser as to why the line will not display and as to why
I cannot get transparent circles ?

Many thanks if you can help, dont be bothered if you cannot,

Aaron
 
A

Aaron Gray

'toString()' does not convert numbers to numeric strings !

Especially if I pass the input as a paramenter rather than as the object,
he, he, Arg.

Aaron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top