• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Next/previous buttons that are moving between different animations.

New Here ,
Nov 26, 2015 Nov 26, 2015

Copy link to clipboard

Copied

Gyazo - 0260741e4ce22250745972c4f8122aef.png

here is an image of my interface, I have 5 buttons : left,right,3 buttons with animations in it, my code doesnt show any errors but when i try to run swf file ,nothing happens,here is my code,any suggestions?

package {

  import flash.display.MovieClip;

  import flash.events.MouseEvent;

  public class animationinterface extends MovieClip {

  //var interfacewindow:Interfacewindow;

  var interface1:Interface1;

  //var animation3:Animation3;

  var animation2:Animation2;

  var animation1:Animation1;

  public function animationinterface() {

  //interfacewindow = new Interfacewindow();

  interface1 = new Interface1();

  //animation3 = new Animation3();

  animation1 = new Animation1();

  animation2 = new Animation2();

  addChild(interface1);

  //Add event listeners

  interface1.buttonleft.addEventListener(MouseEvent.CLICK, left);

  interface1.buttonright.addEventListener(MouseEvent.CLICK, right);

  //interfacewindow.animation1.addEventListener(MouseEvent.CLICK, an1);

  //interfacewindow.animation2.addEventListener(MouseEvent.CLICK, an2);

  }

  //Event handlers

  function left(event:MouseEvent): void {

  addChild(animation1);

  removeChild(interface1);

  }

  function right(event:MouseEvent): void {

  addChild(animation2);

  removeChild(interface1);

  }

  /* function an1(event:MouseEvent):void

  {

  addChild(animation1);

  removeChild(interfacewindow);

  }

  function an2(event:MouseEvent):void

  {

  addChild(animation2);

  removeChild(interfacewindow);

  }

  */

  }

}

TOPICS
ActionScript

Views

333

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Enthusiast , Nov 27, 2015 Nov 27, 2015

image.jpg

The class "animationinterface.as" file must be saved in the same directory of the flash project & swf files, Then test the movie..

Votes

Translate

Translate
Enthusiast ,
Nov 26, 2015 Nov 26, 2015

Copy link to clipboard

Copied

You have to link the "animationinterface" class to some movie clip and add it to the stage or make it the main class..

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 27, 2015 Nov 27, 2015

Copy link to clipboard

Copied

Hey,thanks for the help,but it didnt work(

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Nov 27, 2015 Nov 27, 2015

Copy link to clipboard

Copied

image.jpg

The class "animationinterface.as" file must be saved in the same directory of the flash project & swf files, Then test the movie..

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 27, 2015 Nov 27, 2015

Copy link to clipboard

Copied

oh im so sorry,thanks a lot!)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Nov 27, 2015 Nov 27, 2015

Copy link to clipboard

Copied

LATEST

You're welcome.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines