User Tag List

Results 1 to 5 of 5

Thread: toggle image on click

  1. #1
    No Products Registered

    Join Date
    Nov 2006
    Location
    San Francisco, USA
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    toggle image on click

    I'm having trouble with something that I thought would be easy (isn't that how it always is?). when I click on an object I want it to change to another image and when I click on that image I want it to change back. I'm trying to achieve this by swapping between 2 animated sequences, but it's not working.

    right now I have:
    [events:32]
    * user clicks with left button on [obj_active]
    + [obj_active] animation Stopped is playing
    - [obj_active]: change animation sequence to Selected
    * user clicks with left button on [obj_active]
    + [obj_active] animation Selected is playing
    - [obj_active]: change animation sequence to Stopped
    [/events]
    I've tried swapping positions with another object outside the frame with success, but its too cluttered and having 2 objects represent one adds some problems to another feature I'm trying to implement.

  2. #2
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2006
    Posts
    271
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: toggle image on click

    [events]
    *User clicks with left button on [obj_active]
    -[obj_active]: Toggle internal flag 1

    *[obj_active]: internal flag 1 is on
    -[obj_active]: Change animation sequence to Selected

    *[obj_active]: internal flag 1 is off
    -[obj_active]: Change animation sequence to Stopped
    [/events]
    Does that do what you want?

  3. #3
    No Products Registered

    Join Date
    Jul 2006
    Location
    Texas
    Posts
    1,225
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: toggle image on click

    Quote Originally Posted by rhoymand
    I'm having trouble with something that I thought would be easy (isn't that how it always is?). when I click on an object I want it to change to another image and when I click on that image I want it to change back. I'm trying to achieve this by swapping between 2 animated sequences, but it's not working.

    right now I have:
    [events:32]
    * user clicks with left button on [obj_active]
    + [obj_active] animation Stopped is playing
    - [obj_active]: change animation sequence to Selected
    * user clicks with left button on [obj_active]
    + [obj_active] animation Selected is playing
    - [obj_active]: change animation sequence to Stopped
    [/events]
    I've tried swapping positions with another object outside the frame with success, but its too cluttered and having 2 objects represent one adds some problems to another feature I'm trying to implement.
    Let me guess, it won't go to another animation sequence, it just stays on the same one... be sure 'loop' is set on both of the animations.

  4. #4
    No Products Registered

    Join Date
    Nov 2006
    Location
    San Francisco, USA
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: toggle image on click

    the internal flags method works. thanks!

    I set loops on both sequences, but it still didn't work. I think the problem came from the extra condition of "active object animation sequence is playing".

  5. #5
    No Products Registered

    Join Date
    Nov 2006
    Posts
    199
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: toggle image on click

    Usually, if I have something like that, where the same action triggers two events, it just seems as if the last event occurred. Like, if I have something that says:

    IF Space is pressed
    THEN Set animation to Walking

    And, I have another that says:

    IF Space is pressed
    THEN Set animation to Stopped

    It'll just go to the Stopped animation. ...Actually, I don't know if they fixed this (if it was a problem) in MMF2. I don't know if I've tried doing this in MMF2 yet, just MMF 1.5.

Similar Threads

  1. iOS Toggle Switch
    By JosephFTaylor in forum iOS Extensions
    Replies: 4
    Last Post: 5th April 2013, 07:33 PM
  2. iOS Toggle Switch
    By JosephFTaylor in forum iOS Specific Example Files
    Replies: 3
    Last Post: 5th April 2013, 07:32 PM
  3. Toggle Game Paused screen with image animation
    By Matriax in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 3rd January 2013, 03:24 PM
  4. Click-able bracket image in flash, youtube object?
    By FlameEX in forum SWF/Flash Export Module Version 2.0
    Replies: 0
    Last Post: 22nd August 2011, 12:56 AM
  5. CORRECT way to Toggle!
    By LB in forum File Archive
    Replies: 11
    Last Post: 16th July 2010, 12:28 AM

Posting Permissions

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