User Tag List

Results 1 to 3 of 3

Thread: changing the cursor in a scene

  1. #1
    No Products Registered

    Join Date
    Sep 2006
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    changing the cursor in a scene

    I need to know how to do the following:
    When the player clicks on a button that jumps from one frame to another, I need the need the cursor to change to a reel to reel tape in the new frame. Then when the player clicks the reel to reel tape on an area in the frame the cursor needs to change to a cd, and finally when the cd is clicked on another area, it needs to turn into a sheet of paper, and when that is clicked on an area, the cursor reverts back to the default arrow. How can I do this?
    And how can I make it until the cursor reverts back to the default cursor, the played cannot get out of the frame.

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleMac Export Module
    dsilvers's Avatar
    Join Date
    Jun 2008
    Location
    Boston, MA
    Posts
    658
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)

    Re: changing the cursor in a scene

    Okay well that's a lot of cursor icon switching.

    There are a lot of ways you can do this, and that's the great thing about Multimedia Fusion. No one way is the right way, especially for things like this. There are, however, more EFFICIENT ways of going about this, both in terms of code and RAM usage, something many developers forget about.

    Create an Active Object, and name it Cursor under its About tab. Double click on it to enter the animation editor.

    Here is where it gets fun.

    Drag the direction slider all the way up to the fourth notch, giving you 32 directions to work with.

    Starting with the right, and going clockwise (or counter-clockwise, up to you) paste the images of the different cursors you want to use in your game, one for each direction. Make the right direction your default cursor (go ahead and just flat out copy Windows' default cursor if you so desire, but it sounds like you'll want to make a custom one anyway). Then, for the next several directions, paste in your Tape, CD, Sheet of Paper, Puppy Dog Face, Targeting Reticle, Magnifying Glass, Stopwatch, whatever the hell you want. Make sure to also set your Hotspot and Action Points to where you want them (my recommendation is to set the Hotspot to the center and the Action Point to where you want clicks to be effective, so possibly also centered, but not necessarily). Click OK to save changes to your Cursor object.

    Head into the Event Editor.

    Create an Always event and Hide the Windows Mouse Cursor. Then, under that same always event, set the Cursor's X Position to XMouse, and the Cursor's Y Position to YMouse. Should look like this:

    Always:
    - Hide Windows mouse pointer (under "The Mouse Pointer and Keyboard")
    - Set X Position of "Cursor" to XMouse
    - Set Y Position of "Cursor" to YMouse

    Run the application.

    You'll notice that instead of a standard windows mouse pointer, you have a custom one. Huzzah!

    Now I am going to treat the rest of this post as if the user just needs to click in order to change the cursor. However, if you need them to click specific areas, just have a check in the conditionals that the Animation Direction is set properly to correspond to the specific pointer icon needed.

    Create an alterable variable on your cursor object named "Clicked" in the Values tab of its properties. Then head back into the Event Editor and click "New condition."

    User clicks with Left Button
    + Alterable Value A/"Clicked" of "Cursor" is >= 0
    + Only One Action When Event Loops
    - Animation > Change Direction of Animation > Calculate a Direction
    - Type in Dir("Cursor") + 1 (or -1 depending on which direction, clockwise or counter-clockwise, you chose to paste in your icons in the active object).

    This, IN THEORY, should set it so that every time the player clicks, the cursor icon changes. Then make sure you set the final direction you want in the active object to a copy of the intial cursor. You can then set up a final event that says when the player leaves the frame/hits escape/whatever, and the "Clicked" variable of the cursor = 4, jump to the next frame/end the application/whatever.

    Welcome to coding. =)

  3. #3
    No Products Registered

    Join Date
    Apr 2010
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: changing the cursor in a scene

    Man, i was having the same doubt, thanks for such a good explanation!! i'm going to try out!

Similar Threads

  1. Défilement Scène par Scène
    By ValLoche in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 2nd July 2013, 10:46 PM
  2. Can you call the functionality from a scene while in another scene?
    By redpandagames in forum SWF/Flash Export Module Version 2.0
    Replies: 6
    Last Post: 10th April 2013, 04:26 AM
  3. copier texte scène 1 vers scène 2
    By jose in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 17th July 2010, 04:51 AM
  4. Changing to shape of the cursor
    By DisneyBoy in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 11th February 2010, 11:42 PM

Posting Permissions

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