Creating Snow - Snow Screensaver

Share sample pubs, scripts, etc. with other NeoBook users

Moderator: Neosoft Support

Locked
nastone1

Creating Snow - Snow Screensaver

Post by nastone1 »

I am trying to create a snowing screen saver.  I tried using an image file, nut it's jerky.  

What I need is multiple Ellipse objects to slide down the screen in a snow like fashion.  Preferrable at random.

Any ideas?

Neal
User avatar
Gaev
Posts: 3782
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada
Contact:

Creating Snow

Post by Gaev »

Neal:

What I need is multiple Ellipse objects to slide down the screen in a snow like fashion.  Preferrable at random

How about using the PlayCartoonFile command ; make up the Cartoon file with just one or two or three frames ; then, issue a series of ...

PlayCartoonFile "start x" "start y" "end x" "end y" "file name" "times" "delay" "mode"

... commands with ...

"file name" being the same in all instances
"mode" set to Normal or Loop
"starty" set to 1
"endy" set to bottom of window/snow-floor
"startx" set randomly (i.e. using the Random "maximum value" "variable" command)
"endx" set to startx +/- [AConstant] (unless you want each flake falling at a different angle)
"times" and "delay" set to your preferences

... the series of commands (Random, SetVar, PlayCartoonFile etc.) can be wrapped inside a Loop ... EndLoop block ; and the Loop Counter can also be randomly set.
nastone1

Creating Snow

Post by nastone1 »

I've been trying this and when the second CAR file plays the first one stops so I only get one flake.

Neal
Roxie

Creating Snow

Post by Roxie »

Neal,

I really hate using a browser, but sometimes because of the time restraints to finish a project, it's sometimes easier.  Here's a url to a snow effect script that can be displayed in Neobook via the browser object:

http://www.altan.hr/snow/index.html


An example Neobook pub is on my web site at

http://www.akidsheart.com/snowjs.exe


It would be nice to change object properties during runtime with Neobook. I think that has been suggested.

Anyway, hope this helps.

Have a wonderful week.

Roxie
nastone1

Creating Snow

Post by nastone1 »

Acutally I got the problem solved now.  Worksa good thanks to gk51.

Neal
mh

Creating Snow

Post by mh »

Roxie,

I was following this thread and found the snowflakes for the html browser. Thanks alot.

However, the link to you pub didn't work.

I just wnated to ask a question about html objects.

I got the snowflakes to work in a browser object but I would like to put some transparant objects ontop of the object. When I do this the snowflakes do not appear under the transparent button.

Is this how it is suppose to work?

thanks
mh
User avatar
Gaev
Posts: 3782
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada
Contact:

Creating Snow

Post by Gaev »

mh:

... transparant objects on top of the (html) object ... snowflakes do not appear under the transparent button

NeoBook can only handle transparency when one of its "regular" objects is on top of another of its "regular" objects ; by "regular" I mean anything except ...

a) a Rectangle object used/populated by a plug-in
b) a Browser object (used/populated by the IE control)

... my recent enquiry on this topic brought this response from the good folks at NeoSoftware ...
This is a complicated problem that's a little difficult to explain. All
objects in NeoBook are based on Windows components. Everything in effect is
a window. Objects are stacked and ordered just like the windows used by
applications. This allows NeoBook to provide access to built-in Windows
components like text fields, list boxes, web browsers, etc. These components
are also windows. The downside is that Windows (capital W) doesn't support
truly transparent windows. You can fake it by capturing the screen and
displaying what's supposed to be behind the object. Animated GIFs do that.
However, that doesn't work when the background changes constantly. There's
no way for an object to know that something behind it has changed. Another
option is to make rectangles, ellipses and lines custom shaped windows. This
might work but could potentially consume quite a bit of memory as custom
shaped are infinitely more complex than rectangular windows. I don't know if
there's really a good solution to this dilemma, but we'll definitely look
into it.


Hope this helps.
Roxie

Creating Snow

Post by Roxie »

mh,

Can you try putting these objects in the browser so that the snow is over them?

The link seems to be working for me.  Guess it's one of the days...
mh

Creating Snow

Post by mh »

Thanks, for your, as usual, terrific help.

mh
Locked