| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Registered User
Join Date: May 2001
Posts: 24
|
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. |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Nov 2000
Location: Australia
Posts: 8,612
|
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. |
|
|
|
|
|
|
|
|
#3 |
|
Registered User
Join Date: May 2001
Posts: 24
|
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 :\\ |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |