Hiding screen AS error 2004-02-18 - By Jefferis Peterson
Back I'm using Flash Pro and allowing it to write the behaviors for hiding a screen on button release, but it is producing script errors. IT may be due to the fact that I am hiding two other screens while revealing one and MX isn't capable of writing proper combined scripts.
My hierarchy is as: BASE APPLICATION FORM choose speed form 56k form DSL form
Here is the error:
> **Error** Screen=choose, layer=Layer 1, frame=1:Line 17: ')' expected > if((this.56k != undefined) && (this.56k != null)) > > **Error** Screen=choose, layer=Layer 1, frame=1:Line 11: ')' expected > if((this.56k != undefined) && (this.56k != null)) >
Here is the code. It looks okay to me, but it seems to be requesting I insert separate on release actions for each hide or reveal: > > on (release) { > // Hide Screen behavior > if((this != undefined) && (this != null)) > { > this.setVisible(false); > } > // End Hide Screen behavior > > // Hide Screen behavior > if((this.DSL != undefined) && (this.DSL != null)) > { > this.DSL.setVisible(false); > } > // End Hide Screen behavior > // Show Screen behavior > if((this.56k != undefined) && (this.56k != null)) > { > var screen = null; > var target = this; > while((screen == null) && (target != undefined) && (target != null)) > { > if(target instanceof mx.screens.Screen) > { > screen = target; > } > else > { > target = target._parent; > } > } > this.56k.setVisible(true); > > if((screen != null) && (this.56k != screen.rootSlide.currentSlide)) > { > screen.rootSlide.currentSlide.setVisible(false); > } > } > // End Show Screen behavior > }
~~~~~~~~~~~~ Jefferis Peterson, Pres. Web Design and Marketing http://www.PetersonSales.com
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ Supported by Fig Leaf Software -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ Lower Prices for Certified Training! Check out new lower prices for Certified Macromedia Training from Fig Leaf Software. Expand your skill set with courses in ColdFusion, Flash, Rich Internet Applications and .NET in the new year. Fig Leaf Software provides the highest caliber instruction at our training centers in Washington D.C., Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location.
Get the details at http://training.figleaf.com/ -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- To unsubscribe, e-mail: flashnewbie-unsubscribe@(protected) For additional commands, e-mail: flashnewbie-help@(protected)
|
|