A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: error using screens/slides

  1. #1
    Junior Member
    Join Date
    Nov 2001
    Posts
    13

    error using screens/slides

    I'm getting the following error when publishing a slide presentation:

    **Error** Screen=tripixh, layer=Layer 3, frame=1:Line 4: ')' expected
    if((this._parent.tripix.2004 != undefined) && (this._parent.tripix.2004 != null))

    I'm simply using the Behavior palette to setup the navigation between the screens, but this error keeps me from going forward. Does anyone know what it means or what I'm doing wrong?

  2. #2
    Junior Member
    Join Date
    Feb 2005
    Posts
    3
    This is the basic code (behavior) that works with a fowrad arrow if you simply want to step through the screens in your presentation:

    on (release) {

    // Locate the screen holding the anchor for this behavior
    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;
    }
    }

    // If there's a Slide to apply the behavior to, then do so
    if(screen instanceof mx.screens.Slide)
    {
    screen.rootSlide.currentSlide.gotoNextSlide();
    }

    }
    on (keyPress "<Down>") {

    // Locate the screen that is the target of the behavior
    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;
    }
    }

    // If there's a Slide to apply the behavior to, then do so
    if(screen instanceof mx.screens.Slide)
    {
    screen.rootSlide.gotoLastSlide();
    }

    }

    Just paste that into your Actions panel, and make sure it is a button or MC action, not a frame action. Hope that helps.
    D

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center