Custom Cursor...

10 Replies / 1007 Views
Results 1 to 11 of 11
  1. #1
    Forum Saint Array *Jess*'s Avatar
    Join Date
    Oct 2005
    Location
    Rochdale
    Age
    21
    Posts
    5,766
    Post Thanks / Like

    Default Custom Cursor...

    I have made a custom cursor in flash but I don't know the code/can't be bothered working out the code to put it on a website. aha.
    does anybody know?
    Property of George =D

  2. #2
    Experienced Member Array Mattimadhead's Avatar
    Join Date
    Aug 2005
    Location
    Littleborough, Manchester
    Age
    21
    Posts
    184
    Post Thanks / Like

    Default Re: Custom Cursor...

    No but i was looking into the same thing myself..

  3. #3
    Admin 18+ Member
    Forum Saint
    Array Shane's Avatar
    Join Date
    Dec 2002
    Location
    Dinnington, United Kingdom
    Age
    23
    Posts
    21,457
    Post Thanks / Like

    Default Re: Custom Cursor...

    What did you use to make it in flash? Need more details.

  4. #4
    Experienced Member Array Mattimadhead's Avatar
    Join Date
    Aug 2005
    Location
    Littleborough, Manchester
    Age
    21
    Posts
    184
    Post Thanks / Like

    Default Re: Custom Cursor...

    ermm.. ive sin one of a website and instead of the usualy one fingue pointer theres was the bull horns instead

  5. #5
    Forum Saint Array Bob!'s Avatar
    Join Date
    Oct 2005
    Location
    Near Sheffield.
    Age
    24
    Posts
    7,566
    Post Thanks / Like

    Default Re: Custom Cursor...

    Erm I suggest goin on one of those piczo sites or whatever they are, them ones normally have custom cursors, the site will probably let you select one and do it for ya when you make it as I doubt all those people have manually coded them.

    Anyways try finding one of those sites with a custom cursor on it, then right click and look at the source code, see if ya can find the code for the custom cursor, then just modify it for your own?

    --Bob!--

  6. #6
    Forum Saint Array LukeEv_17's Avatar
    Join Date
    Sep 2005
    Location
    Sheffield
    Age
    23
    Posts
    1,681
    Post Thanks / Like

    Default Re: Custom Cursor...

    i think freewebs allows you to have custom cursors
    Up the Owls!
    Wednesday on tour of League 1!!

  7. #7
    Banned Respected Member Array Feign's Avatar
    Join Date
    May 2006
    Location
    Sheffield, United Kingdom
    Age
    26
    Posts
    250
    Post Thanks / Like

    Default Re: Custom Cursor...

    Custom cursors don't really constitute as valid code, and thus aren't supported by browsers outside of IE. In addition to that, most people find them downright annoying. Sure, its a novelty thing, but it soon tires. If possible, intergrate it into a seperate stylesheet and enable users the option of turning it off if they should so please.

  8. #8
    Admin 18+ Member
    Forum Saint
    Array Shane's Avatar
    Join Date
    Dec 2002
    Location
    Dinnington, United Kingdom
    Age
    23
    Posts
    21,457
    Post Thanks / Like

    Default Re: Custom Cursor...

    You can get it to work outside of IE, but unfortunately you need to piss about and define the path to the Cursor file. :/

  9. #9
    Banned Respected Member Array Feign's Avatar
    Join Date
    May 2006
    Location
    Sheffield, United Kingdom
    Age
    26
    Posts
    250
    Post Thanks / Like

    Default Re: Custom Cursor...

    Relative or absolute?

  10. #10
    Banned Respected Member Array Feign's Avatar
    Join Date
    May 2006
    Location
    Sheffield, United Kingdom
    Age
    26
    Posts
    250
    Post Thanks / Like

    Default Re: Custom Cursor...

    Ew. Nevermind.

    Code:
    <script language="JavaScript" type="text/javascript">
    A=document.getElementById
    B=document.all;
    C=document.layers;
    T1=new Array("image6.gif",45,45,"image5.gif",45,45,"image4.gif",45,45,"image3.gif",45,45,"image2.gif",45,45,"image1.gif",45,45)
    
    var offsetx=0 //x offset of trail from mouse pointer
    var offsety=0 //y offset of trail from mouse pointer
    
    nos=parseInt(T1.length/3)
    rate=50
    ie5fix1=0;
    ie5fix2=0;
    rightedge=B? document.body.clientWidth-T1[1] : window.innerWidth-T1[1]-20
    bottomedge=B? document.body.scrollTop+document.body.clientHeight-T1[2] : window.pageYOffset+window.innerHeight-T1[2]
    
    for (i=0;i<nos;i++){
    createContainer("CUR"+i,i*10,i*10,i*3+1,i*3+2,"","<img src='"+T1[i*3]+"' width="+T1[(i*3+1)]+" height="+T1[(i*3+2)]+" border=0>")
    }
    
    function createContainer(N,Xp,Yp,W,H,At,HT,Op,St){
    with (document){
    write((!A && !B) ? "<layer id='"+N+"' left="+Xp+" top="+Yp+" width="+W+" height="+H : "<div id='"+N+"'"+" style='position:absolute;left:"+Xp+"; top:"+Yp+"; width:"+W+"; height:"+H+"; ");
    if(St){
    if (C)
    write(" style='");
    write(St+";' ")
    }
    else write((A || B)?"'":"");
    write((At)? At+">" : ">");
    write((HT) ? HT : "");
    if (!Op)
    closeContainer(N)
    }
    }
    
    function closeContainer(){
    document.write((A || B)?"</div>":"</layer>")
    }
    
    function getXpos(N){
    if (A)
    return parseInt(document.getElementById(N).style.left)
    else if (B)
    return parseInt(B[N].style.left)
    else
    return C[N].left
    }
    
    function getYpos(N){
    if (A)
    return parseInt(document.getElementById(N).style.top)
    else if (B)
    return parseInt(B[N].style.top)
    else
    return C[N].top
    }
    
    function moveContainer(N,DX,DY){
    c=(A)? document.getElementById(N).style : (B)? B[N].style : (C)? C[N] : "";
    if (!B){
    rightedge=window.innerWidth-T1[1]-20
    bottomedge=window.pageYOffset+window.innerHeight-T1[2]
    }
    c.left=Math.min(rightedge, DX+offsetx);
    c.top=Math.min(bottomedge, DY+offsety);
    }
    function cycle(){
    //if (IE5) 
    if (document.all&&window.print){
    ie5fix1=document.body.scrollLeft;
    ie5fix2=document.body.scrollTop;
    }
    for (i=0;i<(nos-1);i++){
    moveContainer("CUR"+i,getXpos("CUR"+(i+1)),getYpos("CUR"+(i+1)))
    }
    }
    
    function newPos(e){
    moveContainer("CUR"+(nos-1),(B)?event.clientX+ie5fix1:e.pageX+2,(B)?event.clientY+ie5fix2:e.pageY+2)
    }
    
    function getedgesIE(){
    rightedge=document.body.clientWidth-T1[1]
    bottomedge=document.body.scrollHeight-T1[2]
    }
    
    if (B){
    window.onload=getedgesIE
    window.onresize=getedgesIE
    }
    
    if(document.layers)
    document.captureEvents(Event.MOUSEMOVE)
    document.onmousemove=newPos
    setInterval("cycle()",rate)
    </script>
    Where:

    Array("image6.gif",45,45,"image5.gif",45,45,"image 4.gif",45,45,"image3.gif",45,45,"image2.gif",45,45 ,"image1.gif",45,45)

    defines the images used - formatted as such:"image.ext",width,height

    Edit accordingly.

    There appears to be a CSS solution as well, if stylesheets are your thing.

    Code:
    n {
    cursor: wait / crosshair / hand / help / text / move }
    ^ Delete as appropriate (ie: n { cursor: wait; } )

    I'll look into a custom one, but if you're not using the Javascript solution, tis only effective in IE.

    Personally, I'd drop the concept altogether. Tis almost as annoying as frames and heaps upon heaps of animated gifs.
    Last edited by Feign : June 1st '06 at 09:48 PM

  11. #11
    Guest
    Guest

    Default Re: Custom Cursor...

    I used to design libraries of cursors. The best way I found was designing an icon in Axialis Icon Workshop (free-trial shareware: fully functional for 30 days; download at http://www.axialis.com/download/iw.html) and importing it to a cursor editor. The IconWorkshop allows adjustment of Alpha (Opacity) from 0-255. This way, your cursors can be translucent.

    If you want to use the program one time now and another in two months (when the free-trial would be otherwise expired), uninstall it after use and re-install it before using it next time. It only takes a few.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •