Moveclip Actions Problem
Hi
I have a rotating movieclip which is made up of a graphic symbol, which is made up of 9 separate buttons. I've placed the movieclip on my main scene, and I have it rotating with the buttons changing on mouse rollover, so I know the buttons actually work. What I'm having a problem with is attaching script to go to different scenes from each button. I've labelled the relevant frames in the relevant scenes and have attached the script to each button instance in the graphic symbol. Aargh - I can't get the links to work at all. When the movie plays, it's not recognising the actions - it's probably something really simple I'm not doing, as I'm not used to actionscript, but any advice would be great..
Thanks in advance
FlashKit > Flash Help > Flash ActionScript
Posted on: 08-18-2004, 01:34 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
2 Actions On A Moveclip Button, Any Tips?
Hi!
I'm building a flashsite with a mp3player, were the music should stop/start
when I'm clicking on a animated equalizer. When I click on the equalizer the animated should stop/start as well. Any tips?
There is a example on this site: http://www.crunc.nl/
Thnx in advance!
tomboye
Accessing A Moveclip Within A Moveclip In A Loop (AS2)
Hey guys,
Im creating a portfolio site and at the moment i've got a few issues with creating the "view next project" and "view previous project" buttons. I've highlighted the first problem in red.
viewNextHit_mc.onRelease = function () {
var breakLoop:Boolean = false;
for(var i=1; i<= numProjects; i++){
if(breakLoop == false){
if(currentPage == "work"+i){
_root["work"+i+"Loader_mc.mainMask_mc"].gotoAndPlay("_out"); //doesnt work
_root["work"+i+"_mc"].gotoAndPlay("_out");
_root["work"+i+"Text_mc"].gotoAndPlay("_out");
mcLoader.loadClip("work"+(i+1)+".swf","work"+(i+1) +"Loader_mc");
_root["work"+(i+1)+"Text_mc"].gotoAndPlay("_in");
currentPage = "work"+(i+1);
_root["work"+(i+1)+"_mc"].gotoAndStop(7);
breakLoop = true;
}
}
}
}
So basically my first problem is how do i access a movieclip within a movieclip in this situation?
My second problem is that i can't use the _root code in the final site because the portfolio.swf is an external swf coming from the home.swf. What can i use instead of _root to get this to compile and to work? I've tried 'this' and it compiles but the functionality doesnt work.
Thx guys
Moveclip Help
at the end of one of my movieclips, i would like it to be replaced by another clip thats already on the stage. can somebody please tell me the actionscript i need to do this and where to put it.
thanks
Function .. MoveClip
I am trying to pass this information from a movie clip to the function in the 1st frame, it does not work can anyone give me direction?....
//firstframe of main stage
var speed:Number;
var theClip:String;
function moveTheClip(theClip, speed){
if(theClip._x < 800){
theClip._x += speed;
}else{
theClip.onEnterFrame = null;
theClip._x = -10;
}
}
//---------------------------------------
this is attached to the the movieClip..
onClipEvent (enterFrame){
moveTheClip("wall",10);
}
// the idea is to have multible clips move accross the screen at different speeds using one function to drive it...??
thanks for any help
RemoveMovieClip In A MoveClip
I can remove a MovieClip(created by duplicateMovieClip() ) in _level0, but I can do this in a MovieClip
Eample:
There is a MC(MovieClip) called "mc1" in _level0
and a MC called "mc2" in "mc1"
then run the below in _level0 :
mc1.duplicateMovieClip("mc2","mc3",9999);
so a MC called "mc3" is created in "mc1"
Sadly, I can't remove "mc3" by any method...
Please help.
Can't Locate MoveClip
This will be hard for me to explain, but please bare with me.
I have loaded an external .swf file on to the stage with multiple movieClips in it. From the main timline of which I load this external .swf file, I am moving the movieclip(s) around the stage (with the commands of the arrow key). On the main timeline I have this:
function this_function() {
trace(mc_holder.village._x);
}
onEnterFrame = function() {
trace(mc_holder.village._x); //just to view the position of the external .swf file x value
IF(this occurs) {
this_function();
} ELSE {
that_function();
}
//rest of stuff below
}
When I trace the village on the onEnterFrame function, I am successful in viewing the value/position of the village in the in the external .swf file. However, if 'this_occurs' and I tell it to use the function 'this_function', where I tell it to trace the village again, it doesn't recongize the movieClip, or village. Instead of giving me a value, it just gives me 'undefined'. So why is it that the 'this_function' can't locate the external .swf file village? Hopefully I explained it so you can understnad my problem.
Thanks
Moveclip Colide
Do you know how to make movie clips change colour when you hit them with another movie clip?
E.g: I have a football, when it hits the goal, the goal changes colour.
Do i have to make a few frames on goal, 1st frame stop(); with normal goal and a few frames after with colours?
Next Frame Of A Moveclip...
If i use:
on (release) {
gotoAndPlay(1);
}
on a button in a movieclip to go to the next fram in the movieclip timeline that wouldnt do it.
How do you do that?
/ pandren
Random Tinting Of A Moveclip
Hey FLASHERS!!!!
Can anyone help me out on some ActionScript and how to get some random tinting of an MC?
Thanks a bunch!
Help With Multiple Moveclip Names
i am making a game of which every movieclip on the stage has its own protocols. i want to make it so that the instance name doesnt matter any more. i had a good thoery but it doesnt work 100%.
as we know there are 2 names. an instance name and a actionscript name. i was hoping to make the 3rd name. a universal name. one that can be used in such a fashion that you can use it without worrying about names in general.
i want to know if my idea is possible. here is an example of what i mean.
(in car_mc ;on the 1st frame of the action layer)
_global.tCar=this._name
this.onEnterFrame=function(){
//whatever
};
~~~~~~~~~~~~~~~~~~
(in Human_mc ;on the 1st frame of the action layer)
_global.tHuman=this._name
this.onEnterFrame=function(){
if(this.hitTest(_global.tCar)){
this.gotoAndStop("death");
};
~~~~~~~~~~~~~~~~~~
of corse the car has its functions to run into the human but thats not the problem. the following code is an example of what i used and doesnt work. when i trace(_global.tCar) it gives me the instance name i used on all of those types of _mc's. so i thought this thoery might work, or it might have to be used in an array fashion, of which i need help then.
Can anyone help me with this?
[F8] Serious SWF Moveclip Problems, Any Help Or Explanation Please
Hello all,
I'm going almost insane trying to figure out what went wrong with my Flash presentation. Basically, I'm creating this huge presentation all in flash, yes probably not a very smart idea but anyways, everything was working fine until the last time I published it to check it out, anytime I had a movieclip on stage, it didn't run properly, it was choppy, blinky and flashed, then didn't run at all. These were movieclips which worked perfectly fine before, but now do not even though I have not touched them. My question is, does this have anything to do with the file size of the SWF? Is there anyway to get around this? When I preview a certain scene with a movieclip in it, they run fine, only when viewing the ENTIRE presentation do I get problems.
Please anyway that can provide any insight, let me know!
Thanks
Playing An Attached Moveclip
Attached a movie clip like so
Code:
_root.attachMovie("carl","newcharacter",201);
newcharacter._x=346.1;
newcharacter._y=254;
Now I want to play the clip, but specify which frame to start the playhead.
I have the below code which just plays it from whichever frame the playhead has stopped at previously, how do I specify?
Code:
_root["newcharacter"].play();
Many thanks!
Target Moveclip With String
Basically I want to acheive the following;
currentItem = "subnav.test_mc.item" + miniLoop
currentItem.onRollOver = function () {
currentItem.gotoAndStop(2);
}
currentItem.onRollOut = function () {
currentItem.gotoAndStop(1);
}
I have a subnav movie clip which loads 5 buttons as movie clips and I want to setup the function for a rollover by doing the above. How can I target each item in the loop by using the concatinated "currentItem" above?
MoveClip With Text + HandCursor?
Hi Folks,
I have got a Symbol which has a few shapes + text on top of it. I am trying to get it to act like a button using: -
buttonMode = true;
useHandCursor = true;
The hand cursor only appears on the bits of the "button" that aren't covered by the text. Any ideas what I could try?
Thanks for the help
All the best,
Ash
How To Load A Movieclip Within A Moveclip
Hi,
I need to configure actionscript within a movieclip to load another movieclip to play at a certain frame, then stop after 5 frames of play.
So within Movieclip_1 at frame 40, I need Movieclip_2 to load and play at frame 10 and stop at frame 20.
(it might be important to note that these movieclips are within seperate layers)??
Is this possible?
Thank you :)
Edited: 02/04/2007 at 04:57:09 PM by dfsdfsdfsdfsd
Resize Loader/MoveClip
I'm currently trying to make a watered down version of an image editor in Flash. I am currently using the loader component to bring the picture in. I can use the setsize when loading the movie, but I can't seem to use it while the movie is running. Right now, I have a textinput component with an on(enter) event with MyPic.setsize(500,500); in the code (MyPic being the loader instance).
Anybody out there that can help me out?
-B-
Moveclip Volume Up And Down Button
Hi,
I'm trying to create a movieclip that on mouseDown will decrease the volume by one as long as it is pressed.
I currently have a global variable called volPercent set to 100 initially and I have two buttons with the following code.
volumeup_btn.onRelease = function() {
if (volPercent != 100) {
volPercent += 1;
volstatus = volPercent;
MySound.setVolume(volPercent);
}
};
volumedown_btn.onRelease = function() {
if (volPercent != 0) {
volPercent -= 1;
volstatus = volPercent;
MySound.setVolume(volPercent);
}
};
It works great but I need it to repeat the volume increase or decrease as long as it is pressed.
any help would be appreciated.
Thanks,
saveth
Setting The Quality Of A Moveclip
Howdy!
Anyone here know if it's possible to set the rendering quality of just one movieclip, as opposed to the whole stage?
Thanks in advance,
Switaki
Make A Moveclip A Link?
I'm wanting to make a movie clip a link, the movie clip loads an image from a php file.
Heres the actionscript that loads the image, if it helps.
Also, how do a load text into a dynamic text box with this script.
The text I want to put into it is loaded from the php file.
PHP Code:
loadText = new LoadVars();loadText.load("http://localhost/flashload.php");loadText.onLoad = function(success) { if (success) { sPhoto.loadMovie(loadText.photo); mytitle.loadMovie(loadText.title1); }};
Also is there any way to resize the photo in the actionscript. I want the photo to fit in a movieclip 190x120.
Thanks in advance!
Moveclip Volume Up And Down Button
Hi,
I'm trying to create a movieclip that on mouseDown will decrease the volume by one as long as it is pressed.
I currently have a global variable called volPercent set to 100 initially and I have two buttons with the following code.
volumeup_btn.onRelease = function() {
if (volPercent != 100) {
volPercent += 1;
volstatus = volPercent;
MySound.setVolume(volPercent);
}
};
volumedown_btn.onRelease = function() {
if (volPercent != 0) {
volPercent -= 1;
volstatus = volPercent;
MySound.setVolume(volPercent);
}
};
It works great but I need it to repeat the volume increase or decrease as long as it is pressed.
any help would be appreciated.
Thanks,
saveth
How To Load A Movieclip Within A Moveclip?
Hi,
I need to configure actionscript within a movieclip to load another movieclip to play at a certain frame, then stop after 5 frames of play.
So within Movieclip_1 at frame 40, I need Movieclip_2 to load and play at frame 10 and stop at frame 20.
(it might be important to note that these movieclips are within seperate layers)??
Is this possible?
Thank you
Adding MoveClip Programm Interface
Hello someone.
I faced this problem :
I've created MovieClip ( MC) and i got to write interface to change some of them properties. Let's say it's "_x".
For example - simple prototype , for Create() square:
--------------------------------------------------------
movieclip.prototype.Create (Name,depth,x,y,wdth,hght,Colr) {
this.createEmptyMovieClip(Name,depth);
with(this[Name]){
_x=x;_y=y;
lineStyle(1,Colr);
MoveTo(0,0);
LineTo(wdth,0);
LineTo(wdth,hght);
LineTo(0,hght);
LineTo(0,0);
}
--------------------------------------------------------
so after Create("MC01",.....) it will bring me Square shape to the stage .
I need some method .. called MoveToX(NewXCoor) , that will move it to NewXCoor , like that : MC01.MoveToX(200);
How do i arrange this thing ?
P.S. Where could i read about that ?
Moveclip._rotation Screws Up My Motion
Hi,
I have a little actionscript that i'm just messing around with to learn some things... just hacking away with actionscript picking things up as I go.
I made this:
http://iamunreal.com/sketch/flashphun/bouncingball.swf
Just a little physics with gravity dealy.. I then got the bright idea to add a sun and change the highlight on the ball and the position of the shadow.
I proceeded to calculate the angle and such so I can then rotate my ball so it will look like the highlight is moving in relation to the sun. (the center of the ball mc is in the center of the ball)
Unfortunately, when I rotate the ball, the motion gets all fouled up. Is there any way to get around this? Any explanation?
Thanks,
Jay
Can You DuplicateMovieClip That Is Inside A MoveClip All Ready.
OK.. so I have not used duplicateMovieClip in such a long time and it is late so sorry about posting this question again if it is out there.. but I couldn't fine the answer I was looking for
I have createEmptyMovieClip(1) and then I createEmptyMovieClip(2) inside of createEmptyMovieClip(1) and then I loadMove (external swf files) into createEmptyMovieClip(2).. I would like to make a duplicateMovieClip of the last createEmptyMovieClip(2) that I mad.. is this possible?? for some reason I can't get it to work..
Duplicate Moveclip With Button Function
Ok, so I was able to duplicate a movieclip five times. How can I add a button function to the duplicated movieclips?
My current code:
Code:
for (i = 0; i < 5; i++) {
duplicateMovieClip (_root.myMC, "tocbtn" + i, i);
myMC._y = myMC._y + 24;
}
I was thinking something like this...
Code:
for (i = 0; i < 5; i++) {
duplicateMovieClip (_root.myMC, "tocbtn" + i, i);
myMC._y = myMC._y + 24;
myMC.onPress = function() {
getURL("http://www.google.com");
}
}
... but that only adds the link to the last movieclip created.
What am I missing?
Thanks
MoveClip As Mask Stupid Problem
I'm not new to Flash, been using it for about 5 or 6 years now, but I've come across this weird problem. I have a two movieclips right, and each of them mask a seperate image. I'm not using the setMask function, I've simply just used masked layers. Anyway, each of these movieclips contain an onRollOver and an onRollOut function inside itself. What I've achieved here is a simple make the mask bigger to expand whatever it's masking. I've then duplicated it all and changed what it was masking. I've then placed that ONTOP of the original one. But for some reason, the actionscript inside the TOP movieclip doesn't work. I've changed their orders and it's always the one on top that doesn't work. I've tried it with the setMask function, placing the code on the root timeline, but nothing has worked. If anyone can help me I will be very grateful. This is for a website which I have to have done TOMORROW, so any quick replies would be great.
Thanks in advanced!
Ben.
Loading Multiple Files To One Moveclip?
I'm about to load 6400 pictures (8x6px) to my scene.
Using 6400 movieclips will be really slow, so what I want to know is how - if it's even possible - to load multiple pictures to one movieclip?
Thanks in advance
How To Make A MoveClip Move In 2 Different Direction One After Another.
Hello, I'm trying to make a movie clip slide horizonitaly or vertically when a number of buttons are clicked. The problem I'm having is, if i click a vertical button I want it to check to see if the movieClip is in it's orginal postion. If it is, the movieClip will move vertically. If it isn't it should move the movieClip to the orginal postion and then move vertically. I really have no idea what I'm doing!
I can seem to figure out he logic. I can only get it to move vertically or horizonal if the moveClip is in its orginal postion.
Please help!
I've been working on this for weeks.
www.visualstrategies.ca/sample.zip
Thanks!
Moveclip And Actionscript Problems. (MX 2004)
Hello.
I am a noob to actionscript (not a lot of experience in Flash either) and need some help.
What I am trying to do is get a button to make a movieclip go to a specific frame.
I have a movieclip that plays a set of frames up to the 100th frame, and then I tell it to go back to and play frame 1 again. However, at about 105, I have another set of frames that I want to play at the push of a button. How would I go about doing this?
Thanks.
Path To MoveClip With A Variable As Part Of It?
Is to even possible target something on the stage by using a variable as part of the path.
For example, I've got an item in my library, class of 'star'. I add a couple instances of it to the stage and then I want to do something to 1 of them. The one that is selected is determined by a variable.
Perhaps a (non working) code example will give a clearer picture:
ActionScript Code:
var starMC1:star = new star();var starMC2:star = new star();var foo:Number = 2;addChild(starMC1);addChild(starMC2);starMC1.x = 50;starMC[foo].y = 40
- obviously, this code doesn't work or I wouldn't be posting. But is there some way do this?
Thanks for any help
Moveclip And Actionscript Problems. (MX 2004)
Hello.
I am a noob to actionscript (not a lot of experience in Flash either) and need some help.
What I am trying to do is get a button to make a movieclip go to a specific frame.
I have a movieclip that plays a set of frames up to the 100th frame, and then I tell it to go back to and play frame 1 again. However, at about 105, I have another set of frames that I want to play at the push of a button. How would I go about doing this?
Thanks.
Moveclip/dynamic Text Mask -- Odd Problem
i've got two movieclips, one containing a fill, and the other containing a dynamic text field (the font is embedded using a shared library). i would like for the fill movieclip to act as a mask for the text movieclip, so i use the script:
Quote:
text_mc.setMask(mask2);
but it behaves strangely. instead of using the area of the fill as the mask (it is not just a square, it is a shape) it instead uses the entire square outline of the movieclip (the square that is the size of the outermost contents of the movieclip). i would like for the mask to only mask the areas of the fill, but i can't just use it as a standard mask layer because of the dynamic text. any ideas?
Moveclip Loader Loads Pictures In Top Left
Okay so i have a moviecliploader that loads other swfs into my main swf but when i use MCL.loadClip("two.swf",2); it loads it into the top left corner and i was wondering how i would reference it to change it to say 200,200? thank you
Position Object Relative To Dynamic Moveclip
[im using this code] >
http://www.actionscript.org/showMovie.php?id=754
I want to place the orange buttons next to the grey container and have them move relevtive to its edge, but NOT resize. I want this to happen in the same way as the text links on this rather nice site >
http://www.nooflat.nu
I have ben trying to modify the various tutorials on how to position objects reletive to the stage but havent got anywhere, your help would be much appreciated as always
thanks
Chris
Attach A Moveclip The Pass To Class File
I have an application that loops over an object, which contains the properties of many different items. The items will then need to display on the stage. Each item has a xcord and ycord values. I have a class file, which i need to pass the values to. The Class file will then place the object on the stage for each item depending on the co-ordinates passed.
The problem i'm having is that i cannot send though the movieclip (which is attached a new instance name for each item) to the class. If i only have one item and hard code the movie clip value it works fine.
PHP Code:
var xcord:Number;
var ycord:Number;
for (var i:Number = 0; i<unitObj.length; i++) {
xcord = unitObj[i].xcord;
ycord = unitObj[i].ycord;
this.attachMovie("mcCircle", "mc" + i, depth++);
phMC = "mc" + i;
var unitItem = new unit(phMC, xcord, ycord);
}
Here is the snippet from the class file:
PHP Code:
class test.com.unit{
private var phMC:MovieClip;
private var xcord:Number;
private var ycord:Number;
//constructor function
function unit(phMC,
xcord,
ycord){
phMC._x = longitude;
phMC._y = latitude;
}
}
Thanks
Problems With Moveclip Containing An Linked Txt Text File
I´ve done a TextField that´s has a txt-file linked into a flash document with a var script. I would like to create a MovieClip with this text field to be able to animate it. When I do this and place an instance of the MC on the stage and the moveclip the same as the textfield that the txt file is liked to It does not work. The MC animation works but no text are displayed. What have I done wrong?
heres the code
var loadedText:LoadVars = new LoadVars();
loadedText.onLoad = function(success:Boolean) {
textfield2_txt.text = ""+this.name;
};
loadedText.load("mytext.txt");
/Hompe
Accesing Textbox Properties Inside MoveClip
I get this problem very often it says, that i need to include the clip on on movieclip event, i don understand why.
i have a movieclip called question, and a textbox called boxText. i am assiging them the correct instance names.
the code is
Code:
this.question.boxText.text = "This is a sample text";
and it gives me a stupid error.
Could anyone help me here
Simple Way To Check If A Moveclip Hits Another Movieclip
Hi. I'm (trying) to make a game. Is there any inbuilt functions or anything to make it simple to check if for instance a ball in one movieclip hits another ball?
Any suggestions on how to do such tests without using to much resources?
Changing Color Of Moveclip Stopping The Movie
Hello all,
I know something similar to this has been posted but I can't seem to find the answer that will work for me.
I have a box_mc that moves around the stage. When it hits a specified frame I would like it to change colors based on an array.
What is happening is that it will move to the specified frame (frame 38) and change the color. It will not continue moving after that or reset back to the original color and position when the movie loops back to frame 1.
I have attached a zip with 2 fla files.... when with the box moving and no color change. The second with the box moving until the color changes.
Any help would be greatly appreciated.
Thanks in advance
jlmoshier
Limiting Mouse Angle Rotating Moveclip To Restraint
I have a movie clip that rotates based on the mouse angle. It points to where ever your mouse is located. It works fine but I need to adjust so it only works when your mouse is in a certain arc of the circle. When you mouse is on the opposite side of the screen, I dont want the movieclip still following it. So I just want to know how to make a constraint so it only works in a section of the screen. If somebody could give me a script or point me towards a tutorial I would appreciate it very much.
Loading A MovieClip From The Library Into An Empty MoveClip On The Stage...
Hi!
I'd imagine that the solution to this one should be pretty straight forward...
Okay then, what I want to do is to load a moveClip from the library into an empty "placeHolder" movieClip that is on the stage.
This will happen on the press of a button so it will be within;
on(release){
}
If anybody can help me implement this, thankyou.
Movieclip Over A Moveclip, Both On Stage, Activate Mouse Event?
Hi got MC A and MC B. MC B is directly under MC A. They are both indepedent on the stage, meaning they are not children of a bigger mc container. They both have rollover events, how can I activate the rollover events of MC B???
Im aware of mouseChildren and mouseEnabled, but that requires them to be in the same container...
Script Inside MoveClip Attached Using AddChild Does Not Work
Hello everyone,
I bet this question has been answered before, but searching for those answers is not easy when the keywords I can chose from are "MovieClip script addChild"
I am using Flex Builder to create my Flash app. Our designer has given me an .SWF containing movieclips with small animations of approx. 30 frames. On the last frame he has written a "stop();" framescript.
I have set the linkage of these movieclips and then made a class for each of them. It simply extends MovieClip and looks like this (I have used common names here to make things a bit clearer):
Code:
package
{
import flash.display.MovieClip;
[Embed(source="assets/assets.swf", symbol="my_animation1")]
public class MyAnimation extends MovieClip
{
public function MyAnimation()
{
super();
}
}
}
As you can see, nothing fancy. When instantiated and added to the stage, however, the animation is looping. Looks like the framescript on the last frame of the movieclip is never called. What am I doing wrong? What is the best way to let the animation stop at its last frame?
Droozle
How Do I Make A Moveclip Stop Inside A Specific Target Zone?
Hi, I'm a newbie to Flash. anyways, i need to make a movieclip stop inside a specific ztarget zone. At the moment the movieclip stops even if you are just partially touching the target area. How do I get it to stop (or bump into) only the target zone so that it stop at the same location everytime?
This is my code so far :
ball2.onPress = function() {
this.startDrag(true);
reply_txt.text = "";
this.swapDepths(this.getNextHighestDepth());
xstart = this._x;
ystart = this._y;
};
onEnterFrame = function () {
if (counter == 2) {
reply_txt.text = "Congrats, you're finished!";
}
};
ball2.onRelease = function() {
this.stopDrag();
if (eval(this._droptarget) == box) {
duplicateMovieClip("ball2","shelf",10)
onEnterFrame = function(){
shelf._x += xmove;
}
; reply_txt.text = "THIS FITS";
this.enabled = false;
} else {
reply_txt.text = "DOES NOT FIT";
this._x = xstart;
this._y = ystart;
}
wheel.swapDepths(this.getNextHighestDepth());
};
ball3.onPress = function() {
this.startDrag(true);
reply_txt.text = "";
this.swapDepths(this.getNextHighestDepth());
xstart = this._x;
ystart = this._y;
};
ball3.onRelease = function() {
this.stopDrag();
if (eval(this._droptarget) == box2) {
reply_txt.text = "THIS FITS";
this.enabled = false;
} else {
reply_txt.text = "DOES NOT FIT";
this._x = xstart;
this._y = ystart;
}
wheel.swapDepths(this.getNextHighestDepth());
};
ball.onPress = function() {
this.startDrag(true);
reply_txt.text = "";
this.swapDepths(this.getNextHighestDepth());
xstart = this._x;
ystart = this._y;
};
ball.onRelease = function() {
this.stopDrag();
if (eval(this._droptarget) == box3) {
reply_txt.text = "THIS FITS";
this.enabled = false;
} else {
reply_txt.text = "DOES NOT FIT";
this._x = xstart;
this._y = ystart;
}
wheel.swapDepths(this.getNextHighestDepth());
};
Thanks in advance.
Actions Are Overriding Other Actions Or Being Caught In A Loop Only On Double Click
I have a movie which I use actionscript to move things on/off stage to create different pages. Everything works great unless you double click a button.
When double clicking it makes objects "stick" in place and they will not move even though another command should make them move off stage (movie gets stuck). On a single click, the objects do what they are commanded to do. I even tried setting a variable to disable the button click if it has already been clicked. What causes this?
In the code below, the objects in the function home() will not leave the stage once the services button is double clicked (they are commaned to ease off the stage once other mc's are pressed) . BUT it works if only the services mc is only single clicked...please help. I'm pulling my hair on this one and about to start pulling my teeth.
if (_global.whichMovieLoaded != "services" && _global.isMovieLoaded != "stop") {
_global.whichMovieLoaded = "services";
services.onPress = function() {
remove();
function Pause() {
// bring home
home();
clearInterval(PauseInterval);
};
PauseInterval = setInterval(Pause,1000);
valet.easeY(400, 1.09);
itinerary.easeY(425, 1.09);
dining.easeY(400, 1.09);
ground.easeY(425, 1.09);
};
};
function remove(){
valettxt.fadeOut(9);
diningtxt.fadeOut(9);
itinerarytxt.fadeOut(9);
groundtxt.fadeOut(9);
mindtxt.fadeOut(9);
nauticaltxt.fadeOut(9);
scenictxt.fadeOut(9);
terrtxt.fadeOut(9);
mind.easeY(650, 1.09);
nautical.easeY(650, 1.09);
terr.easeY(650, 1.09);
scenic.easeY(650, 1.09);
valet.easeY(650, 1.09);
itinerary.easeY(650, 1.09);
dining.easeY(650, 1.09);
ground.easeY(650, 1.09);
logo.easeX(950);
imageLoader.unloadMovie();
};
//takes objects back to the home page
function home(){
maui.easeX(200, 1.09);
con.easeX(200, 1.09);
bar.easeX(625, 1.09);
patio.easeX(400, 1.00);
patio.fadeIn(2);
discover.easeX(625, 1.09);
discover.fadeIn(1);
imageLoader._alpha = 0;
VIP.fadeIn(.9);
};
Actions On The Main Page..do They Affect Actions On Movie Buttons?
ON the home page I've created, the buttons I used with the code in my previous thread ("two questions about HTML publishing and buttons"), I added an on rollover action to the actions layer of the main timeline (not the movie button timeline) so that on rollover, a picture would change according to the button that was rolled over. I did this for all three buttons. The rollover action works great, but now the links don't work in either the html OR the swf version. Would the added action disable the movie-clip button actions? Here's the added main timeline code, edited for space: photobtn_mc.onRollOver = function() {
gotoAndStop(2);
photobtn_mc.onRollOut = function() {
gotoAndStop(1); ( Again, help is greatly appreciated!)
|