Skip to main content
jasperc74665832
Participant
June 7, 2018
Question

Help! A button in a movieclip in a scrollpane

  • June 7, 2018
  • 2 replies
  • 238 views

So, I'm currently working on a project for school, and I ran into this annoying problem that I can't seem to get my buttons work.

This is the code that I have in the movieclip:

import flash.events.MouseEvent;

btnPattaya.addEventListener(MouseEvent.CLICK, resort1);

function resort1(e:MouseEvent){

MovieClip(parent.parent).gotoAndPlay("label1");

}

btnKhaoyai.addEventListener(MouseEvent.CLICK, resort2);

function resort2(e:MouseEvent){

MovieClip(parent.parent).gotoAndPlay("label2");

}

On my main timeline I have placed 3 labels to play an animation.

btnMiaMuiNe.addEventListener(MouseEvent.CLICK, resort3);

function resort3(e:MouseEvent){

MovieClip(parent.parent).gotoAndPlay("label3");

}

The code on the main timeline to make a scrollpane is this:

scrollPane.source = myContent; !-- The myContent is the class name of my Movieclip.

scrollPane.setSize(1220, 683);

I'm relative new to actionscript and I hope you guys could help me.

    This topic has been closed for replies.

    2 replies

    JoãoCésar17023019
    Community Expert
    Community Expert
    June 8, 2018

    Duplicated thread:

    Need help! School project

    Joseph Labrecque
    Community Expert
    Community Expert
    June 8, 2018

    Can you share your file? I'll give it a look.