attaching different mc's instances and making them revolve

  • roycevan
  • Born
  • Born
  • roycevan
  • Posts: 1
  • Loc: ghana

Post 3+ Months Ago

hi dudes,

i am a newby in the actionscript side of flash ,i started learning the language a few months ago and already i am working on a yearbook project. i have designed the interface already however the interface contains five ifferent symbols which will serve as options and my idea is to make these symbols revolve around something circularly or just rotate: like the planets revolving around the sun : and when either one of them is rollover it scales up and when pressed it goes to another frame. i hope you get my point?. iav been struggling with this for sometime now and i really need help urgently cos my submission date is almost due
thanks very much

this is the code i wrote but all it does is shows the symbols at the upper left corner of the screen

please help!
posX = Stage.width/2;
posY = Stage.height/2;

var c = attachMovie("CIRCLE","round",1);
var s = attachMovie("square","box",2);
var k = attachMovie("OVAL","ORANGE",3);
var j = attachMovie("PENTAGON","FIVE",4);
var games:Array = new Array();
games[0] = ["s"];
games[1] = ["k"];
games[2] = ["j"];
games[3] = ["c"];

boogy = games.length-1;
_global.sand = true;
this.onEnterFrame = function(){
mpos += ((_root._xmouse - posX)/100);
for(i= 0;i<boogy+1;i++){
fade = ((mpos +(360*(boogy+1)))*Math.PI)/180;
games[i]._x = posX+ (Math.cos(fade))*300;
games[i]._y = posY+ (Math.sin(fade))*50;
games[i]._xscale = 100 + (Math.cos(fade) * 50)
games[i]._yscale = 100 + (Math.cos(fade) * 50);
games[i].swapDepths(1000 + (Math.cos(fade) * 100));
sand = false;
games[i].onRollOver = function() {
sand = false;
games[i].onRollOut = function() {
sand = true;
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Posts: 1252
  • Loc: Ro

Post 3+ Months Ago

1) when you post code on this forum between [_code] and [_/code] (remove the _ from both tags)
2) the things you`re searching for is 3D maths ... you can find it on kirupa.
see the last post from this threadp

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 7 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum

© 1998-2017. Ozzu® is a registered trademark of Unmelted, LLC.