Mailing List
Home
Forum Home
Flash Pro
Subjects
Firework Effect
setInterval bug identified and fixed
setInterval bug identified and fixed
ScrollPane component doesn 't auto update
Help: MX 2004 How to script a print button to print the entire sli
Event Dispatcher between classes
memory management removeMovieClip /
MX2004 Dataset itemClassName
Order of events per frame
XML to Object help
Textfield prototype question
Flash and QuickTime VR
Reading and displaying RSS feeds in Flash MX
Flash MX 2004 Sucks
AW: [Flashcoders] Switch/Case vs If/else
AW: [Flashcoders] Switch/Case vs If/else
Flash Interface with 10mb xml file
Web Service Results
Listener Object 's best practice
 
Hiding screen AS error

Hiding screen AS error

2004-02-18       - By Jefferis Peterson

 Back
Reply:     1     2     3  

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)