To Hide Instances Of Movie Clips
Hi, there.. I need help with a code.
I want to hide a movie clip when on a rollover (mouse) event
FlashKit > Flash Help > Flash ActionScript
Posted on: 08-23-2004, 08:15 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
How To Hide Movie Instances
I have 2 movie clips: A & B. They each have an invisible button.
I want to, on the main timeline, only show A when it starts. When the user clicks on A, hide movie instance A and show movie instance B (and vice versa, click on B, show A/hide B).
I tried using the _visible, but it doesn't seem to be working. Maybe I'm putting code in the wrong place.
Help!
Ya Tin
Controlling Instances In Movie Clips From Other Clips
I am trying to get a button on my level 2 in my main movie to point to a frame inside a movie that has been loaded in on level 3 on the main movie. I have tried all different kinds of combinations and no success. I even tried putting the level 3 movie in an empty movie clip on the root, and naming the instance "music", and then writing in the button _root.music.GotoAndPlay(3); I need it to target frame 3 in my level 3 movie. Should I put the level 3 movie in its own empty movie clip? I was able to get the button to unload movie3, but I don't want it to dissapear, I just want it to go to frame 3 in the movie clip to turn off the music.. You can see what I mean at the address below. I have my audio player in the bottom right with an on/off that works fine, but when I go to the link in my site "Music" there are some downloadble MP3's, and when you click on one I want the "equalizer bars" you see in the audio in the lower right corner to stop, and it means I need it to go to frame "3" of tha movie clip for that to happen, just like it does when you click on "off" in the audio movie. Anyway, sorry this is long winded, but wanted to make sure it was clear as to what I am trying to do..
Thanks in advance,... Here is the link
http://www.incogneato.tv/stales
Mike
Hide Movie Clips
Is it possible to hide several movie clips at once by adding their instance names to an array, and then creating some kind of function? If it is, could anyone please give me an example of such a function?
Hide Movie Clips
Is it possible to hide several movie clips at once by adding their instance names to an array, and then creating some kind of function? If it is, could anyone please give me an example of such a function?
Mouse Hide/show Movie Clips
I have a movie clip where the mouse hides when in the movie clip.
I want the mouse to hide when the movie clip is rolled on and when its rolled off the mouse is shown again.
How would i go about this?
Any help would be great!
Jemes
Using A Slider To Show / HIde Movie Clips
I've created a slider and would like when the slider gets dragged across a certain point (preferably an x coordinate) it will then show a movie clip. It's being used for a portfolio.
I've created the slidder with 2 different images:
1. is the line it moves on
2. is the actual slider bar
I have the following code on the slider to allow the user to drag it back and forth but I'm not sure how to set it so that when the user reaches a certain point it will show a movie clip that contains different images that relate to that point.
onClipEvent (load) {
top = _y;
bottom = _y;
left = _x;
right = left + 175;
}
onClipEvent (enterFrame) {
if (dragging == true) {
// execute this code
}
}
Any help is greatly appreciated. Thanks
Attach Code
onClipEvent (load) {
top = _y;
bottom = _y;
left = _x;
right = left + 175;
}
onClipEvent (enterFrame) {
if (dragging == true) {
// execute this code
}
}
Movie Clips And Instances
Say I have a movie clip called Banana. How can I place an intance of Banana called Banana1 onto the stage using actionscript.
How To Hide Several Movie Clips On EnterFrame (or OnEnterFrame SwapDepth) AS2 CS3
Hi Guys,
I am new to AS2, so any hints would be appreciated. The movie I am doing uses Kirupa's rollover tutorial to roll an effect off a movie clip. As there are several of these on the page, I am also using swapdepth to put them on the top of the other clips when we are hovering over them. Otherwise the layer order messes things up.
The test file can be seen at www.greetingsfrombayer.com/new.
The (butchered) mc code is as follows:
---------------
stop();
this.onEnterFrame = function(){
if(rewind == true){ //if rewind switch is set to true play backwards
prevFrame(); // play backwards
}
}
this.onRollOver = function(){
rewind = false; //set variable (or switch) that decides wether ot not to play backwards...
play(); // play this movie clip.. (grow the button(tween));
_root.x +=2; // this moved the movie clip to the top, to get out of the way of the others
this.swapDepths(_root.x);
}
this.onRollOut = function(){
rewind = true; //set or rewind switch to true so it will play backwards...
_root.x -= 3; // puts it back down onto it's level again
this.swapDepths(_root.x);
}
this.onRelease = function(){
getURL("http://www.animalhealth.bayerhealthcare.com","_blank");
}
---------------
The issue is that I have a closing image that comes on about a minute into the animation. (The movie pauses on frame 1 for 60 secs then moves on) But if a user is still hovering over one off the movie clips it keeps that movie clip on top, over the animation, which of course looks stupid.
So I either need to have an onEnterFrame (or alternative) that will delete all of the little movie clip rollovers, or will bring the final large movie clip to the top when it starts, whatever the user is hovering on. Any ideas would be really appreciated as this is the last little bit of the job to finish.
And if you do visit the test site, sorry about the music. The animation at the end fades in after 60 sec.
I am using CS3, with AS2.
Cheers,
Will
Dynamically Creating Instances Of Movie Clips
I'm wondering if it's possible with actionscript and Flash MX2004 Professional to create instances of a movie clip at run time. For example, say I wanted to make a program that had a text box into which a user could type a number. Based on that number the program would display that number of instances of the movie clip. Further, I would like to be able to set the properties of those instances at runtime in actionscript.
Let me know if I'm unclear.
Thanks,
Legion
Changing Text In Movie Clips/instances
I created a movie that has text. I see that if I create different instances of this movie and change an instance or change it from the library it changes all of them. At least that's what's happening and that makes sense.
I want to duplicate the movie but have different text. I duplicated it in the library and created an instance of the duplicate version.
If I change the text in the duplicate or in an instance of it, it changes the original in the library and all instances of it -- all instances both original and duplicate. All I want to do is end up with 2 movies that are essentially the same except one line of text is different. I obviously don't want to recreate it each time I need it and I'm going to need several versions of it.
It's obvious that I'm new, so thanks.
Changing Text In Movie Clips/instances
I created a movie that has text. I see that if I create different instances of this movie and change an instance or change it from the library it changes all of them. At least that's what's happening and that makes sense.
I want to duplicate the movie but have different text. I duplicated it in the library and created an instance of the duplicate version.
If I change the text in the duplicate or in an instance of it, it changes the original in the library and all instances of it -- all instances both original and duplicate. All I want to do is end up with 2 movies that are essentially the same except one line of text is different. I obviously don't want to recreate it each time I need it and I'm going to need several versions of it.
Changing Instances Of Movie Clips Within A Scrolling Background
Hey guys,
this prob sounds quite easily to resolve but I couldnt find a solution yet.What I want to do is to give the illusion to move a movie clip, a person, with the aid of a scrolling background. when the person arrives in front of another movie clip (part of the scrolling background) and the player presses a key, I want this movie clip to change the appearance.
I tried different possibilities like
Code:
onClipEvent (enterFrame) {
if (scrollingbackground._x=positionoftheperson) {
if (Key.isDown(Key.UP)) {
_root.scrollingbackground.movieclip1.gotoAndStop(2);
}
} else {
_root.scrollingbackground.movieclip1.gotoAndPlay(1);
}
}
but nothing worked
could anybody please help me?? thanks a lot!!!!
Putain
Making Dynamically Created Movie Clips Instances Re-draggable
This is a Flash 8 / Actionscript 2 problem
The application allows the user to create multiple instances of a dot
by clicking on the original dot - and then drag the instances to position
them on the stage (it's part of a game)
I need to allow dots to be re-dragged - but to do that need to detect the
instance name of the dot under the mouse pointer (otherwise I can't turn
the dragging on)
this is what I've got so far...
numberOfDotDuplicates = 0;
dot.onPress = function()
{
numberOfDotDuplicates++ duplicateMovieClip(_root.dot,"dot"+numberOfDotDupl icates,getNextHighestDepth())
_root["dot" + numberOfDotDuplicates].startDrag(true);
}
/*
This bit below is not realy part of the problem
- but it feels like an inelegant workround
I've had to use a listener to stop the dragging
because the onRelease event is only detectable
if it happens over the original 'dot' (where the
corresponding onPress event was detected)
*/
var myListener:Object=new Object()
Mouse.addListener(myListener);
myListener.onMouseUp = function()
{
stopDrag();
}
Thanks for taking the time to read this
Simon
Action Script In Child Movie Clips, Instances, Symbols( Problem)
Hi,
Have come across a problem when trying to use action script in a movie clip symbol (created in the Library) and using an instance in a layer in the main move.
The action script which is in the movie clip instance seems to work differently to how it would if the exact same code was in a script layer in the main time line (or u could say that is doesn't work the the way it should).
I have 2 examples of this:
- XML.load(); loads but does not parse (ie load xml into DOM), yet returns success = true in the onLoad call back.
- scope of Array objects seems to be limited. That is an array (in this case containing the XML) is not accessible from the next frame. or rather does not exist in the next frame. Trying to assign this array to a globaly declared array results in a zero length array.
has anybody come across this before? if so is this a known problem or am i doing something wrong?
thanks
Tweens On Clips And Unique Instances
I have a little bit of code that sits in a movie clip, and triggers a couple of tweens. The first tween affects _parent, and onMotionFinished then triggers another tween in the clip itself.
The clip is attached to another clip onRollOver, and removed onRollOut. It is meant to be used as a button-type effect:
Code:
var myTarget = this;
var fadeThrobIn:Object = new Tween(this._parent, "_alpha", Bounce.easeOut, 20, 100, 2, true);
var trans:Transform = new Transform(myTarget);
fadeThrobIn.onMotionFinished = function():Void {
//trace("hi there");
var throb:Object = new Tween(myTarget, "_alpha", Strong.easeOut, 100, 20, .75, true);
throb.onMotionChanged = function():Void {
var am = myTarget._alpha/100;
var mu = myTarget._alpha/100;
var um = 100/myTarget._alpha;
var co = myTarget._alpha*2.55;
// channel offset
var colorTX:ColorTransform = new ColorTransform(1, 1, 1, am, co, co, co, 0);
trans.colorTransform = colorTX;
};
};
The problem is this; when a button is rolled over, the clip is attached and the code triggers just fine. However, If another button is rolled over before the first animation is done, the internal tween picks up both onMotionFinished events, so triggers twice. Here's the code that calls the clip:
Code:
fadeIn = function(myTarget, ani01):Void {
var ani01:String;
target.attachMovie(ani01, "throbber", myTarget.getNextHighestDepth(), {_x:5, _y:5});
target.onRollOut = function(){
removeMovieClip(myTarget.throbber);
}
}
btn_test01.onRollOver = function():Void {
// trace("handler called");
fadeIn(this, "throbber_01");
}
(note that all import stuff is taken care of, so the effect does work)
How do I build a handler that will allow each instance to be unique, without explicitly naming each one? Or is there a better way to avoid this conflict?
I can attach the FLA if anyone is interested.
Variables And Instances And Movei Clips Rotting My Brain
Bit of a tricky one, this.
I have loads of movie clips - over 100. Well, it is one, copied and pasted 100 times, to keep file size down. Each one has a different instance name (1, 2, 3, 4 etc) and in the main timeline there are over 100 text boxes with corresponsing names (1, 2, 3, 4 etc).
In these movie clips, depending on what frame each one is at, it puts a different variable into its corresponding text box, e.g. "house", "factory", "shop" etc. There are about 20-25 of these variables.
The actionscript which does this is:
Code:
Set Variable: "_level0:"&_name = /:status
Which basically says, find the text box in the main timeline with the same name as the hosts movie clip instance name, and enter the contents of the text box "status" (which is in the main timeline).
Ok, that's the background sorted.
This method works. Hurrah. But I now need it to work kind of in reverse. With me? Ok, stay with me on this one...!
I have a movie, very similar to the above one, but instead of creating the variables (which are then passed to a database using ASP), variables are entered INTO it using the ASP and database. I can do that, but the Flash is not liking it. Well, it is, but it's not doing what it should!
These 100 or so text boxes in the main timeline become populated by data passed into them from the database. I want the data in these (e.g. "house" "shop" etc) to make the movie clip with the same name go to the frame with the same name as that data.
For example, say for movie clip number 35. Data is passed into the text box called "35". Let's say this data was the word "house". In movie clip 35 there would be some actionscipt, not dissimilar to the above, which reads the data from this text box, and goes the frame. So, it would see that the word "house" was there, and so would go to and stop the frame named "house" within that movie clip.
I have tried putting this in the Movie Clip:
Code:
Go to and Stop ("_level0:"&_name)
But it doesn't seem to work. Any ideas??
I'm passing data into the movie by attaching it to the URL of the movie. So, for the above example, the HTML page would embed the movie with the URL
movie.swf?35=house etc
Get me drift? Good!
I know it's a long explanation but it's a bit of a tricky one to sort out. Pleeeease, any help! I'm pretty much desparate now - this is basically my last hope.
Thanks,
Nick
Assigning Loader Instances To Multiple Container Clips
I have a project where I am loading in a variable quantity of photos and then assigning them to a finite amount of containers.
I have 18 containers, and I can have between 1 and 18 photos. So if I have 1 photo it should be placed in all 18 containers, if I have 2 they should each go in 9 containers.
Right now I am loading in the photos successfully but I am having issues making them children of the multiple containers.
Here's the relevant code
Code:
private function RenderPhotos():void
{
Globals.Debugger.text = "";
this.mcContainer.gotoAndStop(1);
var singleTimer:uint = 10; //Number of seconds for one photo animation.
var numPhotos:uint = URLList.length; //Number of photos
var numPlaces:uint = this.mcContainer.numChildren; //Number of slots for photos
var count:uint = 0;
for(var i:uint = 0; i < numPlaces; i++)
{
if(count > (numPhotos - 1))
{
count = 0;
}
if(PhotoList[count].content)
GetHolder(i).addChild(Loader(PhotoList[count]).content);
else
Globals.Debugger.text += "was null -- ";
count++;
}
this.mcContainer.play();
}
This method is called by the Event.COMPLETE event handler, so the content is there. This code will display the photo ONCE, in the last container it was assigned to, but I need to assign it to multiple containers...
I tried using a "duplicateMovieClip" method from a third party but it doesn't seem to support Loader too well. Anyone have any ideas?
How To Remove All Movie Clips/array: Movie Clips Carry Over To Next Frames/ Scenes
Hi: I am creating a small game. So far so good, but only problem I have come across is when I jump to another frame or scene, previous movieclips (using an array) that are still running carry over to the next frame/scene.
See attached if you have some time- start clicking on answers in the game, and when time runs out some movie clips that are still running will remain on top of my end frame and carry over to the next scene as well.
Is there any sort of remove all movie clips or "clear all" type of actionscript?
thanks in advance!
Maintaining Event Behavior For Movie Clips Nested In Movie Clips
Is there any way to maintain a clip's event callbacks when said clip is nested in a parent clip that has its own definitions for those callbacks?
In other words, if clip B has a definition for .onPress and clip A has a definition for .onPress, is there anyway to maintain clip B's definition if it is nested in clip A?
I have tried doing it by making clips into movie clip subclasses but it doesn't work... but how do components work then?
How Do I Load/stream Individual Movie Clips Within Other Movie Clips
I am using flash 5
I have a movie with a huge movie clip in it and that movie clip has lots of movie clips inside that. how do I load each one individually so when the viewer clicks on abutton it starts to laod the related movie clip.
Please help.. I'm working on borrowed time and borrowed money
Movie Clips Within Movie Clips: Text Link Problem
Hello.
I have a Movie Clip that is my main one with another Movie Clip inside of it. In the subordinate Movie Clip, I wish to have text linking frame (13) to frame (14) for instance. The problem that manifests is that while buttons is the subordinate Movie Clip link to frames within it with no complications, the text link from 13 to 14 with its respective code links to the last frame (would be 14) in the main Movie Clip.
Am I doomed to convert all text links to buttons in the subordinate Movie Clip or is there (what I am praying for) a code to work around this and keep frame links confined to the subordinate Movie Clip? I would appreciate any help that anyone can offer regarding this problem. Many Thanks.
Movie Clips Acting As Buttons Can't Load Other Movie Clips
Frame 1 has three movie clips on it, instance names are A, B, C. I have the following actionscript on frame 1 as well:
stop();
import flash.filters.GlowFilter;
ar = [A, B, C];
for(var z=0; z<ar.length; z++) {
ar[z].onRollOver = rollover;
ar[z].onRollOut = rollout;
}
function rollover() {
this.swapDepths(0);
this.filters = [new GlowFilter(0x333333, .20, 7, 7)];
}
function rollout() {
this.filters = null;
}
This code creates a glow, obviously, on whatever movie clip I rollover. What I want to do as well is this:
I want to click on mc "A" and have it launch a different movie clip (let's say "X") on top of everything else (so that A, B and C are still visible in the background). "X" is in a sub-folder of "A" if that makes any sense or is relevant. Same kind of action for mc's B and C. B should launch mc "Y" and C should launch mc "Z".
What is the actionscript for this? Any questions please let me know. Please respond, I need this info as soon as possible. Much appreciated!!
Text
External Movie Clips With Multiple Menu Movie Clips
It's pretty late and I don't think i have enough time to search this question in the forums but here I go. Sorry If I upset someone for making a topic that already exists.
I have a main timeline that im importing an external movie clip in. This external movie clip is named "members" it has several buttons that load other external movie clips into a window within "members" . What do I need to do to make this work. Do I need to use "this, _parent, _root, level(s) or "whatever.swf". If you can help me out that will be great. I'll make it up to you down the road. No sexual favor please.
I'm using flash mx 2004 btw.
Thanks in advanced
How Should I Hide A Movie?
I'm constructing a Flash file which has several movies.
I only want one movie to show at a time.
BUT, I don't want to reload the movies becuase they hold variables which are required for my application.
What I therefore am trying to do is hide each movie that isn't necessary to be on the stage, by changing it's _x or _y value.
Is this a good strategy?
Is it dangerous to do this for some reason?
Can I do it another way?
Or should I be using another method, say using global variables or something?
Any help/opinionswould be really appreciated.
Thanks.
Jam
Can't Hide A Movie... Why?
The following actionscript isn't hiding the
movie (in this case an imported mpeg
saved as an swf). What is missing?
I don't want the movie to begin playing until later and can't seem to start/stop and make it invisible/visible upon my command.
createEmptyMovieClip("empty", 1);
loadMovie("sampleMovie.swf", "empty");
empty._visible = false;
empty._x = 100;
empty._y = 100;
[MX04]Movie That Works Fine When Clips Apart Acts Strange When Clips Are Together.
Hi,
I have a pretty basic movie in which a ball moves along a track.
The track is made up of 3 sections & all I want the movie to do is trace an ID number (num) that is an individual property of that clip when it goes over it.
In the first movie attached below “trackOne” the whole thing works great! However in the other movie “trackTwo” I have moved the clips closer together & the whole thing has gone crazy with the following issues.
1.)The “trace” command fires on every “onEnterClip” event
2.)A text field that is used to show the ID number only changes when the ball is fully over the clip not as it first touches it, as it does in the first movie
3.)Although the ball is full off a clip it keeps tracing it’s ID number together with the new clips number?
Anybody able to help me on this?
Hide And Play Movie
Hi,
I have one button on my main stage, one key frame, and one layer.
I have added an animated movie clip to the mainstage.
When I test movie...everything works perfectly!
I want the movie clip to be hidden and then appear and play when the button is clicked.
How do I do this?
Thanks
Scott
[F8] How To Hide A Movie Clip?
I'm trying to hide a movie clip on a button press. I suppose and I can just have the clip go to a blank frame but I was wondering if there was a different way to do it with actionscripting.
[CS3] Where To Properly Hide A Movie?
I am building a flash VT for 360 swf's, and I need a floorplan to slide into the right side so the user can switch 360's. These are allways full size in the browser window, hopefully maximized. I am not sure where to put the floorplan movie on the stage so that it is always just off screen and only comes when called. Any guidance or suggestions would be greatly appreciated.
Hide Scrollbar In Movie
Hi!!!
I have attached scrollbar to dynamic text.
When I click any main topic, text matter appears. This text matter has scrollbar.
But before clicking main topic, scrollbar already viewed. I can't hide it.
how do I solve this problem?
plz help me.
bye!!!
Hide Movie Clip
i have 50 movic clip (box 10px by 10px) in my flash with the instance name is "test_mc" (all 50 MC same name of instance)
then i write this code
this.createEmptyMovieClip("test_mc", 0);
test_mc._visible = false; // try to hide the movie clip
but when i publish the file only single (1) MC is hide, why is happan
here is i want to hide all my 50 movieclip at a time
can anybody modify tish code or give me new code for tha
[AS2] Is It Possible To End Movie Or At Least Hide It In Browser When It's Done?
Because of SEO considerations I am trying to use flash as little as possible in my site.
I need it though for uploading files. I like to have an accurate progress bar and I find flash is great for this.
Anyway once my file is uploaded, successfully, I would like the flash to go away (either exit or hide itself) and reveal an "Add To Basket" button underneath which is written in HTML.
Failing that, is there a way to get flash to change a CSS style of an object so I could have my Add To basket button hidden and then made visible when the flash tell it?
Thanks
Screwy Stuff With Movie Clips Within Movie Clips
This is kind of difficult to explain but here it goes...
I have created a Barney's like slide site and have gotten it to work fine. the problem I'm having is when I take scroll text box and try to place it on the movie clip that is going to be the part of the site that is going to slide out.
The whole thing slides fine and the scroll box is visible. However, the text is not visible therefore I'm not sure if the up/down buttons are actually working.
The scroll box is a movie clip itself with "on(release)" commands on the buttons. The "onClipEvent" commands are added to the textbox when the scroller movie clip is brought into the slider movie clip.
Is this something that just isn't supposed to work or I am doing some thing dreadfully wrong?
Thanks in advance,
Fakeout
[F8] Help Making Movie Clips Load Other Movie Clips...
well i have miraculously figured out how to make my buttons grow and shrink simultaneously reacting to mouse overs... and even stay large when they are clicked on... however the only way i found to do this was by making them movie clips and not buttons...
now luckily the task at hand i'm assuming will be quite a bit easier than what i've already accomplished...
i am looking to now make those movie clip instances (when clicked on)... load photos into an empty movie clip that will be a separate swf... in the same dreamweaver file...
i have made each photo into a small movie clip that simply tweens the photo from alpha 0 to alpha 100 and back to alpha 0...
so i'm hoping for some code that will call up the first part of the movie clip (the fade up) when the corresponding movie clip is clicked on... and hold it... until another button is clicked... making the current movie clip play to end (fade out)... and then load the new movie (up to the middle... alpha 100) into the empty movie clip...
Intersecting Movie Clips/ Dividing Movie Clips
I've bee trying all day to find out how to find the intersection point on two moive clips with non linear lines in them.
If I use the Hit Test method it seems to recognise only the hit point when the imaginary rectangle arounf the two clips collide. Is there any way of determining the point where the lines themselves cross over.
If not I think I've got another method but I can't figure it all out.
I know at what x point the lines will cross over (the more horizontal of the two lines will be crossed every by one of the verticle lines every 1/108th of it's width) but I can't determine exactly where the Y co-ordinate of this line will be at the time.
I could sort this out if I was able to delete all of the more horizontal move clip except the point of intersection I'm looking for, I'd then then be able to determine the y co-ordinate at this point. But I havn't been able to determine how to delete a move clip for example from x=0 to x=51 but leave the rest of the movie clip on the screen.
Any help with this would be much appreciated.
Cheers
Scifo
Creating Movie Clips Inside Movie Clips
Hello,
I am having difficulties creating movie clips within other movie clips. The following works to create a movie clip on stage with no problems...
Code:
//Create movie clip and load image into it
_level0.createEmptyMovieClip("tn1",this.getnextHighestDepth());
mcl.loadClip(String(albums[0].photos[0].image),"tn1");
However, I want these movie clips inside another movie clip (mcPics1). For this I attempt...
Code:
mcPics1.createEmptyMovieClip("tn2",this.getnextHighestDepth());
mcl.loadClip(String(albums[0].photos[0].image),"myPics1.tn2");
Can anyone tell me where I have went wrong?
Thanks!
Targeting Movie Clips Inside Of Movie Clips
I am a AS3 newbie and am working on an animated cell phone text demo for my company's web site. I have three phones, each are a movie clip with a time line animation. The three phones are all inside of another movie clip where I animate their intro. I have a stop on the first frame of each of the three cell phones so that their screens are static as they fall into place. Their animations begin on the second frame of each of their respective time lines, and I would like the animations to begin when the phones are clicked. I'm not sure if these clips should be targeted from the main time line with the rest of the global script or if it should be on the time line of the nested MC. Even if I knew where to put it, I'm not really sure exactly what the script should be. Please help! My boss wanted this done last week!!!
Movie Clips Controlling Movie Clips, Problem
Hello.
I've been trying to make some drop down menus for awhile and I've run into a snag.
I have a button that when you roll over it, a movie clip appears [jumps to frame 2, frame 1 is blank.] This mc is the drop down menu. The drop down menu mc consists of other buttons that when you roll over them they stay green, but all other buttons go blue. [done by making certain mc jump to frame 2 and others jump to frame 1 to dissappear.]
So this all works fine.
My problem now comes when I try to attach on (release) functionality to the buttons inside the drop down mc. I have the following code on one of the buttons inside the 1st drop down menu:
// Drop down menu colour changes.
on (rollOver) {
_parent.about.gotoAndStop(1);
_parent.what_about.gotoAndStop(1);
_parent.what_else_about.gotoAndStop(1);
_parent.where_about.gotoAndStop(2);
}
// Trying to get wherewestarted movie clip to jump to frame 2 on release.
// Also making other movie clips jump to frame 2 to dissapper.
on (release) {
_parent.wherewestarted.gotoAndStop(2);
_parent.mainlogo.gotoAndStop(2);
_parent.address.gotoAndStop(2);
}
So the on (rollOver) part workds great, and I'm quite pleased with the resluts... however when you click a button in the menu, nothing happens. No movie clips appear, or dissappear. I've tried it without using _parent, I've tried _root... I just don't know what to do.
How can I get a rollover AND a release action?
Help!!
DryCow
How To Make Movie Clips React To Other Movie Clips?
I'm designing this menu system that has four square buttons in a horizontal line. The premise of the menu system is when one button is clicked that button expands horizontally and the other buttons shrink horizontally and slide to the right. How would I go about doing this with actionscript? I'm using Flash 8 and Actionscript 2.0.
Movie Clips Controlling Movie Clips, Problem
Hello.
I've been trying to make some drop down menus for awhile and I've run into a snag.
I have a button that when you roll over it, a movie clip appears [jumps to frame 2, frame 1 is blank.] This mc is the drop down menu. The drop down menu mc consists of other buttons that when you roll over them they stay green, but all other buttons go blue. [done by making certain mc jump to frame 2 and others jump to frame 1 to dissappear.]
So this all works fine.
My problem now comes when I try to attach on (release) functionality to the buttons inside the drop down mc. I have the following code on one of the buttons inside the 1st drop down menu:
// Drop down menu colour changes.
on (rollOver) {
_parent.about.gotoAndStop(1);
_parent.what_about.gotoAndStop(1);
_parent.what_else_about.gotoAndStop(1);
_parent.where_about.gotoAndStop(2);
}
// Trying to get wherewestarted movie clip to jump to frame 2 on release.
// Also making other movie clips jump to frame 2 to dissapper.
on (release) {
_parent.wherewestarted.gotoAndStop(2);
_parent.mainlogo.gotoAndStop(2);
_parent.address.gotoAndStop(2);
}
So the on (rollOver) part workds great, and I'm quite pleased with the resluts... however when you click a button in the menu, nothing happens. No movie clips appear, or dissappear. I've tried it without using _parent, I've tried _root... I just don't know what to do.
How can I get a rollover AND a release action?
Help!!
DryCow
Problems Creating Movie Clips Within Movie Clips
Okay, I'm creating yet another game and need to create a vehicle. So I wanted to create one movie clip for the vehicle and within that movie clip create multiple movie clips for all of the parts.
So I created a new symbol, let's call it vehicle and then within that area I created all of the vehicle parts as symbols within that symbol. At least I think I did. Anyway, when you look at the library, sure enough you see all of parts for the vehicle and the vehicle itself. Within actionscript, however, I can create an instance of the vehicle. I can create instances of all of the parts, but not the vehicle.
The reason why I was going this route is that I wanted more realistic movement. I wanted certain parts of the vehicle to move depending on what the user did, but not other parts. Can anybody shed some light on this subject? Thanks in advance.
Mouse Hide When Movie Load
hi friends
i am new in flash scripting. would you pls like to tell me that how can i hide mouse when movie running and when mouse move movie close. actualy i made screen saver from flash but there are these two problem
1). mouse do not hide.
2). movie do not finish when mouse movie.
thanx in advance
On Buttonhit, Hide A Movie Clip..how?
hi,
I have a button that is going to play movieclipA to introduce a new page. But I want to hide movieclipB when I press the button. Also I want ovieclipB to return after movieclip A is done playing.How do I do that?
A response is appreciated.
calvzz@hotmail.com
Hide And Show The Movie Clip
i made a movieclip as a ball...
i want to make the hide and show with actionscripting...
i want code to desable and unable for movieclip...
[F8] Button To Hide Movie Clip
Hi guys,
I can't get a button to hide a movie that is shown using this code:
Code:
stop();
// convert strings to numbers
col1 = Number(col1);
col2 = Number(col2);
col3 = Number(col3);
// loop and attach movie clips for bar 1
for (x=0; x<col1; x++) {
name = "col1"+x;
_root.attachMovie("col1", name, x);
// set _x and _y of this new attached clip
// note that 15 is just the height (approx) of one block
// these values are arbitrary
with (_root[name]) {
_x = 187;
_y = 566-(6*x);
}
}
The movie is called col1 and has no instance name.
_root.removeMovieclip("col1"); doesn't work.
Any help would be appreciated.
HitArea Hide Movie Clip
Im trying to hide a clip on when one clips collide with another using hit Tes and also hitArea, both of them doesnt work....
I write the following code:
onClipEvent (enterFrame) {
if (_root.guardia, hitTest(_root.quienes)) {
hide == true;
} else {
hide == false;
}
}
Is something there i mess?
best,
IN
Movie Clip Loader And Hide
I want to make this movie clip loader(http://www.kirupa.com/developer/acti...liploader.htm), but i would like it to act like the windows xp(toolbar auto hide) or Mac interface(i.e. it shows up when, say your cursor is at the bottom of the screen or there is a page curl and it half turns a page etc etc.) where it does not show until you do something specific. Get the idea?
Please, any help would be greatly appreciated.Thanks again.
E
|