Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 03-12-2003, 08:37 PM   #1
hax0r
Registered User
 
Join Date: Feb 2003
Location: Las Vegas
Posts: 12
Default Script in a button!!!

I have a movie that needs to be loaded into another movie and everytime only two of the buttons stop working they play like a movie up and down up and down below code works in origanal movies but not when loaded from external source.The button is supposed to stay down when pressed.

__________________________________________________


on (release) {
/:pressed1 = /:pressed1+1;
if (/:pressed1 == 3) {
/:pressed1 = 1;
}
if (/:pressed1 == 1) {
tellTarget (_root.shiftleft) {
gotoAndStop("down");
}
tellTarget (_root.shiftright) {
gotoAndStop("down");
}
tellTarget (_root.capslight) {
gotoAndStop("on");
}
//:caps = true;
tellTarget (_root.pop) {
gotoAndPlay(2);
_root.upper.call();
}
/:shiftvar = true;
}
if (/:pressed1 == 2) {
tellTarget (_root.shiftleft) {
gotoAndStop("up");
}
tellTarget (_root.shiftright) {
gotoAndStop("up");
}
tellTarget (_root.capslight) {
gotoAndStop("off");
}
//:caps = false;
//:shiftvar = false
tellTarget (_root.pop) {
gotoAndPlay(6);
_root.lower.call();
}
}
trace("ShiftVar = "+/:shiftvar);
trace("Pressed1 = "+/:pressed1);
}
hax0r is offline   Reply With Quote
Old 03-12-2003, 09:23 PM   #2
oldnewbie
Banned by AS.org Staff
 
Join Date: Mar 2002
Posts: 10,533
Default

You loading in an empty container clip?

If so, some of your references to _root will have to be changed.

If you load on another level, it should work as scripted, as long as you say that this does work on it's own.
oldnewbie 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:03 PM.

///
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.