where is your event handler?
----- Original Message -----
From: "Mat Brown" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 21, 2001 9:40 AM
Subject: [Dynapi-Help] kinda new, having some problems.


> Hi.
>
> First of all, I'd like to thank Dan, Pascal and everyone else who has
> worked/is working on this project - I really appreciate what you guys are
> doing (there's no way I could ever write that kind of code, as my
questions
> below will demonstrate) and I'd just like to express my thanks and big
> respect.
>
> OK.  I am a developer of small to medium skills, but I am having some real
> problems using some aspects of DynAPI2 - I am trying to make a tooltips
> system (which I know the API is well over-spec'd for, but I thought I'd
> start small) that is, wait for it, dynamic.  Huzzah.
>
> I can create and display the required DynLayer, but I can't seem to
capture
> the mouse position in order to position this layer (I am also having
trouble
> shunting the right HTML into the layer, but that is not a major concern
> right now)  The code I am using is below (please be aware that I am NOT a
> programmer, but am trying to learn as I go along, so some of my javascript
> is a bit ropey to say the least)
>
> If anyone can spot what I'm doing wrong here, or point me towards some
help,
> I'd be eternally grateful (my studio is talking about budget now, and I
> don't have a huge amount of time to fix this before I have to do it all as
> horrid static HTML, which will take a lot of monkey work and will be hard
to
> maintain - it's a BIG load of tips)
>
> I have read all of Pascal's tutorials, and the FAQ's, but apologies if I
> have not noticed something in there that I should have done.
>
> tia,
>
>
>
> spike.
>
> -web developer, www.studiosoup.co.uk
> -e: [EMAIL PROTECTED]
> -t: 01603 447150
>
> ***shonky JS follows***
>
> <Script language="Javascript">
>
> DynAPI.setLibraryPath('./src/lib/')
>
> DynAPI.include('dynapi.api.browser.js')
> DynAPI.include('dynapi.api.dynlayer.js')
> DynAPI.include('dynapi.api.dyndocument.js')
> DynAPI.include('dynapi.api.events.js')
>
> function tooltip(varyrgb) {  // create tooltip layer, position, display.
> pos(x,y) will be passed from mousegrabber, if it ever works..
>
>         myLayer=new DynLayer()
> myLayer.setSize(250,140)
> myLayer.setBgColor('#c0c0c0')
> myLayer.moveTo(100,100)
> myLayer.setHTML(varyrgb)
>
> DynAPI.document.addChild(myLayer)
>
> }
>
>
> function DeleteLayer(){  // exactly what it says on the tin.  lifted from
> Pascal's tutorial - cheers!  to be optimised and (user)idiot-proofed later
> on.
> if (DynAPI.document.children.length>0) {
> var index=DynAPI.document.children.length-1
> DynAPI.document.children[index].deleteFromParent()
> } else alert('all layers are removed')
> }
>
> function makeTipContent(varyRGB, varyYC, varyFine, varyNormal, varyBasic)
{
> // function to construct tip HTML, to be integrated into Tooltip function
> later.  more variables will be passed to this for each entry.
>
>      var contentA = "<table width='250' border='1' cellspacing='0'
> cellpadding='3' height='140' bgcolor='#FFFFFF' bordercolor='#990000'
> style='font-family: Arial, Helvetica, sans-serif; font-size: 10px; color:
> #333333'>";
>      var contentB = "<tr align='center'><td width='96'>Camera Mode</td><td
> width='104'>Number of pictures</td></tr><tr align='center'><td
> width='96'>highRGB</td><td width='104'>";
>      var contentC = "</td></tr><tr align='center'><td
> width='96'>highYC</td><td width='104'>";
>      var contentD = "</td></tr><tr align='center'><td
width='96'>fine</td><td
> width='104'>";
>      var contentE = "</td></tr><tr align='center'><td
> width='96'>normal</td><td width='104'>";
>      var contentF = "</td></tr><tr align='center'><td
> width='96'>basic</td><td width='104'>";
>      var contentG = "</td></tr></table>";
>
>      var ubercontent = contentA + contentB + varyRGB + contentC + varyYC +
> contentD + varyFine + contentE + varyNormal + contentF + varyBasic +
> contentG;
>
>      alert(ubercontent);  // dev testing.
> }
>
> function grabmouse() {  // this is doing my head in.
>
>      alert('DOH!.   All attempts to write this function failed, and
> deleted.');
> }
>
> </script>
>
>
> _______________________________________________
> Dynapi-Help mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/dynapi-help


---
Outgoing mail is certified Virus Free by AVG Free Edition
Download at: http://www.grisoft.com/html/us_index.cfm
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.231 / Virus Database: 112 - Release Date: 2/12/01


_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help

Reply via email to