Author Topic: Hyperspin joystick anamation  (Read 187 times)

KTURNER

  • Full Member
  • ***
  • Posts: 97
    • View Profile
Hyperspin joystick anamation
« on: August 08, 2017, 08:25:43 AM »
Is there a trick to get the joystick animations for Hyperspin to show up on the layouts.

mc2programmer

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Hyperspin joystick anamation
« Reply #1 on: August 15, 2017, 04:35:15 PM »
So I tried to load some .swf (flash) joystick animations into AM, and they did load however the colors were all messed up and I figured it may have been do to the still limited flash support. So what I did was created a sprite sheet from my flash file and added the sprite animation to my theme. Depending on what joystick animation you are using you might just be able to add the swf and it might play just fine. if not here is some sprite code if you want to go that route.



// Attempt for joystick animation sprite sheet
//sprite animation - use a spritesheet to animate specific frames of the sprite sheet
local joystick_up = fe.add_image("joysprite.png", (fe.layout.width / 2) - 480, fe.layout.height - 180, 300, 200);
local sprite_cfg = {
    when = When.Always,
   orientation = "vertical",
   height = 116,
    width = 242,
    frame = 0,
    time = 1000,
    order = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
    repeat = "yoyo",
   loop = true
}
animation.add( SpriteAnimation( joystick_up, sprite_cfg ) );


keep in mind depending on your sprite sheet the setting will be a bit different

howlerbr

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Hyperspin joystick anamation
« Reply #2 on: August 15, 2017, 06:14:30 PM »
that's way too cool, I liked it. Where do I find the documentation for other animation options for sprites? In squirrel-lang site? I couldn't find anything

KTURNER

  • Full Member
  • ***
  • Posts: 97
    • View Profile
Re: Hyperspin joystick anamation
« Reply #3 on: Yesterday at 11:38:11 AM »
Wow thanks! This is way over my head but I would love to learn it. I'm going to play around with it. What's weird is when I first reinstalled windows 7 they were showing up. The layouts had white bars across them and were all jacked up but the joysticks were there. I downloaded the latest graphics drivers and fixed the issue but the joysticks are gone.

jedione

  • Sr. Member
  • ****
  • Posts: 278
  • punktoe
    • View Profile
Re: Hyperspin joystick anamation
« Reply #4 on: Yesterday at 06:41:37 PM »
repeat = "yoyo",

what code is this iv never seen this?
thought it was

repeat = "true",
repeat = "false",
help a friend....