|
#1
|
|||
|
|||
|
I making this app and i need to the code for repeating image
i was thinking it some like this math.randomseed(os.repeat()) not sure |
|
|
|||
|
|
|
#2
|
||||
|
||||
|
Be more descriptive in your thread title what you need help with, otherwise people may not bother to check the thread.
And how to you mean with repeating image? Be more descriptive with your problem. I can at least safely say that your suggested solution would not work to get any kind of image on the screen. To get an image you first have to load one: myimage = image.load("image.png") Then you need to draw it to screen: myimage:draw(xcoordinate, ycoordinate, width, height) Exchanging the words for the value wanted It has now been added to the screen buffer, to show it you need to update the screen: screen.update() Now an image has been drawn on the screen. But without a loop to catch the program it'll just exit immediately without giving you time to see it. myimage = image.load("image.png") While(true) do myimage:draw(xcord,ycord,wid,hei) screen.update() os.sleep(5) end This will show an image, but it is impossible to quit the application since it's an eternal loop. Check other apps' main loop for ideas how to do it.
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it! Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it. Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^ |
|
#3
|
|||
|
|||
|
Quote:
myimage = image.load("image.png") While(true) do myimage:draw(xcord,ycord,wid,hei) screen.update() os.sleep(5) end work with two images in a countious loop? |
|
#4
|
|||
|
|||
|
I making a strobe light
Please Habhome can you examine this code and explain it to me because i need your help |
|
#5
|
||||
|
||||
|
Quote:
Or do you want me to do as I did with RobertsAccount and guide you through it via MSN? (Whichever you choose, it'll have to wait for another day it's past 1AM and I want to sleep)
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it! Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it. Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^ |
|
#6
|
|||
|
|||
|
Quote:
|
|
#7
|
||||
|
||||
|
Quote:
Be careful with this code, I'm not sure what happened but I got a screen buffer error the first time I ran the code, but after a restart it didn't occur again. (See screenshot for the error)
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it! Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it. Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^ |
|
#8
|
|||
|
|||
|
thanks
|
|
#9
|
|||
|
|||
|
Thanks Habhome for the code it helped me understand it a lot more.
I have one more thing i want to make a menu so people can choose different colored strobe lights thanks i really appreciate it |
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -5. The time now is 03:46 AM.












Linear Mode
