3D movement in AS 2.0

I'm working on a project and I want to make a page that has 8
mcs in a circle. However, the circle is 3D. Some mcs are close,
some are far. When a viewer clicks on an mc, the circle rotates.
I've gotten ahold of some code and tried to implement it and it has
not worked. Does anyone have any advice?
Something similar to the movement on this page:
http://www.templatehelp.com/preset/pr_preview.php?i=22810&pr_code=Q26Vn38V68vBY9CIBUNra62h ZU0fNk

oops, I'm a dummy
onClipEvent(load){
y=100;
speed=5;
radius=100;
xcenter=250;
ycenter=150;
zcenter=100;
angle=0;
fl=150;
onClipEvent(enterFrame){
z=Math.sin(angle*Math.PI/180)*radius+zcenter;
scale=fl/(fl+z);
y=Math.cos(angle*Math.PI/180)*radius;
_x=x*scale+xcenter;
_y=y*scale+ycenter;
_xscale= _yscale = scale*100;
angle+=speed;
//if(angle>359){
//angle-=360;
there you go.

Similar Messages

  • Three movies I bought from iTunes this morning do not show up on the 1st Gen AppleTV.

    I understand some file formats are not compatible with AppleTV (1st gen) but these films were purchased directly from iTunes.  One would assume they are formatted properly to work on Apple equipment, yes?  Previously purchased movies show up on the AppleTV just fine, so I'm not sure what's going with these three.  They were from the $4.99 Sci Fi collection:  Enemy Mine, Dune and Terminator 2.  Oldies but goodies.  The iMac, where the iTunes Library lives is used to stream the content to the AppleTV, and everything that is in my Library appears to be available for streaming, except these three films.  Any advice?

    I have now restored Factory Settings on the Apple TV. Looked promising until iTunes hangs everytime I tried to enter the podcast page of the sync options. And I get errors that my newest movies, created in Final Cut Pro X with the Share with 720p Apple Devices export settings are not compatible with Apple TV.
    Unbelievable.

  • How can I move an e mail account from one family pack to another

    I have an e mail address (not main family pack e mail address) and I would like to move it to another family pack. Is this possible and if so how?
    Thanks

    Caroline12, Welcome to the discussion area!
    I believe that your question is about a Mobile Me family pack account. If that is true, I believe that the answer is no.
    But your probably should post your question in the Apple.com > Support > Discussions > MobileMe discussion area.

  • How can I move applications from one account to a other ?

    Hi
    I have a old account which I used on my iPad 1. Now I moved to the cloud and got a @me.com apple ID. This new account I use for my new iPad 3 and now I would like to move some Apps from the old account to the new. How can I do this ?
    Thx for help !

    At this time you can't transfer apps or merge accounts. It has been rumoured that apple is looking at this as it's a bit of a pain. You have to use your old account with the iTunes store to access apps and then your .me account for iCloud and it's functionality but it works fine.

  • Balls don't move in bouncing balls game.Please Help !?

    I want to repaint the canvas panel in this bouncing balls game, but i do something wrong i don't know what, and the JPanel doesn't repaint?
    The first class defines a BALL as a THREAD
    If anyone knows how to correct the code please to write....
    package ****;
    //THE FIRST CLASS
    class CollideBall extends Thread{
        int width, height;
        public static final int diameter=15;
        //coordinates and value of increment
        double x, y, xinc, yinc, coll_x, coll_y;
        boolean collide;
        Color color;
        Rectangle r;
        bold BouncingBalls balls; //A REFERENCE TO SECOND CLASS
        //the constructor
        public CollideBall(int w, int h, int x, int y, double xinc, double yinc, Color c, BouncingBalls balls) {
            width=w;
            height=h;
            this.x=x;
            this.y=y;
            this.xinc=xinc;
            this.yinc=yinc;
            this.balls=balls;
            color=c;
            r=new Rectangle(150,80,130,90);
        public double getCenterX() {return x+diameter/2;}
        public double getCenterY() {return y+diameter/2;}
        public void move() {
            if (collide) {
            x+=xinc;
            y+=yinc;
            //when the ball bumps against a boundary, it bounces off
            //bounce off the obstacle
        public void hit(CollideBall b) {
            if(!collide) {
                coll_x=b.getCenterX();
                coll_y=b.getCenterY();
                collide=true;
        public void paint(Graphics gr) {
            Graphics g = gr;
            g.setColor(color);
            //the coordinates in fillOval have to be int, so we cast
            //explicitly from double to int
            g.fillOval((int)x,(int)y,diameter,diameter);
            g.setColor(Color.white);
            g.drawArc((int)x,(int)y,diameter,diameter,45,180);
            g.setColor(Color.darkGray);
            g.drawArc((int)x,(int)y,diameter,diameter,225,180);
            g.dispose(); ////////
        ///// Here is the buggy code/////
        public void run() {
            while(true) {
                try {Thread.sleep(15);} catch (Exception e) { }
                synchronized(balls)
                    move();
                    balls.repairCollisions(this);
                paint(balls.gBuffer);
                balls.canvas.repaint();
    //THE SECOND CLASS
    public class BouncingBalls extends JFrame{
        public Graphics gBuffer;
        public BufferedImage buffer;
        private Obstacle o;
        private List<CollideBall> balls=new ArrayList();
        private static final int SPEED_MIN = 0;
        private static final int SPEED_MAX = 15;
        private static final int SPEED_INIT = 3;
        private static final int INIT_X = 30;
        private static final int INIT_Y = 30;
        private JSlider slider;
        private ChangeListener listener;
        private MouseListener mlistener;
        private int speedToSet = SPEED_INIT;
        public JPanel canvas;
        private JPanel p;
        public BouncingBalls() {
            super("****");
            setSize(800, 600);
            p = new JPanel();
            Container contentPane = getContentPane();
            final BouncingBalls xxxx=this;
            o=new Obstacle(150,80,130,90);
            buffer=new BufferedImage(getSize().width, getSize().height, BufferedImage.TYPE_INT_RGB);
            gBuffer=buffer.getGraphics();
            //JPanel canvas start
            canvas = new JPanel() {
                final int w=getSize().width-5;
                final int h=getSize().height-5;
                @Override
                public void update(Graphics g)
                   paintComponent(g);
                @Override
                public void paintComponent(Graphics g) {
                    super.paintComponent(g);
                    gBuffer.setColor(Color.ORANGE);
                    gBuffer.fillRect(0,0,getSize().width,getSize().height);
                    gBuffer.draw3DRect(5,5,getSize().width-10,getSize().height-10,false);
                    //paint the obstacle rectangle
                    o.paint(gBuffer);
                    g.drawImage(buffer,0,0, null);
                    //gBuffer.dispose();
            };//JPanel canvas end
            addWindowListener(new WindowAdapter() {
                @Override
                public void windowClosing(WindowEvent e) {
                    System.exit(0);
            addButton(p, "Start", new ActionListener() {
                public void actionPerformed(ActionEvent evt) {
                    CollideBall b = new CollideBall(canvas.getSize().width,canvas.getSize().height
                            ,INIT_X,INIT_Y,speedToSet,speedToSet,Color.BLUE,xxxx);
                    balls.add(b);
                    b.start();
            contentPane.add(canvas, "Center");
            contentPane.add(p, "South");
        public void addButton(Container c, String title, ActionListener a) {
            JButton b = new JButton(title);
            c.add(b);
            b.addActionListener(a);
        public boolean collide(CollideBall b1, CollideBall b2) {
            double wx=b1.getCenterX()-b2.getCenterX();
            double wy=b1.getCenterY()-b2.getCenterY();
            //we calculate the distance between the centers two
            //colliding balls (theorem of Pythagoras)
            double distance=Math.sqrt(wx*wx+wy*wy);
            if(distance<b1.diameter)
                return true;
            return false;
        synchronized void repairCollisions(CollideBall a) {
            for (CollideBall x:balls) if (x!=a && collide(x,a)) {
                x.hit(a);
                a.hit(x);
        public static void main(String[] args) {
            JFrame frame = new BouncingBalls();
            frame.setVisible(true);
    }  This code draws only the first position of the ball:
    http://img267.imageshack.us/my.php?image=51649094by6.jpg

    I'm trying to draw everything first to a buffer:
    buffer=new BufferedImage(getSize().width, getSize().height, BufferedImage.TYPE_INT_RGB);
    gBuffer=buffer.getGraphics();
    The buffer is for one JPanel and then i want to draw this buffer every time when balls change their possitions(collide or just move).
    The logic is something like this:
    startButton -> (ball.start() and add ball to List<balls>),
    ball.start() -> ball.run() -> (move allballs, paint to buffer and show buffer)
    In the first class:
    BouncingBalls balls; //A REFERENCE TO SECOND CLASS
    In the second class:
    private List<CollideBall> balls=new ArrayList();
    the tames are the same but this isn't an error.
    Edited by: vigour on Feb 14, 2008 7:57 AM

  • Podcast episodes download to wrong folder. How can I move them?

    Some of my downloaded podcast episodes seem to be going to incorrect folders.
    For example, I subscribe to the Photoshop TV podcast. Some of the downloaded episodes go into the iTunes Music folder>Podcasts>Photoshop TV folder. This seems to me to be the correct path.
    But most of the episodes wind up in iTunes Music folder>Unknown Artist>Unknown Album folder, along with many unrelated, non-podcast files.
    Now when I search in the Library for<Photoshop> all the Photoshop TV files appear, along with other files referencing Photoshop. But when I search the Library using <Photoshop TV> as the search term, only the Photoshop TV files in the Unknown Album folder show up, but not the ones in the Podcasts>Photoshop TV folder.
    And finally when I cllick on Podcasts in the Source pane, once again only the Photoshop TV files in the Unknown Album show up.
    I've tried adding those Photoshop TV files back to the library but they remain in the Unknown Album folder.
    I haven't tried rebuilding the library yet. I will, but it seems that wont actually move any files. I could also recreating a new library moving my iTunes music folder out of the iTunes folder and then adding them all back. That seems like overkill and I might very well end up with the same problem. (I'm not sure how many of my other Podcast subscriptions have this problem, but not many)
    So,
    1) how can I get these Photoshop TV files into the Podcasts>Photoshop TV folder, and
    2) how can I make this the folder that shows up when I search via the Podcast source, and
    3) what causes this problem?
    iMac G5   Mac OS X (10.4.6)  
    iMac G5   Mac OS X (10.4.6)  

    what is WP files?
    You want to always use iPhoto with a default referenced library (the preference to copy imported item to the iPhoto library is checked) ad then delete the source photos
    LN

  • Unable to synch itune movie to my ipod classic

    Hello -
    I recently bought an ipod classic, but it will not sync my purchased movie. I've noticed the movie has an exclamation mark beside it. When I checked my itunes file; the movie downloaded to a "Downloads Folder", is there something wrong?

    Yes, it should be in your iTunes folder. The ! next to the song indicates that iTunes has lost track of where that movie file is located.
    Move it to your iTunes folder and you should have no trouble syncing it.
    See: How to add content from your hard drive to iTunes.

  • Movies i bought from the itunes store and they wont sync to my ipod

    I had bought an ipod for my daughters birthday n i had purchased several movies from the itunes store and they downloaded n they show up in my library n wheni check them to sync to her ipod....it shows a pop up block that says that it cannot be copied to this ipod cause it is not supportrd by this ipod.  my baby is really wanting to use it n I downloaded the itunes 10 & updated her ipod software to 4.3.3 i  think that i did all the necessary updated and downloads now what do i do...i've been on this comp eversince 11:00am this morning and it is still now 1:29am....i dont know....if anyone has any suggestions..they r welcomed

    If your country's iTunes Store allows you to redownload purchased tracks, I'd delete your current copy of the track and try redownloading a fresh one. See the following document for instructions:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    Otherwise, I'd report the problem to the iTunes Store.
    Log in to the Store. Click on "Account" in your Quick Links. When you're in your Account information screen, go down to Purchase History and click "See all".
    Find the item that is not playing properly. If you can't see "Report a Problem" next to the item, click the "Report a problem" button. Now click the "Report a Problem" link next to the item.

  • HT203167 A movie I purchased in the iTunes store is missing. It isn't hidden and doesn't show up in search. I've followed support steps.  Where is it and how do I find it?  I believe I originally purchased the film on my 1st Gen AppleTV.

    A movie I purchased in the iTunes store is missing. It isn't hidden and doesn't show up in search. I've followed support steps.  Where is it and how do I find it?  I believe I originally purchased the film on my 1st Gen AppleTV...other movies show up. Help.

    It was Love Actually. It's been in my library a few years but is now missing. It's odd...it isn't even in the iTunes Store anymore. I think there is a rights issue because a message appeared in the store saying it wasn't available at this time in the U. S. store. Still, if I bought it years ago it should be in my library or I should get a refund....

  • Movie rentals that I downloaded onto iMac with Lion to do not show up on ATV 2 in menu for computers.  Purchased movies show up just fine.  What to do or look for?

    I have an imac that is running lion and an Apple TV generation 2.  I have rented a movie from itunes and it shows up on my imac in Itunes under a rental icon, and will play fine on my computer.  However, it does not show up as choice to play on my apple tv.  I have homesharing enabled and everything else works fine including purchased movies that are on my imac, but no where does it show rental movies. 
    What do I look for?  What do I do to play the rental movie on my apple tv 2?

    Answer to my own question:
    Wait until the downloaded rental has completed its download to the imac.  This took a long time for me, since it was part of several things that I was downloading at the same time.
    Finally, it showed up on my apple tv.   Interestingly, I was able to watch much of the movie on my iMac before the movie finished its download and was available to the ATV 2.

  • HT1657 I rented a movie from iTunes but it is not showing up in the Movies section. What do I do?

    I just rented and downloaded a movie from iTunes and now it will not show up in my iTunes library. What do I do?
    It DOES show up in iTunes on my iPhone. It DOES NOT show up on my desktop.
    Any thoughts? Ideas?
    I rented it for a flight I get on in 3 hours. Any quick help would be great.
    Thanks.

    If the computer iTunes is signed into the same account then contact iTunes:
    How to report/refund an issue with your iTunes Store, App Store, Mac App Store, or iBooks Store purchase

  • Movies from iMac 27 do not show up on macbook air

    I have 24 home-made movie that show up on my main computer, iMac 27, two iPads and and iPhone5. However, I am baffled how to get the same movies to show up on my Macbook Air. I've tried Sharing the Library, turning Sharing off and on on both compueters, and many other obvious possibilities. This is baffling me. Has anyone else had the same situation and a solution to go with it?
    Thank you,
    Steve Roesler

    Hello, Steve. 
    Thank you for visiting Apple Support Communities. 
    I would need a little more information on this issue to provide a better answer.  Are these movies in your iTunes library?  If not see the steps in the first article below.  Some imported movies do show as Home Videos when imported.  If these are in your iTunes library, see the troubleshooting steps in the second article below. 
    Adding music and other content to iTunes
    http://support.apple.com/kb/ht1473
    Troubleshooting Home Sharing
    http://support.apple.com/kb/ts2972
    Cheers,
    Jason H. 

  • Movies I have purchased through Itunes show up on my computer, but do not show up on Apple TV

    Latley I have notices that movies in my Itunes library are "missing" from my apple TV's.  I have checked under get info "type", checked show in windows explorer, but certain movies just are not in the purchased catagory on the apple tv.

    Sign out of the Apple ID on the ATV and sign back in.
    Honestly not sure why it matters, if they are on the computer, play them via the Computers option on the ATV to avoid streaming them over the Internet.

  • Movies do not show up on AppleTV but they are in iTunes

    I have around 220 movies in iTunes.  Most all were purchased through Apple.  I am having an issue where several of my movies are not showing up on my Apple TV.  The movies that do not show up were all purchased and watched on my Apple TV but once it synced to my iTunes library they no longer show up.. I have reset and restored everything including my entire iTunes library, took almost an entire day, but still have the same issue.  My apple TV is a 1st gen. The ones that do not show up are a mix between HD and SD so that is not the issue.  The only common thread between these movies is that they were all purchased and watched initially through my apple TV. HELP please!

    As far as the resolution, I do not have the exact info but they were all purchased through iTunes via my AppleTV.
    Examples:
    - Journey to the Center of the Earth HD and SD
    - Tranformers HD and SD
    - Journey 2: The Mysterious Island SD
    - Sherlock Holmes SD
    Thats just a few of the movies that do not show up on my AppleTV but are in iTunes and can be played on my Laptop or synced to my iPad, iPod, iPhone and iTouch.
    I have tried syncing these movies to my AppleTV and it shows syncing but completes way too quickly and the movies are not on my AppleTV.  When I look at my AppleTV via iTunes the movies are checked off so as to sync.  No exclamation point or any error for that matter ever occurs.

  • Movies in my iMac's iTunes do not show up Apple TV(1st Gen)

    So frustrated. Movies in my iMac's iTunes do not show up on my Apple TV(1st Gen) in the Shared Movie area. I've done the Media Type fix to "movie." I've re-started and re-booted and changed the Apple TV from ethernet to wireless and re-connected iTunes. Renamed the library. Everything's up to date. Grrr.

    I have now restored Factory Settings on the Apple TV. Looked promising until iTunes hangs everytime I tried to enter the podcast page of the sync options. And I get errors that my newest movies, created in Final Cut Pro X with the Share with 720p Apple Devices export settings are not compatible with Apple TV.
    Unbelievable.

  • I bought a movie from iTunes on my Mac and it is not showing up on my AppleTV purchased movies.  Is there a way to get this to sync?

    I bought a movie from iTunes on my new macbook pro and it is not showing up on my AppleTV, any ideas?

    Sign out of the Apple ID on the ATV and sign back in.

Maybe you are looking for

  • How to read the RD Connect Broker DataBase!!!!

    The msdn say there is a RD Connect Broker Data Base , it store the session information,but i dont know where is it and how to read it ! Thank you !!!!

  • AD Preparation Scripts for R12

    Hi, We are upgrading our 11.5.10.2 applications to R12.1.3. As part of the upgrade document, it says to run adgncons.sql & adcrtbsp.sql. As we are already on OATM, I believe this is not applicable for our case, please confirm? Thanks

  • SEUS update service problem

    Hi all, I have an Xperia X10 on vodafone australia. vodafone only recently released the updates for the x10, so i ran the update service. Only problem is, the update service doesn't work. I make it to the screen where SEUS has confirmed that my phone

  • Loading a Flash 8 swf that loads another Flash 8 swf

    I'm trying to get a Flex swfloader component to load a Flash 8 swf file at runtime, this works fine although the swf file... main.swf loads other swf files into levels e.g. main.swf contains: loadmovienum("menubar.swf",2); Everything works as expecte

  • Unable to print from Illustrator or InDesign (CS2)

    I havent installed CS3 yet, but will when able. For now, I need CS2 to function. First in Acrobat, then InDesign, and now in Illustrator, if I go to print (either File > Print or my using keyboard shortcut), the program just hangs indefinitely. The o