bouncball and comment

Discussion in 'Code Samples & Tips' started by Put Claude, May 18, 2007.

  1. Put Claude

    Put Claude Active Member Licensed User

    Here a bouncing ball with comment on every line...
    DO NOT MISUNDERSTAND THE FOLOWING COMMENT, may be I am not to smart...
    B4PPC is amazing and I stay with it... but...
    I am wrestling with all the graphic posibilitys:
    with what functions can I design where on what,
    it is a lot confusing for me...
    What can I make transparant, and what not...
    on what image wil my mouse react, and where not...
    The information is so spread up that I can not see the whole picture...
    I start graphics in some direction, to see later on that I must
    choose for an other way to get my goal, and again I missed the good way...
    The explanation in one article of the graphic layers and their posibilitys
    and connections with functions will do wonders...
    Do not shoot me for this...

    Put Claude Belgium
     

    Attached Files:

  2. Cableguy

    Cableguy Expert Licensed User

    Hi Put Claude,

    I dont think that anyone will shoot you as alot of us feel the same way...At least I haven't yet figured out what is the forelayer...As i imagine it, it is like a transparent sheet of papper set on top of the form, in wich we can select a color to be "See-trough" to the form...Also I dont think that forelayer can react to anything as we cannot(?) set any controls on it...Mosstly I think that forelayer is usefull for scrolling graphics, too bad that we have first to erase to then redraw...this is a lot of processor time consuming...And causes the animation to NOT be smooth...the graphical object tend to flicker....

    Anyway, Most of graphics animations are acomplished using timers, wich I know You're not fond of, Or any kind of loop that manages the graphics displayed position....
     
    Last edited: May 18, 2007
  3. RandomCoder

    RandomCoder Well-Known Member Licensed User

    The ForeLayer of a form is similar to the Form's normal 'background' layer with the added advantage that you can make a particular colour transparent. This means that supposing you had an image of a particular shape set against a white background and the Form.Color was black (or any colour other than white). When you display your image on the Forlayer it will appear with the white background still showing, thus if the shape was a coloured circle, you now have a form with a black background and a white square with a circle inside. Now set the ForeLayer transparent colour to white and what you get is a form with a black background and a circle, no white square anymore.

    Also, to speed things up you don't need to erase the entire forelayer, just the part of the forelayer that you want too.

    Regards,
    RandomCoder
     
Loading...