Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 02-19-2004, 11:50 AM   #1
xingzhe
Registered User
 
Join Date: Feb 2004
Posts: 4
Default control a movie clip both by frame and by actionscript.

I have a question here. I have a simple motion tween for movie clip and it works fine without actionscript. But I want to add actionscript to assign the alpha value for the movie clip, like
mcSomthing._alpha = 100;
at the first frame.
But after the code was added, the tween doesn't work anymore. I guess the actionscript is above the scene tween action. Because I changed mcSomthing by actionscript, the tween cannot control the movie clip anymore.
How to solve the problem? Thank you so much.
xingzhe
xingzhe is offline   Reply With Quote
Old 02-19-2004, 10:46 PM   #2
hognav2t
member
 
hognav2t's Avatar
 
Join Date: Jul 2003
Location: CA
Posts: 442
Default

its always a gd idea to have AS on its separate layer.
__________________
1+1=1;
hognav2t is offline   Reply With Quote
Old 02-20-2004, 11:21 AM   #3
xingzhe
Registered User
 
Join Date: Feb 2004
Posts: 4
Default

Hognav2t, Thank you for your reply. But even we put the actionscript to a separate layer, the result wouldn't change.
xingzhe is offline   Reply With Quote
Old 02-20-2004, 11:28 AM   #4
red penguin
[^\d\D]
 
red penguin's Avatar
 
Join Date: Jun 2001
Location: Brooklyn, NY
Posts: 3,254
Default

In the PROPERTIES INSPECTOR, just put the _alpha to 100 there. AS destroys tweens, I think. Never touch the stuff...
__________________

komielan.com
red penguin is offline   Reply With Quote
Old 02-20-2004, 07:53 PM   #5
xingzhe
Registered User
 
Join Date: Feb 2004
Posts: 4
Default

red penguim, thanks.
I just simplified my application to a simple question here. I cannot use property inspector to do it in my real application. So you mean there is no way to use both as and frame tween to control a movie clip, right?
xingzhe is offline   Reply With Quote
Old 02-23-2004, 10:40 AM   #6
red penguin
[^\d\D]
 
red penguin's Avatar
 
Join Date: Jun 2001
Location: Brooklyn, NY
Posts: 3,254
Default

I'm saying that you should tween using AS.

A workaround would be to have the instance named, say, 'box_01_mc' in frame 1. Set it's alpha to whatever you like. Then when the tween starts, make sure that the instance name you are using is different than the one you set the alpha on. (box_02_mc) THis way, Flash is seeing 2 different instances...but to the user, they are the same...
__________________

komielan.com
red penguin is offline   Reply With Quote
Old 02-23-2004, 11:10 PM   #7
xingzhe
Registered User
 
Join Date: Feb 2004
Posts: 4
Default

red Penguin, that works. How smart you are!
thanks.
xingzhe is offline   Reply With Quote
Old 02-24-2004, 09:35 AM   #8
red penguin
[^\d\D]
 
red penguin's Avatar
 
Join Date: Jun 2001
Location: Brooklyn, NY
Posts: 3,254
Default

Ya gotta think outside the box sometimes....
__________________

komielan.com
red penguin 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


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

///
Follow actionscriptorg on Twitter

 


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