Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's TI-BASIC subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. TI-Basic => TI-BASIC
Author Message
interwined


Newbie


Joined: 26 Sep 2003
Posts: 39

Posted: 20 Oct 2003 08:05:25 pm    Post subject:

I want a blinking pixel on my screen, but I've tried pxl-on( and then pxl-off( right after that. I have tried using a loop to slow the blink down, but it's still too quick in blinking. Anyone have any code to slow it down?
Back to top
NETWizz
Byte by bit


Bandwidth Hog


Joined: 20 May 2003
Posts: 2369

Posted: 20 Oct 2003 11:24:10 pm    Post subject:

Yeah,

Slowing it down is easy!

while 1
pxl-change(0,0
For(A,0,20
End
End

The

For(A,0,20
End

is a delay. Simple make 20 larger to delay more. You can insert this anywhere you want to delay the execution of a basic program. Please note that getkey inputs are not accepted while in a delay; therefore, if you are checking for a keypress, it will not be recognized until after the delay unless you tweak the code.

-Jbirk
Back to top
interwined


Newbie


Joined: 26 Sep 2003
Posts: 39

Posted: 21 Oct 2003 05:49:15 am    Post subject:

That should work, thanks
Back to top
NETWizz
Byte by bit


Bandwidth Hog


Joined: 20 May 2003
Posts: 2369

Posted: 21 Oct 2003 10:33:32 am    Post subject:

No problem.

If you need me to write any small routines or show you the format I would use to make the project, drop me a line.

-Jbirk
Back to top
interwined


Newbie


Joined: 26 Sep 2003
Posts: 39

Posted: 21 Oct 2003 02:56:19 pm    Post subject:

Well, I am creating a drawing program. The blinking pixel was for the center of the cursor so you can't get lost. But, I have been using labels to go from different pixel sizes, erasers, and some brushes. For example, if a person is using the one pixel pxl-on type then has to go to eraser (pxl-off) by pressing a button, I end up repeating everything except changing the pxl-on code to pxl-off. Anyhelp is appreciated.
Back to top
NETWizz
Byte by bit


Bandwidth Hog


Joined: 20 May 2003
Posts: 2369

Posted: 21 Oct 2003 03:51:23 pm    Post subject:

Okay you are making a pointer which is the brush, and you want it to blink.

After you move it, you do not want it to change the pixel it was over.

That makes sence.

I will get right on it and tell you what to do tomorrow.
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 20 Nov 2003 09:53:08 am    Post subject:

Should work:

ClrDraw
47->A
31->B
Repeat K=45
getKey->K
If Ans:Then
If C=1:Pxl-Off(B,A //erase cusor/brush 1
If C=2:Then //erase cursor 2
Pxl-Off(B,A
Pxl-Off(B,A+1
End
RecallPic 0
If K=21:Then
If C=1:Pxl-On(B,A //draw cursor/brush 1
If C=2:Then //draw cursor/brush 2
Pxl-On(B,A
Pxl-On(B,A+1
End
If K=22:Then //change brush/cursor
C+1->C
If C>2:1->C
End
StorePic 0
End
End
A+(K=26)-(K=24->K //don't forget to add don't-go-of-the-screen-protection
B+(K=34)-(K=25->B
+1-2(>5-> //increase 5 for slower blinking pixel
If Ans>0:Pxl-On(B,A
If Ans<0:Pxl-Off(B,A
End
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 21 Nov 2003 02:37:14 am    Post subject:

Nah, your post is fine, I just wanted to give him another view on the possible program since I made a paint program a while back (almost exactly like my source posted above, but with a menu to choose brush style,circles, lines, boxes, etc.)
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are GMT - 5 Hours

 

Advertisement