simple change image question

digitalzerodigitalzero Member, BASIC Posts: 639
does the image have to be the same height and width for the change image behavior to work? i noticed if i wanted to do a change image behavior on something thats from small to big it usually has to be the same size... is there a way around this?

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited February 2013
    does the image have to be the same height and width for the change image behavior to work? i noticed if i wanted to do a change image behavior on something thats from small to big it usually has to be the same size... is there a way around this?
    No it doesn't have to be the same size: basically, if you use Change Image behaviour or Change Attribute self.Image, in both cases, if the changed picture is a different size, it will be forced to the same size as the actor if the actor has the default Horizontal Wrap and Vertical Wrap settings as Stretch. (If they are set to Fixed, the new size image, if it is larger, will be cropped by the smaller size of the actor).

    Example based on Stretch: you have an image in a 100 x 100 pixel box. You have another image with a size of 198 x 320. When you change the image with one of the two methods, the 198 x 320 will fit the 100 x 100 box exactly, the image distorted/squashed to fit exactly.

    If you are replacing one image with another, and this second image is a different size, and you want to show the different size too, then just add two change attribute behaviours for the new width and height to prevent it from being resized/distorted.

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • digitalzerodigitalzero Member, BASIC Posts: 639
    yeah i figured that... but @gyroscope theres no way to just simply click a button and not have to go through all of that lol
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited February 2013
    yeah i figured that... but @gyroscope theres no way to just simply click a button and not have to go through all of that lol
    Well, there's always the upcoming Telepathy Behaviour... ;-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • digitalzerodigitalzero Member, BASIC Posts: 639
    @gyroscope LOL! yeah that was kinda farfetched of me to even say that lol i guess i will quit being lazy lol
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

Sign In or Register to comment.