A Flash Developer Resource Site

Results 1 to 11 of 11

Thread: Mouse cursor ??

Hybrid View

  1. #1
    Member
    Join Date
    Jun 2006
    Posts
    66

    Mouse cursor ??

    Hello,

    I don't like the way the cursor turns into a hand when I mouse over a button. How can I make it so the mouse arrow doesn't change into a hand? I would just like it to stay an arrow.

    Thanks..... I'm using CS3

    FireWire Girl

  2. #2
    Has Returned
    Join Date
    Mar 2001
    Posts
    269
    Greetings,

    If you add this code to the start of frame one, all buttons and Movieclips with button event handlers should stay as a normal arrow as you requested.

    PHP Code:
    MovieClip.prototype.useHandCursor Button.prototype.useHandCursor=false
    All the best,
    Turbs

  3. #3
    trace("AKA: Biro Barna");
    Join Date
    Oct 2007
    Location
    RO.Timişoara
    Posts
    1,403
    ^ As far as I'm concerned that's AS 1.0 and it won't really work in AS 2.0 or 3.0 ; and since it's deprecated you shouldn't be using it.

    Instead, use: yourMovieClip.useHandCursor = false;



    | Windows MSN: birobarna [at] hotmail [dot] com | Skype: barna.biro |
    WebLog: http://blog.wisebisoft.com/ |
    | Software Developer / Flash & Flex Developer | Student ( Computer Science ) | Interested in: Sharing Knowledge |
    |
    Romanian Adobe Flash, Flex, AIR Forum: http://www.flashforum.ro/
    | By perseverance the snail reached the ark. |


  4. #4
    Has Returned
    Join Date
    Mar 2001
    Posts
    269
    Quote Originally Posted by PlenaryCreation
    ^ As far as I'm concerned that's AS 1.0 and it won't really work in AS 2.0 or 3.0 ; and since it's deprecated you shouldn't be using it.

    Instead, use: yourMovieClip.useHandCursor = false;

    I think it was the Bolded parts of your post that got me going.

    1) it does work
    2) Using that would be a waste of time implementing it across a lot of instances.

    I guess we got carried away, my apologies to the OP.
    But i guess you have lots of info now

  5. #5
    Has Returned
    Join Date
    Mar 2001
    Posts
    269
    What if she doesn't want to use that code on every instance of a button she creates? using the prototype (which is working fine for me with AS2, flash 8) saves a lot of time and effort even if it may be old.

  6. #6
    trace("AKA: Biro Barna");
    Join Date
    Oct 2007
    Location
    RO.Timişoara
    Posts
    1,403
    If that's what she wants then she should create a new class and override the built in MovieClip class so all movie clip instances wouldn't use the default hand cursor ( i gave that example because I wasn't sure if she has any OOP knowledge in order to achieve the desired effect using classes )... As an idea, it's the same thing that your "prototype" does but prototype is deprecated and it should not be used anymore in AS 2.0 or higher...

    Just because something works doesn't mean it's a good practice or that people should continue using it... Let's not even mention application speed, reusability, and so on...
    Last edited by fx.barrett; 05-04-2008 at 08:54 AM.



    | Windows MSN: birobarna [at] hotmail [dot] com | Skype: barna.biro |
    WebLog: http://blog.wisebisoft.com/ |
    | Software Developer / Flash & Flex Developer | Student ( Computer Science ) | Interested in: Sharing Knowledge |
    |
    Romanian Adobe Flash, Flex, AIR Forum: http://www.flashforum.ro/
    | By perseverance the snail reached the ark. |


  7. #7
    Has Returned
    Join Date
    Mar 2001
    Posts
    269
    You probably have a better understanding of flash than i do, certainly a more up to date knowledge as i have only recently began using it again. But considering this is the Flash Newbie Section isn't it a viable solution to her question?

    It's good to know the current most efficient way to do things but not at the expense of over complicating it for a new user or wasting their time giving them a solution that requires duplicating code.

    It's old code, what problems are using it going to actually create?
    In this particular case what advantages are there to creating a new class over using the prototype? im not talking general problems with using old code which you have already mentioned.


    This beginner user has 3 options we have presented to her:

    use the prototype:
    Pros: quick and easy to use, effects all instances.
    Cons: It's old and bad for reasons i don't actually know why.

    Create a new Class:
    Pro's: Good efficient "new" code, does the same as the prototype.
    Cons: Probably too complicated for a new user.

    Target specific Movieclips.
    Pros: Also good efficient "new" code (if pasting the same code over and over can be called that)
    Cons: User has to place this code on every MC or Button, not so good if there are a lot of them.

    So as a new user, i know which i would be using - despite the risks.
    Just because something works doesn't mean it's a good practice or that people should continue using it
    I would also say just because something is old doesn't mean it shouldn't be used. If that was the case why isn't everyone using AS3.
    Last edited by Turbs; 05-04-2008 at 09:32 AM.

  8. #8
    trace("AKA: Biro Barna");
    Join Date
    Oct 2007
    Location
    RO.Timişoara
    Posts
    1,403
    But considering this is the Flash Newbie Section isn't it a viable solution to her question?
    Don't get me wrong, I didn't say: "use whatever you want just not the thing Turbs said to use"... Sure it's possible for her to use that, I only pointed out the fact that your code is old, deprecated... That method was used in AS 1.0, things changed since then and I only wanted to point out the variety of solutions...

    Just because someone is new to the field doesn't mean that you can't teach him something the way it should be taught... I don't think I said anything bad by stating that "hey, that's a bit old, try doing it the right way"...

    It's really not up to me if she can write classes or if she can't, maybe she can but since I'm not a magician I can't magically guess what she can or can't do, but I am able to give an opinion and offer one more possible solution.

    In the end, it's all up to what she wants to do with Flash. If one is not willing to do development in Flash or work as a Flash designer or developer then yeah, you're totally right, use whatever works, get the application done and carry on doing the other stuff you like doing. But if that's not the case then it should be everyone's goal to learn to use the software in a correct manner, be up to date with the new stuff, try writing efficient and reusable code and so on...

    I hope you understood now, I'm not saying that she can't use what you told her to use, I only said that your method is old and slow, it could be done differently by using new syntax and methods. That's all I said.

    Take care.

    I would also say just because something is old doesn't mean it shouldn't be used. If that was the case why isn't everyone using AS3.
    I almost didn't see this one. Well, the answer is quite simple: most of the people doing Flash don't have a degree in Computer Programming nor any other degree in IT. Most of the people come from different area and since AS 2.0 isn't as strict as 3.0 it gave those people the opportunity to hack code together and get something working... let's not mention the fact that you can find tons of tutorials on almost everything written in AS 2.0 and almost nothing for AS 3.0 ;

    AS 3.0 is the new version an is much stricter then 2.0 and it is the version of AS that finally draws the line between designer and developer... AS 3.0 is a true OOP programming language that opens totally new doors, just consider the new 3D engines like papervision 3D and Sandy, games and so on...

    People don't use AS 3.0 because they can't keep the pace, the guys who were "programming" for years in AS 2.0 with a design degree aren't able to keep up the pace with AS 3.0 that requires an understanding of OOP principles and practices and so on...

    AS 2.0 is quite powerful but is more "beginner friendly" then AS 3.0 because it's not as strict as AS 3.0 ; One thing I can assure you about is that AS 3.0 is the future and sooner or later AS 2.0 will go extinct, it's only a matter of time...

    It's everyone personal choice, some want to keep the pace but can't, other don't even want to do so, well, it;s a risk that everyone should consider taking or not... and NO, old, doesn't always mean bad, but don't forget that we are talking about a programming language here and not some general stuff... when it comes to programming then NEW, 90% of the time is better then OLD because that's why it was created, to be better and to "open new doors"...

    AS 3.0 is the best improvement to Flash since it started and it's definitely better then the previous version, but why people can't learn it or why they aren't willing to learn it ? Well, personally, I don't care, it's their problem...
    Last edited by fx.barrett; 05-04-2008 at 10:44 AM.



    | Windows MSN: birobarna [at] hotmail [dot] com | Skype: barna.biro |
    WebLog: http://blog.wisebisoft.com/ |
    | Software Developer / Flash & Flex Developer | Student ( Computer Science ) | Interested in: Sharing Knowledge |
    |
    Romanian Adobe Flash, Flex, AIR Forum: http://www.flashforum.ro/
    | By perseverance the snail reached the ark. |


  9. #9
    trace("AKA: Biro Barna");
    Join Date
    Oct 2007
    Location
    RO.Timişoara
    Posts
    1,403
    Yeah, my bad, my affirmation wasn't quite right, I wasn't sure that if it still works in AS 2.0 and I used the "won't really work" instead of "maybe". In AS 3.0 it's not working, that's for sure... And yeah, disabling the hand cursor manually for each symbol might not be the most efficient approach but it's and approach, anyways it's good that we finally got some questions answered.



    | Windows MSN: birobarna [at] hotmail [dot] com | Skype: barna.biro |
    WebLog: http://blog.wisebisoft.com/ |
    | Software Developer / Flash & Flex Developer | Student ( Computer Science ) | Interested in: Sharing Knowledge |
    |
    Romanian Adobe Flash, Flex, AIR Forum: http://www.flashforum.ro/
    | By perseverance the snail reached the ark. |


  10. #10
    Member
    Join Date
    Jun 2006
    Posts
    66
    This works AWSOME....... Thanks Guys..... I do have a lot of buttons...


    - FireWire Girl
    Last edited by FireWire Girl; 05-04-2008 at 07:11 PM.

  11. #11
    [Horse Thief] gotoAndCrash's Avatar
    Join Date
    May 2007
    Location
    NW, USA
    Posts
    576
    Just to present another option, you could create an array of all of your buttons & then use a For Loop to disable the hand cursor :
    Code:
    var btnArray:Array = new Array(btn0,btn1,btn2,btn3);
    
    for (i=0;i<btnArray.length;i++) {
    	btnArray[i].useHandCursor = false;
    }
    1 Infinite Loop, Cupertino is a portal of Hell.

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center