how do I create a javascript file that rotates a stack of jpgs

Posted on 2011-05-09
Last Modified: 2012-05-11
If you look at you will see rotating jpgs on the left hand column.
These were done with a Flash Generator (but not Adobe Flash).

I need a way, via a java script or actual .fla code to have all jpgs pulled from an external file.
The end user wants to change them periodically.
Each row has three rotating jpgs.
Question by:glenn_1984
    LVL 81

    Expert Comment

    LVL 29

    Accepted Solution

    You can use ExternalInterface API communicating with SWF via JS


    and for rotation existing SWF files or images use code bellow

    Stage.scaleMode = "noScale";
    Stage.align = "TL";
    var rotation:String = "left";
    var container:MovieClip = createEmptyMovieClip("container", _root.getNextHighestDepth());
    container._lockroot = true;
    var myMCL:MovieClipLoader = new MovieClipLoader();
    var myListener:Object = new Object();
    myListener.onLoadComplete = function(target_mc:MovieClip) {
      if(rotation = "left"){
          container._rotation = -90;
         container._x = 0;
          container._y = Stage.height;
      }else if(rotation = "right"){
          container._rotation = 90;
          container._x = Stage.width;
         container._y = 0;
         container._rotation = 0;
         container._x = (Stage.width - Stage.height) / 2;
         container._y = 0;
    myMCL.loadClip("imageor_movieclip", container);

    Open in new window


    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
    In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
    The goal of the tutorial is to teach the user how to how to record live broadcast.
    The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now