Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Rotating Objects



i want to make a movie that has two spheres, on rotating around another. like an electron and nucleus effect. i want the spheres to have shadows and shading too...how do i get one to rotate around the other?



FlashKit > Flash Help > Flash MX
Posted on: 09-13-2002, 09:18 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Rotating Objects
Hello all!! Here I am again asking for help!

I used to do this in Flash 4 but now I just can´t do it with Flash 5...

I want an object to rotate over itself while making a certain movement on the screen... What happens is that the object doesn´t rotate over it self, it just rotates in a wide circular movement going completely out of screen in some sections of the circle... In Flash 4 I would just select the object, choose "rotate" and I would put it where I wanted the way I wanted...

Ok, any help is appreciated

Rotating Objects
I have some clue what I am doing in flash, but when it comes to actionscripting, I am a complete newb. I need to know if there would be actionscript involved in creating continuously rotating objects. In addition, if anyone has any recommendations for learning actionscripting, I would greatly appreciate it.

Rotating Objects
How do you make an object rotate in a perfect circle :: everything time I make a rotating object :: its rotation is off a little bit :: help!!!!!!

Rotating Objects With AS2
Hello All..

Does anybody knows how to rotate/sping an object using ActionScript???

Thanks
Halanis

Rotating Objects
Hiya,
I am trying to rotate a grphic, or mc, for example. I would like the center of the rotation to be the vanishing point of the mc I'm working in.

Easentially, I'm creating orbiting text. I create a circle as a guide, using the vanishign poi9nt as the center. Creat the text, break it into shapes and arrange it so it matches the curve of the circle. I then delete teh circle and turn the text shapes into a graphic. Then rotate it.

What's happening tho, is that the graphic is rotating on ti's own center point. Can't seem to figure out how to change this, any suggestions? Thanks

Sphere And Rotating Objects
I'm a little weary about posting this question because I'm such a noob when it comes to Flash and I figure this has been asked before or it's so easy to do that no one will respond this question....but here I go anyway.....

I have an animation of an angel that rotates 360 degrees around a sphere (like the earth orbiting the sun). I created this animation in Flash MX first, but it didn't have enough 3D dept for my taste, so I created the animation in Swift 3D v2. Well I have the angel doing exactly what I want it do in flash (360 rotation with 3D dept) and it looks pretty good. Now here's the problem:

- What I'm actually trying to achive is having 9 angels rotate around the sphere in a 360 degree rotation with a constant loop effect. It would look something like the animated "Universal Picture" logo you see at the movies where the "Universal Picutre" text wraps and the globe and constantly rotates around it.

I have tried everything I can possible think of to achieve this effect, but I just can't seem to pull it off correctly. I can only assume this effect can be pulled off easily with action script, but I have no idea how to do it. I don't mind emailing what I've done (fla or swf) to anyone who can help me out.

Tips, advice, please help!!!

3d Objects/rotating/spinning
I have been messing around with getting a simple square and make rotate so it looks like a 3d square. I have not really been successful in this area however, and I am looking for input or maybe some tricks to doing 3d rotations

Problem With Rotating Objects
Hello.
I have a problem with managing my objects in this quite lenghty animation. It involves fixed graphics but I suspect it can be solved only with actionscript. As english is rather difficult for me I made a drawing about the issue for avoiding complicated descriptions I could easily mess up with.
Can anyone have an idea how to solve this:
http://ottkosmoses.tsoon.com/probleemjoonis.jpg

Placing Objects On A Rotating MC
This is my problem
I have 2 buttons.
I have one MC that i Rotate.

I sould lite to place one button on the top left corner of the MC and place 2nd button at the left side top corner of the MC.

The buttons do not abear unleas i roll over the MC. so the buttons have stay right next to the MC.

The thing is that the buttons move when it rotates.

Is ther a way around this problem?


Thanks

MadWilson

Animate Rotating Objects In 3D
Hi there,

I've been working in Flash for about half a year now and consider my experience level to be about intermediate. I got really excited about the Flash CS4 support for native 3D. I just opened me up to a whole new world.

So I learned how to use Matrix3D. I figured out how to conduct a basic rotation on an object:

home.transform.matrix3D.appendRotation(90, Vector3D.Y_AXIS);

Works awesome. I'm now trying to animate a fluid motion so that it starts at 0 and moves to 90. I've worked in PaperVision3D, which I remember using Tweener to adjust the property of the mcs directly. However I'm not sure where to start to animate in Flash 3D.

I've attached my very newbish attempt to do so. Perhaps there is another option, like a built in tween function I SHOULD be using?

If I figure this out, I think I can do some pretty cool stuff!

Thanks in advance!







Attach Code

import flash.geom.*;

home.z = 1;
function rotateThis() {
var count = 0;
trace("rotate");
for (var i = 0; i < 1500; i++) {
count++;
if (count > 90) {
count = 0;
}
home.transform.matrix3D.appendRotation(count, Vector3D.Y_AXIS);
trace("rotate");
}
}
rotateThis();
setInterval(rotateThis, 2000);

Animate Rotating Objects In 3D
Hi there,

I've been working in Flash for about half a year now and consider my experience level to be about intermediate. I got really excited about the Flash CS4 support for native 3D. I just opened me up to a whole new world.

So I learned how to use Matrix3D. I figured out how to conduct a basic rotation on an object:

home.transform.matrix3D.appendRotation(90, Vector3D.Y_AXIS);

Works awesome. I'm now trying to animate a fluid motion so that it starts at 0 and moves to 90. I've worked in PaperVision3D, which I remember using Tweener to adjust the property of the mcs directly. However I'm not sure where to start to animate in Flash 3D.


Code:

import flash.geom.*;

home.z = 1;
function rotateThis() {
var count = 0;
trace("rotate");
for (var i = 0; i < 1500; i++) {
count++;
if (count > 90) {
count = 0;
}
home.transform.matrix3D.appendRotation(count, Vector3D.Y_AXIS);
trace("rotate");
}
}
rotateThis();
setInterval(rotateThis, 2000);

Above is my very newbish attempt to do so. Perhaps there is another option, like a built in tween function I SHOULD be using?

I'm digging for information now doing 3D tweens in AS, but I'm not coming up with much. Help would be greatly appreciated.

If I figure this out, I think I can do some pretty cool stuff!

Thanks in advance!

Placing And Rotating Objects Around A Circle
I am looking to make a calander of sorts, but it will be in a circle.
Scattered along the edge of the circle would be lines, representing an event that occurs sometime in the year (ie birthday, christmas, etc.), each pointing out wards from the center. I've no real clue how to go about setting the points in corrispondance with their place in the year or to make them face the center, and any help would be appreciated.

Rotating Objects And Effecting With Mouse
ok.
I have a page that has four instances of a sentence written in a circle. Each one going toward the center is smaller than the first (Sort of creating a tunnel with words).
First off, I want them to rotate in different directions when the movie loads.

Then when the user mouses over them I want to cause them to slow down and follow the mouse (Kind of like a friction effect) as the user makes their way to the center where there's a button.

How can I achieve the rotation and the mouse actions?

Rotating Objects On Button Press.
Not sure whether this should go in ActionScript forum or not, but anyway...

What I'm trying to do is make a 3D navigation menu like the one over at www.echoprojects.com, where you click on a graphic and the menu spins horizontally so the graphic is at the front. Then you can click again to be taken to the corresponding page.

The echoprojects one is draggable but I'm not really bothered about that lol. Also I was wondering how to incorperate easing into all of this - is it just


Code:
import mx.transitions.Tween;
import mx.transitions.easing.*;
var xt:Tween = new Tween(square, "_x", Strong.easeOut, x, y, time, false);
as usual with funny x and y positions, or something completely different?

So basically I'm trying to make a set of objects move to a certain place when 1 object is clicked, with easing lol.

Thanks in advance,

esurio

Detecting Mouse Movement/creating 360 Degree Rotating Objects
Hello, I have created a 360 degree image rotator in flash using AS3 but i am having a few problems getting it to function exactly how i want.

I have basically copied most of the functionality of the 360 rotator on the Dune shoe website - http://www.dune.co.uk/catalogue/styl...08MLE00MSS026L.

My effort is - http://www.fianium.com/temp/360/

The code behind the scenes is pretty simple. It takes an xml with the paths to all of the frames in the rotation, preloads them, does a little twirl to show the user that you can spin the product and then activates the MouseEvent listener and rotates the shoe based on where the mouse is. It also animates the shoe rotation if you mouse out at a particular point and then mouse back in at a different one. This is to avoid the ugly 'jump' in frames.

Here is the code that handles the mouse detection/image rotation/animation:


ActionScript Code:
function CheckDirection(e:MouseEvent):void {
   
    prevX = curX;
    curX = Math.floor(stage.mouseX/(stage.width/17) ) ;
   
    if ( curX == 16 ) {
        curX = 0;
    }

    if ( ( Math.abs(curX - prevX) > 3 ) && ( Math.abs(curX - prevX) < 15 ) ) {
        ImgRotate(curX, prevX);
    } else {
        ShowImage(curX);
    }

}

function ShowImage(curPosition:int):void {
   
    container.getChildAt(curPosition).alpha = 1;
   
    for (i = 15; i >= 0; i--) {
        if ( curPosition != i ) {
            container.getChildAt(i).alpha = 0;
        }
    }
   
}

function ImgRotate(curX:int, prevX:int):void {

    j = prevX;
   
    var duration = Math.abs(curX - prevX);
   
    stage.removeEventListener(MouseEvent.MOUSE_MOVE, CheckDirection);

    var animTimer = new Timer(5, duration);
    animTimer.addEventListener(TimerEvent.TIMER, AnimRotate);
    animTimer.addEventListener(TimerEvent.TIMER_COMPLETE, FreeRotate);
    animTimer.start();
   
}

function AnimRotate(event:TimerEvent):void {
   
    if ( curX > prevX ) {
       
        if ( j == 16 ) {
            j = 0;
        }
       
        j++;
       
    } else {

        if (j < 0) {
            j = 15;
        }
       
        j--;
    }
   
    ShowImage(j);
   
}

The main difference between my effort and the dune one is their behaviour at fast mouse 'speeds'. Waving your mousecursor over the dune rotator just results in a shoe the moves about quite fast. It's important to note that the dune rotator also has some animation to show the inbetween frames if you mouse out and in at different locations. Also, the dune creation has 23 frames (i think) whereas mine only has 15.

When the mouse is moved quickly over mine, it goes a bit crazy due to the inbetween animations and because it is unable to register where the mouse has been at times.

Is there a way to increase flash's 'sampling rate' of the cursor position and if not, what can i do to make my rotator behave more like the dune one?

Thanks in advance!

Rotating Boxes-non-rotating Box/text
i have a rotating menu(boxes in circular motion). when a box is rolled over, all stop, but the text box that should appear in the middle between them, is not appearing where it should. it seems to be following the animation of its parent box.....any ideas?

jas

Moon Rotating Around Rotating Earth
I've got my earth revolving around the sun. I can't get the moon to revolve around the earth while it is revolving around the sun. Has anyone done this before, or is willing to help out?

Thanks

Rotating Menu With Non-Rotating Labels
I have a rotating menu that sets the selected button to the 3:00 position once clicked. I need the labels for the buttons to stay in the upright position as they rotate with the button. I have attached an image the help explain what I am trying to do. Anyone know of an action script that would keep the labels upright?

Store And Retrieve Array Of Custom Class Objects From Shared Objects.
Hi,

I am stuck up with a problem in ActionScript 2. I am using Flash MX 2004 on windows XP.

I have created 3 custom classes say Parent, Child, and GrandChild. Parent class contains in it an array of its Child objects. Similarly each Child object contains in it an array of GrandChild objects. Also I do have one global array of all the Parent objects.

I want to store this array to the shared objects on specific events(say exiting the session) and then reload them from the shared object(on next session startup). I am able to store the global array to the shared object but when I try to retrieve the same array from shared object, I could not do it. The retrieved array is not of my custom class type [Parent].

Help needed to solve this problem urgently. Does anybody have idea how to do it??

Thanks in advance.



Cheers,
Naishadh Sevalia

Objects Talking To Objects, Parent/child Communication, Scope
I've been using AS3 at an intermediate level, and am getting deeper
into classes. I'm loving classes! I'm just cloudy on a few general
concepts.

It's easy for me to create a child object from a parent object, like a
ship in space for example (not working with ships right now but seems
fun to talk about). I can then navigate the ship from the parent
object.

What happens if the ship's engine temperature reaches critical? Is it
wise to dispatch a ship event that tells space that my ship is nearly
scrap? Or do I periodically query the temperature amount of the ship
from space? To me an event sounds like the solution, but I remember
hearing somewhere that parent objects should only talk to child
objects, not the other way around. Is this true?

Could I trouble someone for a basic example of how you would make this
communication work best?

Thanks for the assist. I'll post if I find anything interesting in
the meantime.

How Do I Reference Objects Inside Of Exported Library Objects ?
Hi,

I am having trouble figuring out what seems to be a simple fix? I have created a movieClip in Flash that contains 3 button clips. I want all to be accessible to actionscript, so I gave the movieClip and the 3 buttons a Linkage Identifier. I deleted them from the stage.

In actionscript, I have instantiated the movieClip and, thankfully, the buttons inside went along.

The trouble I'm having is figuring out how to target those buttons. Since they're on the stage already, I shouldn't have to create a new instance right? When I trace the buttons I get an undefined return in the out put.

Anybody know this one??

Thanks for the help!

Brian

Depth And Dynamic Objects/Attaching Scripts To Objects
I am having some problems with my Flash MMORPG created in Actionscript 3.0 that I am working on, not really errors, but more how to do something, in theory. I have 2 problems. First, my game is at a 45 degree angle, so it requires some depth handling(like one object is over another object when it should be behind that object). I am not sure how to go about this. I was thinking that each object's depth should be it's y position if it's origin was at it's feet. But that idea didn't go well, because the depth is limited by the number of children. What is the average way to do this? Next, I am trying to make dynamic objects, so that all I would do is copy and paste an object, or create a new class of it and it would work. What I mean is, the character checks a collision for each object, but if I copy the object with the same name, it doesn't work. In AS3 you can't attach scripts to objects anymore, so I am running into a lot of problems with that. How would I go about fixing this? Thank you in advance.

Aligning Variable Sized Objects And Objects Inside Them
Hi,

How do I align a movieclip, which width and height is user-defined, inside another object (this one is static, though). Top-left alignment is easy, x=0 and y=0, but what about center, center left, bottom left, etc? Math(.round) i suppose, but how?

and

I want an object (static) inside the movieclip (user-defined) to stay aligned to, for instance, the top right corner, similiar to the minimize, maximize and close buttons at the top right of your browser..

The height and width data is pre-defined by the user in another file... But that does probably not make any difference...



If anyone could help me with this, I'd appreciate it alot!

Thanks!,
Peter

Best Way To Hide On Stage Objects When Other Objects Need To Be Shown?
A typical nubee question..What is the best way to hide objects on sage when a button from navigation is clicked and in response other information or objects need to be shown instead of the one previously on stage?

How To Output Both AS Objects And Drawn Objects On Pages?
Using Flash 8;

Hello,

I am building a site entirely in actionscript and the "shell" of the site, the pages, text, static images, come up and work fine, no problems.

However, I'm having troubles trying to implement Kirupa's "XML_Flash Photo Gallery", for one of my pages, link here:

http://www.kirupa.com/developer/mx20...otogallery.htm.

I'm running into troubles because my pages are entirely actionscript and this tutorial uses objects which were drawn by the drawing tool.

I have been trying to get both actionscript and drawn objects to work together and cannot get it right!!

Questions:

1) In terms of layering or frames, What is the best way to output on your pages both "objects drawn by the Flash drawing tools" and "actionscript objects"?

Is this better handled using frames or layers? Should I place my actionscript on the first few frames, then my "drawn objects" on the later frames? Or use layers and have my AS code above or below the manually drawn objects?

For example:

I have my actionscript on layer 1. Then use drawing tools to draw a box on layer 2.

When published, I want the "manually drawn box" and "the actionscript drawn objects" to both be viewable on the pages. Do I place the "drawn" layer above or below the

actionscript layer? Or should this be handled by frames?

I have tried both and neither seem to work for me. When I do one or the other, it works, meaning, all drawn objects, obviously things are viewable, then if

I use all actionscript, things are viewable, but when I try to combine both, the manually drawn objects do not show up.

The actionscript objects show up correctly, but I cannot see the objects I have directly drawn on-stage.

In my actionscript, I use, "_root.getNextHighestLevel()", for each of the objects, this works fine for all the actionscript objects. However, I did nothing

for the objects drawn using the tools, should I attach the same "_root.getNextHighestLevel()" to those objects drawn on-stage?


Or,


2) Should I try to draw Kirupa's objects on my pages using actionscript?

Thanks, any help is great!!

Dave.

Help: Stage Objects Get In Front Of Script Objects?
This is getting me mad...

addChild(my_script_object);

I can't see it...

If I try trace(numChildren) I get 10, so then I try addChildAt(my_script_object,9) and still cant' see it.

If I delete all the objects in stage then I finally see it.... If I delete one by one I find my_script_objects gets beneath a bitmap placed by hand by the designer.

Any ideas?

TIA

Best Way To Hide On Stage Objects When Other Objects Need To Be Shown?
A typical nubee question..What is the best way to hide objects on sage when a button from navigation is clicked and in response other information or objects need to be shown instead of the one previously on stage?

About Referencing Objects And Copying Objects
This is for AS1

hi,

i should know this but i got lost for a bit, can someone make this clear:

i have the following:

code: myobject=new Object()
myobject.var="hello"
getvar=myobject.var

In this case, get var has a reference for myobject.var, or it has just copied de value? mean if i update myobject.var to "good bye" get vatr will be that, too, or will stay as "hello".

If it's just a reference, how can make it a different variable, i mean, assign the value of myobject.var to getvar and loose any relationship between myobject.var and getvar, so if i update one, the other doesn't.

Anyone?

Problem With Class Objects Within Objects
Hi There,
I am having trouble creating an oop grid.
My initial object is "world" shown below which will contain an array of "Row" objects, which in turn contains an array of tile objects.
As i build up the rows and assign the tiles everything seems fine but when i try to retrieve the values the tiles in each row returns the same values from each tile..


class world{

//declare class members
private var goalScore
private var mapPreview
private var title
private var editor
private var createdBy
private var movieBorder
private var instructions
private var rows = new Array()

//Constructor
public function world(Param_goalScore, Param_mapPreview, Param_title, Param_editor, Param_createdBy, Param_movieBorder, Param_instructions){
this.goalScore = Param_goalScore
this.mapPreview = Param_mapPreview
this.title = Param_title
this.editor= Param_editor
this.createdBy= Param_createdBy
this.movieBorder= Param_movieBorder
this.instructions= Param_instructions
}

//Methods
public function createRow(){
if (rows==null){
this.rows[0] = new row()
}else{
this.rows[rows.length] = new row()
}
return this.rows[rows.length-1]
}

}
class row{

//declare class members
public var tiles = new Array()


//Constructor
public function row(){

}

//Methods
function createTile(Param_tileType, Param_completionScore, Param_objectType){
if (tiles==null){
trace("created first tile")
this.tiles[0] = new tile(Param_tileType, Param_completionScore, Param_objectType)
}else{
trace("created tile " + tiles.length +" tiles="+tiles)
this.tiles[this.tiles.length] = new tile(Param_tileType, Param_completionScore, Param_objectType)
}
return this.tiles[this.tiles.length-1]
}

}

class tile{

// declare class members
public var tileType;
public var completionScore;
public var objectType;
public var character;


// Constructor
public function tile(Param_tileType, Param_completionScore, Param_objectType){

tileType = Param_tileType;
completionScore = Param_completionScore;
objectType = Param_objectType;

//movementPreset = Param_movementPreset

//error = Param_error
//errorImage = Param_errorImage

}

// Methods

}

Any advice will be greatly received.

Jason

Mask Objects And Masked Objects
Well.. I don't know if there is already a thread on this subject, but I have this doubt, and I would really like some support.

Been trying to use one mask object to mask several movies, but it doesn't seems to work. Has anyone ever managed to do this?

For example:

Let's say I have three MC - man, woman and baby are their names - and I want to use setMask to mask then so they walk behind the walls of a house, but just show up through the window. I create, then, a mask object - one object with the shape of the window inside it - named it windowMask, put it in _root and added to my actions layer the following lines:

Code:
man.setMask(_root.windowMask);
woman.setMask(_root.windowMask);
baby.setMask(_root.windowMask);
Unfortunately, only the last of them - baby in this case - is masked.

Can't I use one mask object to mask multiple MCs?

Everything works fine if I duplicate the mask MC and set each copy as a mask for each of them.

Code:
man.setMask(_root.windowMask);
woman.setMask(_root.windowMask1);
baby.setMask(_root.windowMask2);
The thing is, what I wrote above is just an example. The real movie has 30 to 40 MC which should be masked by the same mask object and I don't want to have 30 to 40 mask objects dangling around my movie...

Mask Objects And Masked Objects
Well.. I don't know if there is already a thread on this subject, but I have this doubt, and I would really like some support.

Been trying to use one mask object to mask several movies, but it doesn't seems to work. Has anyone ever managed to do this?

For example:

Let's say I have three MC - man, woman and baby are their names - and I want to use setMask to mask then so they walk behind the walls of a house, but just show up through the window. I create, then, a mask object - one object with the shape of the window inside it - named it windowMask, put it in _root and added to my actions layer the following lines:

Code:
man.setMask(_root.windowMask);
woman.setMask(_root.windowMask);
baby.setMask(_root.windowMask);
Unfortunately, only the last of them - baby in this case - is masked.

Can't I use one mask object to mask multiple MCs?

Everything works fine if I duplicate the mask MC and set each copy as a mask for each of them.

Code:
man.setMask(_root.windowMask);
woman.setMask(_root.windowMask1);
baby.setMask(_root.windowMask2);
The thing is, what I wrote above is just an example. The real movie has 30 to 40 MC which should be masked by the same mask object and I don't want to have 30 to 40 mask objects dangling around my movie...

Making Objects Go Behind And In Front Other Objects
Say I wanted to tween something so that it like rotates around it.
IE: a moon rotating around a planet, an electron orbiting a nucleus

How would I make the orbiting object go in front and behind the stationary object?

AS3: XObject Class - Treat Objects Like XML (E4X4O - "E4X For Objects")
I just finished this a few minutes ago (coincidentally while at a SilverLight camp ). Its an AS3 Object that allows you to add "elements" in the form of objects much like you would with XML using E4X. By assigning values to an XObject, you are adding that value into its "node" structure as one of its children with the given name. Retrieving a property, instead of returning a value, returns an instance of XObjectList which is essentially a list of objects (like XMLList) that are defined to that property. As with XML, there is a separation of elements and attributes using the @ character to precede references. Without @ you access a child, with, you are accessing a property or attribute of that particular XObject or whatever object defined inside it. Setting an attribute of an XObjectList, assigns the value to that property of all the objects in the list.

Its a little hard to explain. Its better to just see some examples.


ActionScript Code:
var rootNode:XObject = new XObject();rootNode.one = new Object();rootNode.two = new Array();rootNode.two = 20;rootNode.two[1].deep = "Hello XObject";rootNode.@three = "attribute";trace(rootNode);/* output:<XObject three="attribute">    <Object:one />    <Array:two />    <int:two>        20        <String:deep>            Hello XObject        </String:deep>    </int:two></XObject>*/



ActionScript Code:
var rootNode:XObject = new XObject();rootNode.a = 1;rootNode.a = 2;rootNode.a = 3;delete rootNode.a[1];trace(rootNode);/* output:<XObject>    <int:a>        1    </int:a>    <int:a>        3    </int:a></XObject>*/



ActionScript Code:
var myMcs:XObject = new XObject();myMcs.badGuys = enemy1_mc; // movie clips on the screen...myMcs.badGuys = enemy2_mc;myMcs.badGuys = enemy3_mc;myMcs.badGuys.@x = 100; // all enemy mc's move to x = 100  


It's pretty much done, but there might still be some problems, so if anyone finds any, just say so. I'm not sure how many more methods I might want to add in addition to what's there now (to match XML) though I think I want to keep it as simple as possible, so probably not much more, if any, than what's already there. To see what's there now, you'd just have to check out the classes - its not much.

Treating Objects Like Objects....
Hey, I need a primer on how objects should be worked with in actionscript. I'm trying to pass along objects between functions like variables, which isn't working at all. Do I need to make a prototype function for each part of the object I want to manipulate? Do I need a reference movie clip in the library for any of it to work at all?

Basically, I'm trying to make do dynamic movie clip creation (each individually with special parameters) which will basically make different sized squares, then reference them later, by id, and still be able to get those parameters out of the mc. Anyone know what I'm getting at? Yea, it's for a game.

Basically, I'm need to have movie clips with information attached, and I need to be able to dynamically create them.

I feel like I've advanced from actionscript n00b to merely inept. Some help plz.... thanks in advance

GF

Objects Affecting Other Objects
I'm using flash MX, and i'm wondering how to make a Circle affect another one when it grows...

for example...

Lets say I have 2 circles next to each other... When I rollover a circle... I want it to grow... and when I roll off it... I want it to go back to normal size...

However, I want the Circle right next to it to move up or down... so when the circle grows... it doesn't cover the other circle...

I'm all outta idea on how to make this work right... Actionscript confuses me... but whenever I see it explained in a tutorial... I understand it...

If someone can point me in the direction of a tutorial... or is really good at explaining how to do things... I would appreciate the help

thanks

- Mikey

Blurring Objects OVER Objects
Hi
Ive seen animations where people actually have BLURRED frames IN ANIMATION ontop of other pictures [or other animations].. WITHOUT getting the white borders that your burdened with from the BITMAPS.

is there any program that you can do this with?
I dont want a reply that simply says "PHOTOSHOP" id like to know HOW in the program you do this.. I know there is the "soften edges" tool built right into flash. But this tool vastly slows down the animation PLUS: you cant "soften edges" with the pencil tool..

Thanks
-Lindsay

Accessing Objects Within Objects
Hey there,

What I'm trying to do is somehow assign the same class to a large number of movieclips within another movieclip. The nested mcs are already on stage in the positions that they need to be in. I need to go through all of the 200+ nested mcs and apply the same actions to them.

In AS2.0, I would loop through and do something like this...


Code:
for(var i in someObject){
if(typeof someObject[i] == "movieclip"){
someObject[i] = new objectClass();
}
}

What's an equivalent way of going about this? Any ideas?

Pushing Objects With Objects
I was wondering, how would I go about utilizing the drag script to cause the object I am currently dragging to push other objects. I know it has to do something with boundary lines, but I'm not sure. If you know how, or know where I can learn how, please do not hesitate.

(This thread was re-created (and the old one was deleted), since I hate double posting.)

Using XML Objects As References To Other XML Objects
Hello,

I'm trying to modify XML nodes in a XML list by reference,
in AS3, but for some reason Flash seems to be copying the node
value to it.

I need to change the reference so as to mimic a C/C++ pointer like behaviour.

This works with most flash objects I have tested, but not with the XML object.

Here's some code:

The below works:

var nodeList:XMLList= xmlObject.children();
nodeList[0] = <change>test</change>

Tracing the xmlObject, the value in nodeList[0] appropriately changes in the xmlObject variable


But what I want to do is this:

var nodeList:XMLList= xmlObject.children();
var myXMLNode:XML = nodeList[0];

myXMLNode = <change>test</change>

Tracing xmlObject, there seems to be no change to the object, however, the change is applied to the local variable myXMLNode

This works with other objects in flash like TextField, but does not work with the XML object.
Is there any known workaround or am I doing something wrong?

Thanks in advance

PHPObject, Objects Within Objects?
Hi guys,

I've built a php site already, but would like to add a flash component to it using the already established (or maybe slightly altered) php classes. The problem I'm finding is when I try to initialize an object that has another object within it. Example:

PHP Code:



class Test0 {

 function Test0() {
  //code
 }

}

class Test1 {

 function Test1() {
  $this->obj= new Test0();
 }






Now, when I try to create the object using PHPObject in flash, it results in a Connection Failure error. Everything up to an equivalent "$this->obj= new Test0();" line in my classes works fine. So I know its this object within an object idea. It seems like its trying to connect to the Gatway.php file again once it hits the nested Object. Does anyone know if this is possible in PHPObject? Any suggestions about how to work around it?

Thanks.

Selecting Objects Behind Objects
hey, in my movie i have MC1 on the root timeline and MC2 loads on top of MC1 however, i am able to mouse over buttons behind MC2? how can i stop this happening?

Sound Objects - How-to Preload Multiple Sound Objects
Im basically making a site for a sound engineer friend of mine, and like Im trying to make a music interface for his site, thats able to preload tracks, and play & load those multiple mp3 tracks dynamically (mp3s are in the same folder). Or the setup could be like multiple sound objects that have their own progress bar etc for loading kinda like the will-musser example. Im up for any suggestions as the MM docs dont help in this area very much

A good example of this would be @t http://www.willmusser.com. I under-stand how-to create and use 1 sound object for example, but when i try and use 2 sound objects etc, for 1 dynamic textfield named "progress", heres the coding to call-upon a sound object, which is basically 1 mp3 thats getting loaded, and shows progress in percentage via that dyamic textfield. What Im wondering, is if anyone knows of the AS for the btns to load tracks ie: on (release), load mp3"blaghla.mp3" ? if anyone knows the coding to load mp3s, feel free to leave a reply ;p And any good ways of calling upon multiple sound objects at once seperate dynamic textifelds or progress bars for loading etc.


PHP Code:




sound_1 = new Sound();
sound_1.loadSound("http://themakers.com/sounds/atmospheres_1.mp3", true);
function checkLoad(){
    var percentLoaded = (sound_1.getBytesLoaded()/sound_1.getBytesTotal())*100;
    progress.text = Math.round(percentLoaded)
    message.text = "MEK - Far From Home";
    
}
checkProgress = setInterval(checkLoad, 1000);

Rotating Mc
hi, anyone knows hows how to rotate a mc in circle using an action script instead of keyframing.

Thanx Giano

Rotating
I want to rotate a basic line, not from the centre but from one end, using the mouse_drag.
I want the line to move only within a certain range of angle.
does anyone know of how this is done or can anyone direct me to a tutorial for this.

Rotating
i found a web site sunday night that had an image of a plane or somethin cant excatly remeber what it was, but there were 3-4 of the same image. it would rotate in a circular motion til the next one was in front. couldnt find it tonight. does anyone know how to do that? i want to do some hearts the same way. please help. thanx

Rotating A MC
hi.

lets say i have a graphic of a box and i set the behavior as a movie clip and gave it an instance name of 'box'

and lets say i have a two buttons on the stage...

now my question is... what is the actionscript or how do i make it so button 1, when clicked, rotates the box 45 degrees clockwise each time its clicked and button 2 would make the box rotate counter clockwise 45 degress each time it is clicked?

Rotating A MC
hi.

lets say i have a graphic of a box and i set the behavior as a movie clip and gave it an instance name of 'box'

and lets say i have a two buttons on the stage...

now my question is... what is the actionscript or how do i make it so button 1, when clicked, rotates the box 45 degrees clockwise each time its clicked and button 2 would make the box rotate counter clockwise 45 degress each time it is clicked?

using flash 5

also.. how would i make a MC 'flip' horizontally or vertically when clicking a button?

Rotating
I have created a circle and I want it to continuously rotate. I have received many suggestions about what to include in the actionscript, but none of the suggestions have worked. I am a newbie when it comes to flash, but I am completely clueless when it comes to actionscripting. If someone could help me out I would greatly appreciate it.

The object is the outline of a circle. Here is the actionscript I have so far.

actions for the frame:
function rotate (circle) {
eval(circle).rotation += 2;
}


actions for object:
onClipEvent (enterFrame) {
_root.rotate(_parent);
}



the name of the instance is "circle"

Rotating JPG
I have been asked to create a rotating JPG image that pulls the filenames from a configuration file or that can pull the image filenames from a directory. This way, the images can be changed without updating the Flash file. Any suggestions?

Copyright © 2005-08 www.BigResource.com, All rights reserved