Hi there,
I was just testing the multiple density image in 6.5(rc1)
Let me state my assumptions, and stop me when i am wrong please...
Creating a test stack for iPhone arm 7.
Created stack at 320x480.
Created 2 images (320x100),(640x200), the larger image has a red x on it.
Named the images myimage.png, and myimage@2x.png
Put both image files in copy files.
Imported the smaller image to the card.
Tested the stack in both the simulator and a real iPhone 5.
I expected to see the larger 2x image with the red x on it, but i always see the smaller image scaled.
Help with multiple density image basics
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Help with multiple density image basics
Kind Regards
Gary
https://www.doobox.co.uk
Gary
https://www.doobox.co.uk
Re: Help with multiple density image basics
Sussed it..!
At least i have found one way to see images at design time and then have those image behave properly at run time.
In my project folder i have a folder containing all my images, called "images".
Add the "images" folder to the copy files in standalone settings.
In the "images" folder have all my images as image.png and image@2x.png for example.
Now i can just import the smaller of the images to the card at design time, so i can see what i am doing.
In the card script i added :
So at runtime this is switching out the source of all of the images to the images in the now included "images" folder, and the correct image 1x or 2x is indeed displayed.
At least i have found one way to see images at design time and then have those image behave properly at run time.
In my project folder i have a folder containing all my images, called "images".
Add the "images" folder to the copy files in standalone settings.
In the "images" folder have all my images as image.png and image@2x.png for example.
Now i can just import the smaller of the images to the card at design time, so i can see what i am doing.
In the card script i added :
Code: Select all
on preOpenCard
repeat with x=1 to the number of images of this card
put the short name of image x into tImageName
set the filename of image x to specialfolderpath("engine") & "/images/" & tImageName
end repeat
end preOpenCard
Kind Regards
Gary
https://www.doobox.co.uk
Gary
https://www.doobox.co.uk