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

Posted on 2011-05-09
Medium Priority
Last Modified: 2012-05-11
If you look at hbcli.org 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 83

Expert Comment

ID: 35720374
LVL 29

Accepted Solution

dgofman earned 2000 total points
ID: 35724086
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

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
Suggested Courses

621 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