Computer Science Canada confused with Pic.Free |
Author: | tenniscrazy [ Thu May 24, 2007 5:00 pm ] | ||
Post subject: | confused with Pic.Free | ||
in our program we have an intro text thing, and it cretes alot of pics, soit was making our program laggy. But when i tried to use Pic.Free, it wouldn't work...it came up as errors on all of the variables. does someone know why? heres the code:
|
Author: | Cervantes [ Thu May 24, 2007 9:37 pm ] |
Post subject: | RE:confused with Pic.Free |
You declared your picture variables (p1 through 18) inside your loop, which means they are local to the loop. They don't exist outside the loop. That's why you get errors like 'p1 has not been declared'. Also, you should REALLY learn about arrays. They'll make this all very much easier. Lastly, you can do all sorts of effects with text, without resorting to this Pic.DrawSpecial procedure that I don't have access to because I'm using v4.0.5. Check out the RGB module. I can only guess at the effect you're trying to achieve, but if I guess correctly (fading text in), you can easily do it with the RGB module. Hope this helps |
Author: | tenniscrazy [ Fri May 25, 2007 10:12 am ] |
Post subject: | RE:confused with Pic.Free |
thanks for the help. i know everything would be easier with arrays...but...my teacher says they're too advanced for grade 10, so we have to use other methods. and we are going for the fade in effect. |
Author: | Cervantes [ Fri May 25, 2007 4:51 pm ] |
Post subject: | RE:confused with Pic.Free |
Did your teacher say that specifically to you, or to the class in general. Did your teacher say that you HAVE to use other methods, or did she recommend it? Is there an alternative method that doesn't involve making so many variables like you've done? Try to answer these questions, and then decide what to do. If you think using arrays would be best, 99.9% of the time you should go ahead and learn the material and use it. As the famous quote goes, "Never let school interfere with your education." |