Celestial Sphere Component
 celestial_sphere140view, link (66.2 KB, 700×400) source (608 KB)Fri, 4 Aug 06, 5:18pm UTC 
 

Fixed a problem affecting the horizon plane when making a movie in Flash 7.

 
 celestial_sphere128   Wed, 27 Jul 05, 8:01pm UTC 
 

Shaded band functions on the celestial sphere component:

  • addShadedBand(frontName, backName, name, parameters, [surface, [hemisphere, [initObject]]]) - name defines the name the band will be known by to access it specifically; see the description of setLinkageNames() below for a description of the frontName, backName, surface, hemisphere, initObject properties; see setParameters() for a description of the parameters argument
  • updateShadedBands()
  • showShadedBands()
  • hideShadedBands()
  • removeShadedBands()

Methods of a shaded band include:

  • setParameters({dec1, dec2, [ra, tilt]}) - the dec1 and dec2 (or alt1 and alt2) parameters determine the range of the band; the optional ra (or az) and tilt parameters can be used to define a band in any arbitrary orientation (see the circle documentation for an understanding of what these parameters mean, or see the celestial_sphere101 example)
  • setLinkageNames(frontName, backName, [surface, [hemisphere, [initObject]]]) - frontName and backName are the linkage names of the clips in the library (these should be discs 200 pixels wide); the optional parameter surface can be the strings "inner" or "outer" and determines whether the band appears on the inner or outer surface of the sphere (default is outer); the optional parameter hemisphere can be the strings "below", "above", or "full" and determines whether the band appears below or above the horizon plane, or both (default is both); the initObject parameter can be an object whose parameters get passed to the front and back movieclips when they are attached
  • setBorderStyle(thickness, [color, [alpha]]) - sets the linestyle of the border
  • remove() - removes the band
  • update() - updates the band

Properties of a shaded band include:

  • visible - toggles the visibility of the band (no update required)
  • showBorder - toggles the visibility of the border of the band (no update required)

Additional notes:

When the front and back shaded movieclips are attached to the library they get three variables defined on them (in addition to any that are passed by an initObject):

  • _sphere - a reference to the sphere that the clips are a part of
  • _shadedBand - a reference to the specific shaded band that the instances belong to
  • _side - a string, "front" or "back", that tells the clip which side of the sphere it is part of

The declination and altitude ranges don't require the tilt and ra (or az) parameters, but one situation that does is putting a band on the ecliptic. The following line defines a band that extends 10° above and below the ecliptic:

sphere.band.setParameters({dec1: -10, dec2: 10, ra: 0, tilt: 23.4});

 
 celestial_sphere101view, link (44.5 KB, 800×400)  Mon, 23 Feb 04, 4:32pm UTC 
 

This new version has a number of changes, the most significant of which is that circles are rendered twice as fast.