LOADING
Loading
Hi , welcome back.
LogoutLOGOUT
 
  Lost password?  
Hi
 




 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-09-2001, 05:06 PM
Bob Bob is offline
Registered User
 
Join Date: Feb 2001
Posts: 4
Rep Power: 0
Bob is on a distinguished road
Angry

Hello out there
I'm trying to get an MC to center itself on the y axis of the stage automatically from any where on the stage.
This is my script so far:
(please excuse its crudeness but I'm not in any way programming minded)

getProperty ( _root.box,_y );
if (getProperty (_root.box, _y)</:y_center) {
setProperty ("_root.box", _y, getProperty (_root.box, _y)+/:speed);
} else if (getProperty (_root.box, _y)>/:y_center) {
setProperty ("_root.box", _y, getProperty (_root.box, _y)-/:speed);
}

(where y_center = the stage height divided by 2)
This works fine untill I want the clip to stop dead at the center. In stead the clip will jiggle up and down on the center line
I've tried:
if (getProperty (_root.box, _y)=/:y_center)
goto and stop frame 1
(where frame 1 has a stop action) but this has no effect.
What am I doing wrong??
Cheers in advance.
Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
need help loading flv movie onto stage from button click james890 Flash 8 0 02-23-2008 05:25 PM
Flash MX 2004 : movie clip open from library or double click on stage lse123 Flash MX 2004 1 10-04-2006 10:53 AM
Changing the document stage size and centering existing content. jcscoles Newbies 3 11-02-2005 05:14 PM
Centering an FLV (to stage) on load? mhulse Flash Video 1 03-21-2005 10:57 PM
loadmovie and SWF stage dimensions ahayes1ic Flash MX ActionScript 12 02-13-2004 10:36 PM




All times are GMT. The time now is 09:07 AM.