A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: changing images in a specific interval

  1. #1
    Junior Member
    Join Date
    Jan 2013
    Posts
    2

    changing images in a specific interval

    I am newbie in Flash Website development. I want to change the picture on the website with a specific interval of time. I have setup motion tween for two pictures on the website and it works once while loading the site but after it reaches the home keyframe it stops because I have the action script command stop on that keyframe. Could anyone guide me in a right direction to change the picture? Or is there any other way to do it? By the way I am using Adobe Flash CS6.

  2. #2
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi,

    Post the code you have already or better still attach your fla, AS2 here

  3. #3
    Junior Member
    Join Date
    Jan 2013
    Posts
    2
    Thanks for your reply. Here is my action script 3 code



    stop();

    btn1.gotoAndStop(2);
    btn2.gotoAndStop(1);
    btn3.gotoAndStop(1);
    btn4.gotoAndStop(1);
    btn5.gotoAndStop(1);
    btn6.gotoAndStop(1);
    btn7.gotoAndStop(1);

    btn1.addEventListener(MouseEvent.CLICK, gotoLaserLikeLipo);
    btn2.addEventListener(MouseEvent.CLICK, gotoCelluite);
    btn3.addEventListener(MouseEvent.CLICK, gotoSpecialOffers);
    btn4.addEventListener(MouseEvent.CLICK, gotoOtherServices);
    btn5.addEventListener(MouseEvent.CLICK, gotoFaq);
    btn6.addEventListener(MouseEvent.CLICK, gotoMedia);
    btn7.addEventListener(MouseEvent.CLICK, gotoContactUs);

    ftbtn1.gotoAndStop(2);
    ftbtn2.gotoAndStop(1);
    ftbtn3.gotoAndStop(1);
    ftbtn4.gotoAndStop(1);
    ftbtn5.gotoAndStop(1);
    ftbtn6.gotoAndStop(1);
    ftbtn7.gotoAndStop(1);

    ftbtn11.addEventListener(MouseEvent.CLICK, gotoLaserLikeLipo);
    ftbtn12.addEventListener(MouseEvent.CLICK, gotoCelluite);
    ftbtn13.addEventListener(MouseEvent.CLICK, gotoSpecialOffers);
    ftbtn14.addEventListener(MouseEvent.CLICK, gotoOtherServices);
    ftbtn15.addEventListener(MouseEvent.CLICK, gotoFaq);
    ftbtn16.addEventListener(MouseEvent.CLICK, gotoMedia);
    ftbtn17.addEventListener(MouseEvent.CLICK, gotoContactUs);

    hdbtn1.gotoAndStop(2);
    hdbtn2.gotoAndStop(1);
    hdbtn3.gotoAndStop(1);
    hdbtn4.gotoAndStop(1);
    hdbtn5.gotoAndStop(1);
    hdbtn6.gotoAndStop(1);
    hdbtn7.gotoAndStop(1);

    hdbtn1.addEventListener(MouseEvent.CLICK, gotoLaserLikeLipo);
    hdbtn2.addEventListener(MouseEvent.CLICK, gotoCelluite);
    hdbtn3.addEventListener(MouseEvent.CLICK, gotoSpecialOffers);
    hdbtn4.addEventListener(MouseEvent.CLICK, gotoOtherServices);
    hdbtn5.addEventListener(MouseEvent.CLICK, gotoFaq);
    hdbtn6.addEventListener(MouseEvent.CLICK, gotoMedia);
    hdbtn7.addEventListener(MouseEvent.CLICK, gotoContactUs);

    function gotoLaserLikeLipo(event:MouseEvent):void
    {
    gotoAndStop("laser-like-lipo");
    }
    function gotoCelluite(event:MouseEvent):void
    {
    gotoAndStop("celluite");
    }
    function gotoSpecialOffers(event:MouseEvent):void
    {
    gotoAndStop("special-offers");
    }
    function gotoOtherServices(event:MouseEvent):void
    {
    gotoAndStop("other-services");
    }
    function gotoFaq(event:MouseEvent):void
    {
    gotoAndStop("faqs");
    }
    function gotoContactUs(event:MouseEvent):void
    {
    gotoAndStop("contact-us");
    }
    function gotoMedia(event:MouseEvent):void
    {
    gotoAndStop("media");
    }

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