Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > General > Animation and Effects

Reply
 
Thread Tools Rate Thread Display Modes
Old 05-05-2001, 07:54 PM   #1
tranterra
Registered User
 
Join Date: May 2001
Posts: 24
Question

I read the "Actionscripted Movement" tutorial, d/led the .zip and was able to modify the actionscript so that it moved my object - white - to a random _x position.

It worked great for the first object, but when I tried to apply it to other objects, both the first object and the other objects moved in unison.

What do I need to change when I apply it to other objects so they move to different random places?

Here's my modified code as seen in the "controller" movie clip for my oject, white:
----------------------------------------
Frame 1:
loops = 0;
_root:target_x = random(300) + 25;
_root:xdiv = (_root:target_x-_root.white._x)/10;
----------------------------------------
Frame 2:
loops = loops+1;
_root.white._x = _root.white._x+_root:xdiv;
----------------------------------------
Frame 3:
loops = loops+1;
_root.white._x = _root.white._x+_root:xdiv;
if (loops < 10) {
gotoAndPlay (2);
} else {
gotoAndPlay (1);
}
----------------------------------------

Any help would be appreciated. Thanks.

//: tranterra :\\

P.S. if you want to see the messed up movie, just go to http://www.tranterra.com and click the "vr2" link at the bottom of the page. It sorta' blends in, so look close. Sorry for how bad the first page looks, I'm still working on it.
tranterra is offline   Reply With Quote
Old 05-06-2001, 09:19 AM   #2
Jesse
Administrator
 
Jesse's Avatar
 
Join Date: Nov 2000
Location: Australia
Posts: 8,612
Default

You have to make another controller for each extra object, not the best way, but the tutorial was only designed for one object, here's the source I posted for a similar question a while ago:

http://www.actionscripts.org/help/tranterra/

Cheers

Jesse
__________________
Cheers

Jesse Stratford
ActionScript.org Cofounder
Email: presented in this way to stop spam-bots: My email is composed of my first name (jesse) followed by my last name (stratford) followed by @ followed by actionscript.org

Please don't email or PM me Flash questions, that's what the Forums are for!

Please don't rely on me reading my PMs either. Email me about important stuff.
Jesse is offline   Reply With Quote
Old 05-06-2001, 04:09 PM   #3
tranterra
Registered User
 
Join Date: May 2001
Posts: 24
Cool Hey, Thanks.

That helped. I had made another controller, but I still couldn't get them to do what I needed them to. I have it figured out now.

Thanks again.

//: tranterra :\\
tranterra is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Random Images + Random Movement + Random Transparency morvak Animation and Effects 3 05-17-2004 12:55 PM
Random movement placed into mc stops working!!!??? kittenpoo ActionScript 1.0 (and below) 9 08-01-2003 02:06 PM
random movement from random point a to set point b Jeeek ActionScript 1.0 (and below) 0 07-23-2003 11:10 AM
random movement amjad Other Flash General Questions 1 06-30-2003 08:20 AM
random movement Jon Solmos ActionScript 1.0 (and below) 5 06-05-2002 08:07 PM


All times are GMT. The time now is 02:51 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.