To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here


A Flash Developer Resource Site

Go Back   Flash Kit Community Forums > Flash Help > Flash ActionScript

Reply
 
Thread Tools Search this Thread Display Modes
Old 10-14-2004, 10:11 PM   #1
skylerdong
Member
 
Join Date: Apr 2003
Location: PA, USA
Posts: 63
help please...

i want to have a code that runs continously...

i have two movie clips on the stage. clip1 and clip2
i want to have a code that reposition clip2 base on the height of clip1

for ex... i have a shape tween animation in clip1 that expands the height of a rect.

as the rect is expanding, i want clip2 to be repositioned base on the height, so clip2 is always below the bottom of clip1.

can someone please help?
skylerdong is offline   Reply With Quote
Old 10-14-2004, 11:14 PM   #2
jbum
Senior Member
 
jbum's Avatar
 
Join Date: Feb 2004
Location: Los Angeles
Posts: 2,920
This is a script that is intended to be attached to a frame. It assumes clip1 is named 'clip1' and clip2 is named 'clip2'.

code:

clip2.onEnterFrame = function()
{
this._y = clip1._x + clip1._height;
}



If, instead, you want to attach the script to directly to clip2, you would use this:

code:

onClipEvent(enterFrame)
{
_y = _parent.clip1._x + _parent.clip1._height;
}

__________________
jbum is offline   Reply With Quote
Reply

Go Back   Flash Kit Community Forums > Flash Help > Flash ActionScript

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

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

Forum Jump


All times are GMT -4. The time now is 01:36 PM.


internet.commerce
Be a Commerce Partner
 »  »  »  »  »  »  »
 »  »  »  »  »  »
 

    

Acceptable Use Policy


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.