Re: loading images files for background

Eric Leshinsky <[email protected]>
Newsgroups gmane.comp.breve
Message-ID <[email protected]>
This question may have been asked previously, but it
continues to nag us. We are simply trying to change
the background of our simulation to another .png file
from the customary clouds image. We were successful in
doing this on the pc platform but not on mac which is
our primary platform for this project. here is a
sample of our current code (obviously the pasted
version has screwed up the code alignment). Assuming
the path is correct and the image is located in the
same folder as the simulation, do you see anything
peculiar in the code? 

THANK YOU ONCE AGAIN FROM TEAM NOVICE-

eric leshinsky
Rice School of Architecture 



@include "Stationary.tz"
@include "Control.tz"
@include "Mobile.tz"
@path "/users/leshy/Twenty-Four/breve_images".

@define SWARM_SIZE   16.

Controller Swarm.

Control : Swarm {
    + variables:
        ducks (list).
        birds (list).
        item (object).
        breveTexture (int).
        aerialTexture (int).
        selection (object).
    

        # the menu items corresponding to  different
flocking behaviors

        normalMenu (object).

    + to click on item (object):
        if selection: selection hide-neighbor-lines.
        if item: item show-neighbor-lines.

        selection = item.

        super click on item.

    + to init:
        
        # Set up menus to modify the type of movement
allowed.

        self add-menu named "Smoosh The Birdies"
for-method "squish".
        self add-menu-separator.
        normalMenu = (self add-menu named "Flock
Normally" for-method "flock-normally").
        
        self enable-lighting.
        self enable-smooth-drawing.
        self move-light to (0, 20, 20).

        breveTexture = 0.
        aerialTexture = (self load-image from
"users/leshy/Twenty-Four/breve_images/LA.png").
        
        birds = SWARM_SIZE new Birds.
        birds set-bitmap to -1.
        birds set-color to (0.3, 0.3, 0.3).
        
        ducks = SWARM_SIZE new Ducks.
        ducks set-bitmap to -1.
        ducks set-color to (0.2, 1, 0.2).
        
        # we'll call this method to set up the initial
bird behavior.

        self flock-normally.

        self set-background-texture to aerialTexture.

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/
_______________________________________________
breve mailing list
[email protected]
http://www.spiderland.org/mailman/listinfo/breve
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.