What's Wrong With Movie Clip?
how can it be that a movie clip once i dragged it on the main stage (in one frame) is fine BUT as soon as i add another frame to it, it gets screwed! (parts of it move 2 milimeters to the right and it looks like it hasn't been aligned probperly) is that a memory problem?! (my .fla file is 1.7MB and the .swf file is 336KB)
what can i do?
thanx, sobee
FlashKit > Flash Help > Flash ActionScript
Posted on: 04-17-2002, 11:18 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
What's Wrong With My Movie Clip?
I have a problem with a movie clip that won't play.
It's a photo viewer that's supposed to be placed inside a scene with other frames and a movie clip rolldown menu. It all works fine, except this one movie clip/photo viewer. All other links and frames work, but when I go to the frame with this particular mc, the page appears, but it's dead - no motion.
When I take the mc out of the scene and place it in a separate file and link to it with a getURL, it works fine.
I don't think there's a flaw in the code itself, as it works fine in its separate file, but something is wrong somewhere:
Code placed in link to frame with mc:
this.btn_kollektion.onRelease = function () {
_root.gotoAndStop( "page_kollektion");
}
Code in first frame of mc (contains photo viewer, basically sets up the page, this works fine, as it gets the data and sets it up fine):
//nr of pieces
pieces = 11;
//start location (x) of large slider
startLoc = 99.9
function floatTo(thePiece) {
//calc targetLocation of dragger
DraggerTargetLoc = small._x + (thePiece * smallPieceWidth) - (smallPieceWidth / 1)
//correction of previous formula
// position of the slider
DraggerTargetLoc = DraggerTargetLoc * 1.000
//calc targetLocation of large slider
LargeSliderTargetLoc = startLoc - (thePiece * largePieceWidth) + largePieceWidth
//correction
// position of the large slider
LargeSliderTargetLoc = LargeSliderTargetLoc * 1.0002
}
Code in a frame of "small slider", which displays small images of photos:
onClipEvent (load) {
// calc width of one small piece (used at root level)
_root.smallPieceWidth = _width/_root.pieces;
}
//tip:
//change to "mouseUp" if you want the user to click before floating ...
onClipEvent (mouseMove) {
// check if we hit the small slider
if (this.hitTest(_root._xMouse, _root._yMouse)) {
// get the clicked pieceNr
pieceNr = Math.ceil(_xmouse/(_width/_root.pieces));
// call function in actions layer at the root
_root.floatTo(pieceNr);
}
}
Code in frame of "large slider", which rolls the large images in place:
onClipEvent (load) {
// calc width of one large piece (used at root level)
_root.largePieceWidth = _width/_root.pieces;
}
onClipEvent (enterFrame) {
// calc new dx
// last number is how blurry the motionblur will get. Larger number, less blur
dx = (_root.LargeSliderTargetLoc - _x) / 2.9
// update location of dragger
_x = _x+dx;
}
Hope you can help
Random Movie Clip, What's Wrong Here?
I need to place a random room to the left of my character "man".
It worked when I used 1 room and specified its exact name, but now I'm trying to use a variable as the number of the room (hence the +pickroom bit - pickroom being my variable)
They are all named room1 room2 room3 etc.
here's what I got so far - this code does nothing at all as it is - Im missing something..?
code: if (moveman="left") {
set("_root.room"+pickroom._x, _root.Man._x-22);
set("_root.room"+pickroom._y, _root.Man._y-19);
set("_root.room"+pickroom._rotation, _root.Man._rotation+90);
gotoAndPlay(5);
It worked like this
code: _root.room._y, _root.Man._y-19
when I change it to be an expression it put the 'set' part, then doesnt work anymore, am bit confused.
Button In Movie Clip Linking To Wrong Scene
What do I need to add or change to the code below to allow the button to link outside of the movie clip but still in the same scene.
I have a button in a movie which will link to the frame I assign it with the following code but in the wrong scene:
on (press) {
_root.gotoAndPlay (127);
}
The 1st scene I have is an intro scene lets call it (X) with like a cool intro movie clip and the second scene has all the content lets call it (Y).
The button in the movie clip in scene (Y) with the code above attached to to the button links to scene (X). I need it to link to scene Y. I assume that the code above consders scene (X) to be the _root which it is.
What do I need to add or change to the code above to allow the button to link outside of the movie clip but still in the same scene.
Thanks
Bassdog
Changing Movie Clip Color ..whats Wrong With This Code?
Hi
I'm getting the movie clip name from access database through ASP which is a string. I have one frame in
my movie. The command txtTest.text= this.path is dispalying the retriebed value from teh database. So
data coming into the flash movie is not a prolem. So why is the movie clip color not changing?
Can anyone help me regarding this?
Thanks in advance.
------------------
Action Script
-----------------
stop();
this.onEnterFrame=function() {
sendDir=new LoadVars();
getDir=new LoadVars();
getDir.onLoad=function(){
myColor = new Color(this.path);
myColor.setRGB(0x006666);
txtTest.text= this.path;
};
sendDir.sendAndLoad("http://test/testNew.asp",getDir);
}
Making A Movie Clip In A Movie Clip Go To The Next Frame Of The Original Movie Clip
I have a movie clip (for simplicity I'll call it movie_a) in movie_a I have another movie clip movie_b.
in movie_a i have a button that when pressed makes movie_b play (it has a stop frame every once in a while so the button acts as a "next" button)
I want it so that when i get to the last frame of movie_b and press the button, it will go to the next frame of movie_a
I hope that doesn't confuse u and u can help me solve this problem, as i am stumped and I've tried everything I could think of (which isn't that much as I'm not too good with actionscript)
thnx
Audio Clip Plays In Wrong Place
On my main timeline I have a MC called logo
within this MC, I have another MC called lightning placed on frame 99. At the end of the MC lightning, I have this code:
_parent.play("portfolio2"); stop();
which sends the viewer to a frame labled "portfolio2" (frame 100)
On frames 100 - 109, I have another MC with several buttons. The problem is that a few of these buttons, not all of them, when pressed, trigger the audio clip from the MC lightning that sits solely on frame 99. The buttons do not exist on frame 99 and the MC does not exist on any frame higher than 99.
How can I keep this audio from triggering when the buttons are pressed?
Thanks
Truble With A Film Clip - Help Whats Wrong?
Hi or help
Found this movieclip in here, and using it as a template for my menu.
But I have added a feature to the marker - its a movieclip that fades out after a while.
And that works fine as long as you click before the child clip stops.
When it stops I cant click on the nighbour button - if ido it dosnt show at all but if i choose another button it works??????????
I get crasy grrrrrrr!!&%#&%/&&%¤&!!!!! over this problem.
Anyone have had problems with childclips that dosent start????
Se attached file
Problem Removing Child/wrong Clip Loads
OK, I'm getting a bizarre bug that I can't seem to find a solution to, maybe I'm missing something.
Basically, if I'm in section 1, a button tells section 1 to load up a diagram specific to section 1. It also checks to see if section 2 is loaded, and removes it.
It I'm in section 2, a button tells section 2 to load up a diagram specific to section 2. It also checks to see if section 1 is loaded, and removes it.
If I'm in neither, the button goes away.
So, on first load, that all works fine.
Here's where bug begins:
User goes from section 1, to section 1 diagram, to section 2, to section 2 diagram, back to section 1, section 1 diagram. Section 1 loads up, but section 1 diagram gets replaced with section 2 diagram.
Again, this only happens after I've clicked on each one once. If I go from section 1, to section 1 diagram, to a section without a diagram, back to section 1 diagram, that all works.
Sorry if this sounds confusing, but it's part of a very large app that I can't upload.
Here's a snippet of code. See anything glaring that I'm missing?
ActionScript Code:
if(section == "Section 1"){
btn.visible = true;
btn.btnTxt.text = "Section 1";
btn.addEventListener(MouseEvent.CLICK, loadSection1Diagram);
}else if (section == "Section 2"){
btn.visible = true;
btn.btnTxt.text = "Section 2";
btn.addEventListener(MouseEvent.CLICK, loadSection2Diagram);
}else{
btn.visible = false;
}
private function loadSection1Diagram(e:MouseEvent) {
//check to see if any diagrams are still loaded and remove them
if(section2 && contains(section2)){
removeChild(section2)
}
section1 = new SectionDiagram;
addChild(section1);
}
}
private function loadSection2Diagram(e:MouseEvent) {
//check to see if any diagrams are still loaded and remove them
if(section1 && contains(section1)){
removeChild(section1)
}
section2 = new SectionDiagram;
addChild(section2);
}
}
Movie Clip Buttons Nested Inside Movie Clip Dont Work
Hi people!
im having a problem here.
in my first frame i have a movie clip named "menu_mc".
i have this AS for this movie:
Code:
this.menu_mc.onRollOver = function() {
menu_mc.gotoAndPlay(8);
}
this.menu_mc.onRollOut = function() {
menu_mc.gotoAndStop(7);
}
thats working ok, the menu_mc plays on rollover from frame 8 till frame 12 where stops.
On frame 12 (this is inside the menu_mc movie clip) i have another movie clip, named button1_mc.
and also i have AS controling that MC:
Code:
this.button1_mc.onRelease = function() {
getURL("index.htm", "_self");
}
The problem is that when i rollOver on menu_mc it work fine and the button1 appears, the problem is when i try to click button1...
doesnt work.
the swf you can see it on www.wt.com.mx/menu.swf
can anybody help me please?
what im doing wrong?
or what other ideas can you give me so i can make that work.
thanks!
Mouse Rollover On One Movie Clip Increase Decrease Alpha Of Another Movie Clip..
So I really haven't messed with Actionscript much for a couple years and here is my issue.
I have several movieclips I put together that will eventually be a menu for my website. When you roll over a menu option (movieclip) I am trying to get another movie clip to fade in giving the description of the menu item.
For example - when you roll your mouse over the 'Live Chat' option a brief text description would appear telling you what the live chat is about. This description is a seperate movie clip appearing away from the original menu.
I have made the movieclips for the menu and the movie clips for the descriptions. I tried this action on the menu option to get the description to fade in:
Code:
onClipEvent (load) {
this._parent.mc_text_discussionBoard._alpha = 0;
}
onClipEvent (enterFrame) {
this.onRollOver = function() {
if (this._parent.mc_text_discussionBoard._alpha<100) {
this._parent.mc_text_discussionBoard._alpha += 5;
}
};
}
But the alpha only increases on the description (mc_text_discussionBoard) by 5 when I keep rolling my move over and out and over again. It makes sense why it does that, but I'm not exaclty sure how to get it to continually increase the alpha by 5.
any help would be great and I am anxiously waiting to get this solved!
Kevin
Code 4 MovieClip Button To Load A Movie Clip Into A Placeholder Movie Clip.
Yeah that title sounds a little confusing...so i will explain:
Is there a way to tell a "movie clip button" that once it is clicked on to load a "movie clip" into a "movie clip placeholder". So instead of loading an external swf into the placeholder, it will be a movie clip from within the same library. Putting every single custom clip on the timeline would take a while, so that is why I thought it would be easier like this, and the other movie clips are not that large that I want to load into it so there is no need for external swfs, trying to keep it clean. Here is the code along the lines I am trying to go for.
__________________________________________
this.profile_mc.onRelease = function() {
placeholder_mc.loadMovie("profileSection_mc","plac eholder_mc","_root.content");
}
__________________________________________
- "profile_mc is the button I am trying to activate to load the
"profileSection_mc" into the "placeholder_mc". but so far no good.
- the movie clips are within the same library, not on the timeline or external library.
- Is this possible?
Using A Button In A Movie Clip To Control The Movie(and Not Movie Clip) Timeline
Ok i have a button placed in a movie clip. I want this button, when released, to go in another scene, frame one, on the movie(scene) timeline and not on the movie clip timeline.
So i tried: gotoAndPlay("mission", 1); (mission is the name of my scene)
But it goes to the frame 1 of my movie clip, It would be great if someone could tell me how i can control the movie timeline while my button is in a movie clip
thaks
Vakarm
How To 'stop' A Movie Clip Within A Movie Clip Within A Movie Clip Loop
I've done searches, laughed, cried, and punched holes through the wall, but I can't figure this out.
I'm in Flash MX (pro) and I have a MovieClip on my main timeline (frame 1). Inside that clip is another animation (the static animation scrolling across the screen), and another inside of it of the static animation (6 characters on a train each animated uniquely).
Confused yet? Ha! OK, so I just want the damned animation on the main timeline to run once and then stop (or to 270 frames). I've tried:
myMovieClip.stop()
to no avail. I've tried attaching the script to the movie clip itself, and also to the frame.
Any suggestions?
Making A Draggable Movie Clip Control The Location Of Another Movie Clip
http://www.kineticz.net/jba/residental.jpg that is a picture of what i am trying to do. the white bar at the bottom is the draggable movie clip and the group of 3 pictures right above that is the movie clip that i am trying to control w/ the draggable clip. I am having trouble writing a script that will do this. any help you can give will be much appreciated.
A Button Inside A Movie Clip, Within A Movie Clip, Calling Another Scene:
Is it even possible?
I have been trying to do it for the last few days for a site I am working on.
I have done searches in many forums and it's foolish looking for an answer that way, because quite frankly every thread I opened was something to do with LoadMovie or GetURL, etc.
What I have right now is on the button in my Menu Bar Movie Clip:
on (release) {
gotoAndPlay(285);
}
Which plays a fancy little animation in the movie clip and then on the last frame of that movie clip I had:
gotoAndPlay("Contact", 1);
Which is the Scene for the "Contact Us" Scene named "Contact"
One would think that it would load up the scene and play at frame 1, however all that happens is it reloads the movie clip of the "Menu Bar" at frame 1 and starts over, not even realizing what I asked.
Anyways, I figured there's a script or something that tells it to look outside of the movie clip or to the _Root, or whatever.
If someone has a solution, it would be greatly appreciated.
Sorry I have no example to show, since I have yet to upload it. (It's my company's web site, and I don't think customers would want to see some half-arsed web site that's not complete.
Thanks in advance.
On Mouseover Show Movie Clip, On Mouseout Close Movie Clip *HELP*
Basically what I am trying to do is this...
I have a movie clip that is a name. When you put your mouseover the name I want another movie clip to display to the right of the name. This clip has a photo and bio of the person.
The photo and bio have an animation that fades it in and an animation to fade it out. I have 5 frames for the fade in, then stop frame, then 5 frames for the fade out.
What actionscript do I need to use to make that second movie clip load when a user mousesover the name (first movie clip) and to make the second half of the second movie clip play when the user removes their mouse from name (first movie clip).
NOTE: I tried using loadMovie and unLoad movie but I couldn't do it loading another swf. The reason being this is already an swf loaded inside a main movie. I guess you can't load an swf inside an swf that's already loaded inside an swf. I hope this all makes sense!
I appreicate all the help!
Thanks a lot!
Create An Empty Movie Clip Inside An Existing Movie Clip?
I'm making sort of a tabbed navigation scheme by reading the data for each tab in from an XML file. What I'm wondering is if it's possible to use createEmptyMovieClip() to make a new empty movie clip inside a movie clip that already exists on the stage.
Using
ActionScript Code:
m_anchor.loadMovie(bg_image);
works as I would expect. bg_image is just the relative path to an image file, and m_anchor is a movieclip already on the stage. However, doing a similar thing:
ActionScript Code:
m_anchor.createEmptyMovieClip("textbox", this.getNextHighestDepth());
and then drawing a shape (a rounded rectangle, which I then want to put text on top of) doesn't work. It works if I just say "this.createEmptyMovieClip" instead of attempting to create it inside the m_anchor clip, but if I do that, the "textbox" is created at the root level and I can't unload it along with everything else in the "m_anchor" clip. Is it possible to create a new empty movie clip inside of one that is already on the stage?
Thanks!
Load An Internal Movie Clip To An Empty Movie Clip On The Stage
Can any of you shed some light as to why this is not working:
on (release) {
emptyMC.attachMovie("mrimc","instance1",this.getNe xtHighestDepth());
}
what I want to have happen is when the user clicks a button it loads the mirmc into emptyMC on the stage.
I have double checked that my empty movie clip does indeed have an instance name of emptyMC and that the movie I want to load into does in fact have the name mrimc in the library. Any ideas?
Problem Getting Movie Clip Inside Of Movie Clip To Face Mouse
I used the code below to make a movie clip face the mouse, it works when I use it on a movie clip that's not embedded in another movie clip, but when I used it on an embedded movie clip, it's axis seems to change.
Attach Code
var stickGun:MovieClip = this.stick_holder.stickGun_mc;
//stick_holder.stick_mc.stickGun_mc
stage.addEventListener(Event.ENTER_FRAME, onMove);
//stick_holder.stick_mc.stickGun_mc.addEventListener(MouseEvent.MOUSE_MOVE, onMove);
function onMove(event:Event):void {
// get the radian value of the angle between the clip and the mouse...
var myRadians:Number = Math.atan2(mouseY - stickGun.y, mouseX - stickGun.x);
// convert it to degrees...
var myDegrees:Number = Math.round((myRadians * 180 / Math.PI));
// get the horizontal and vertical distance between the clip and the mouse...
// rotate the clip toward the mouse...
stickGun.rotation = myDegrees;
}
Placing Actionscript Movie Clip Inside A Movie Clip Symbol
I'm loading an external image into an empty actionscript movie clip (holder1) using MovieClipLoader(); on frame one of my movie and is invisible. Then when the movie plays, there is an empty movie clip symbol (image1_mc) that is placed manually on the stage within another movie clip symbol (flash_mc), and is also on a bottom layer of a mask layer which is animated. Is it possible to place "holder1" inside of "image1_mc" so that I can treat it as if it were an embedded image? In other words, have the image in "holder1" inside of the manually placed movie clip symbol "image1_mc" so that I can use it like a regular symbol on the stage?
How Can I A Movie Clip Splash Prior To Attaching The Choose Movie Clip..Help
I have a presentation which I would like to publish on CD. What I want is to have movies attached to the container_mc on the stage upon clicking the desired navigation buttone. But before movie gets attached, I would like to have a logo_mc animation (from the library) to play itself before playing the selected clip.
I think I need to write up a function which will call the animation splash clip prior to attaching the clicked movie.
Appreaciate all the help.
Thanks so much.
Control Movie Clip In Container From Button Inside Other Movie Clip
There are three movie clips involved in this question.
1. A main movie clip that has a target empty movie clip where an external swf loads.
2. A menu movie clip that is built from button symbols and has its own timeline.
3. The external movie.
When a user clicks on the menu, the external swf loads into the empty movie clip target. This part works fine. Here's the code:
on (release) {
loadMovie ("Lesson1.swf", "_root.container");
}
I want to use one external swf for all lesson, versus 20 external swfs. The problem I'm having is controling at what frame the external swf loads. I've tried adding --gotoAndStop (15) -- for example. I've also tried adding, gotoAndStop "_root.container" (15), but that doesn't work either. The gotoAndStop action ends up controlling the menu movie clip timeline instead of the movie loaded into the container. I figure this is because the menu mc has "embedded" buttons and it's own timeline.
Any help you can offer will be much appreciated.
Thanks
Sheila
Creating A Button To Open A Movie Clip From Inside A Movie Clip?
I'm using a hexagon menu to display some images. One image is placed on each slide of the hexagon menu (which can then be rotated left and right to see other "slides").
What I want to do now is to be able to click on the object (image) as a button and for it to go to another scene which shows the image blown up and some description next to it (which is another movie)
I have tried the following which doesn't seem to work:
Created an invisible button (or choosing the image as a button) and having
on(release) {
gotoAndPlay("scene 5", 1);
}
this doesn't work when I use it over the hexagonal menu, but when I move the button to somewhere else on the screen (not over the movie) it works.
Please can someone help with this - Ive been working on it flat out over the weekend and desperately want to make it work. any ideas would be appreciated!! thank you
Loading External Movie Clip With A Button Inside Another Movie Clip Help
Hi,
I am working on a scrolling thumbnail movie clip, that when you click on the thumbnail button inside the movie clip it will load an external movie clip. I have an empty movie clip on the main stage, and have been trying all sorts of code, but for some reason it doesn't like that I am inside a movie clip using buttons. It can't seem to find the external swf.
I have tried:
on (release) {
loadMovie (ithink.swf, "loader");
and
on (release) }
if (firstTime == true) {
loadMovie("ithink.swf", _root.loader);
firstTime = false;
} else {
_root.clicked = "ithink.swf";
_root.loader.gotoAndPlay("goback");
}
}
and so far nothing, for some reaosn when I click on a button outside of the movie clip with the above code it loads... and than the other works too, but if I click on the buttons inside the scolling movie clip first they won't work.
Any suggests or ideas!!?
I would really appreciate it... I am beyond frusterated!!
Using A Movie Clip Inside A Movie Clip To Start A Frame Of An MC Inside A Movie Clip
Situation:
I have a movie clip inside a movie clip with a button inside of it.
This button on release goes to a different movie clip(svideo) in a different frame on the maintime. This movie clip has a movie clip(portfolio) inside of it.
Okay: I use an absolute path on the aforementioned button
on release
_root.svideo.portfolio.gotoAndPlay(60);
But, for some reason Flash won't go to frame 60 of the portfolio movie clip that is inside of the svideo.
I have tried numerous variations on reaching frame 60 of portfolio. Like going to the maintime line and going to the portfolio MC. Also, portfolio and svideo are the instance names and not the name of the actual movie clip.
If anybody could help, I would appreciate it. Thanks.
A Button Inside A Movie Clip To Move Another Movie Clip
I'm building a web page and I have a button that I need to make two movie clips play. The button is inside one movie clip and in addition to it playing I want it to make another movie clip play. It doesn't seem to recognize the movie clip target names. Any help as to how this can be done would be much appriciated.
Thanx
Movie Clip Tween From A Random Point To Another Movie Clip?
ok...
on a website I am trying to make...i have a rotating E (lowercase)
it flips around and does all kindsa crap
but when a person clicks on a button, i want it to tween from whatever frame it is on, to where all 3 of them line up and do a little flashy type thing
ei:
e#1 - upside down and backwards
e#2 - sideways and rotating on the y axis
e#3 - rotating on the x axis
now i want all of these to tween from the point they are at to a specific order....so they are all flat (ei: they look like this "e")
how the heck do i do this?!? i know i have seen it somewhere!!
Duplicate Movie Clip / Remove Movie Clip Woes
I have built a an MC that will Duplicate an MC it does this a specified 114 times.
Once all of the MCs are in the Movie I want to pick a movie clip and remove it randomly. I am doing this now but It takes to long because it is looking for numbers that are no longer existant instead of just going for the ones that are already there.
I was talking to one of the programmers at my work and he was telling me to build an array that adds in a each duplicate mc name
for instance
amount = 1
I have 114 boxes each box as it is duplicated gets renamed box + amount
amount + 1
until it gets to 114
then it looks for each box1 - box 114 and gets rid of each box 1 - 114
But how could I get it so I remove lets say box 84 it wont look for 84 for any more
I was thinking
I dynamically rename every mc > 85 to name amount - 1
and have it randomly look for 113 the next time around and so on til it finally gets to zero...
Any one have any suggestions for me?
Or if you can point me in a direction that would be good as well
Thanks a bunch
Target Host Movie Clip From Loaded Movie Clip.
Hi all.
I have a movie clip loaded into my main movie. This movie clip is the INTRO of the website. What want is that when this INTRO ends it should tell the main movie to go to the next scene of the movie. I tried _parent.nextScene() but it is not working. Please help me as I need it badly and urgently.
Thanks.
Zee
P.S: Btw this is my first ever post on FlashKit so I hope to have a great time here!
Making A Movie Clip Stop When Colliding With Another Movie Clip....
OK I have a stage are which is surrounded by walls on all four sides, (wall_left , wall_right , wall_top , and wall_bottom.) Also, I have a character which is named "Omekk" (Some fag name I made up.) I can control 'omekk' with the keys, but I don't quite understand the hitTest function. I am using flash MX. On the left wall I put the code
Code:
onClipEvent (load) {
Omekk.hitTest(wall_left);
}
and the top wall I put:
Code:
onClipEvent (load) {
Omekk.hitTest(wall_top);
}
...and so on and so forth. The problem is, when I test the movie, the character STILL goes through the wall... What's up with that? Are there more actions that I have to put on the wall? Actions on Omekk himself? Error in the syntax? What is it??
If someone helps, I'd be SOOOOO happy. I feel like such a moron because I can NEVER understand this. I'm about to just give up flash if I don't get it... I suck and I can never get the hang of it.
Sorry,
Josh
A Little Confused, Navigation Movie Clip Works Within One Movie Clip But Not Another.
I have a movie clip called “BottomMenuMC.” This movie clip has three button, “Home”, “Contact Me”, and “Quit”. The “Home” button is giving me the problems. The home instance has the following code:
on (release) {
_root.MainIntroMC.gotoAndPlay("Quote1");
}
When I place “BottomMenuMC with in the Movie Clip “Design” it works great. When I do the same thing, placing it in another movie clip, “Animation” it does not work at all.
Both “Design” and “Animation” are movie clips that run off the main timeline.
Any Suggestions why this would work in one and not the other? I am using Flash MX 2004.
And are any of you finding Flash MX 2004 buggy?
Controlling A Movie Clip From A Button Inside Another Movie Clip.
I'm confusing myself just typing this.
I'm working on an interactive map. The map itself is a MC inside a container, but also contains all the buttons as well. On my main stage(scene 1 and menu) is a window(MC) that will show info and photo of building. Now if I create a button on the main stage I can control the movieclip(images) easily. But when I use a button from inside map(MC) it doesn't seem to recognize the (images.gotoAndStop(frame))command.
I'm just not sure what to put in order to be able to control the MC's timeline from within that map movieclip.
Sorry if this is confusing. Of course at the same time it might be a simple solution for most people here as well. At least that is what I'm hoping anyways.
Controlling The Playhead In A Movie Clip Via Buttons In Another Movie Clip
Alright, first off, I've tried literally everything I can think of, and all of the scripting looks perfect (from what I understand), so I can't think of what could possibly be wrong with the script.
Here's some information upfront about where these movie clips are located:
Main Timeline > tv_mc
Main Timeline > menu > menu2 (buttons controlling tv_mc are located here)
(Note: menu2 is a graphic, not a movie clip. It was only made so that I could move the menu itself without tweening several layers.)
Here's what I want to accomplish:
I want the buttons inside of menu2 to control the playhead in tv_mc, a movie clip. The first 25 frames of tv_mc are just the "stage" moving into view so that the information can be displayed.
There are five buttons in menu2 containing the following script:
Code:
on (release, releaseOutside) {
if (!mainwindow) {
_level0.tv_mc.gotoAndPlay(1);
mainwindow=1;
_level0.tv_mc.set(framenext, bio);
} else if (mainwindow==1) {
_level0.tv_mc.gotoAndStop(bio);
}
}
"bio" is the name of the frame in tv_mc. Basically, what I want this to do is check and see if the "stage" is already viewable, and if it isn't, to display the stage and then display the information as well, which is the purpose of storing the frame name in "framenext".
tv_mc also has this code:
Code:
if (!framenext) {
stop();
} else {
gotoAndStop(framenext);
}
At the moment, the menu buttons work to display tv_mc, but wont move the playhead past 25. I'm guessing that the "framenext" variable is somehow not getting any information, or not getting any information across to tv_mc from menu2.
I'm really effing lost at this point. Any help at all? I'd post the .fla, but the size is pretty big. :T
Control A Movie Clip From A Drag N Drop Movie Clip
I need a script that allows the user to control the timeline of a MC from a drag-able MC.
Basically I want a MC that drags is constrained to the x position with a limited movement of say 100 Pixels, as the drag MC is moved along it controls the play position of a tween in a different MC.
So when you push the Drag MC back and forth it moves the second MC play position back and forth.
a great example of this is at http://fable.lionhead.com/fable.html
on the pop up book parts
Making Another Movie Clip Close From Inside A Movie Clip
I want to make another movie clip close that is open when this other movie clip comes up. I put on the first frame of this actionscript:
_root.detail.gotoAndPlay(19);
This works, but only if the other clip is already open. If not it just shows the other clip closing even though it isn't open. Is there a way to do something like...
If _root.detail is on frame 8 then _root.detail.gotoAndPlay(19);
Obviously thats not the action script but it's what im trying to express.
"detail" is the movie clip property name of the clip I'm trying to close.
Thanks for your help!
Creating Empty Movie Clip Inside Movie Clip
Hi,
i'm using this script to make an empty movie clip
_root.createEmptyMovieClip
but i am trying to make this empty clip from inside a movie clip. Not from the root time line. HOw do i go about this?
Assigning Function To Movie Clip, Inside Of Movie Clip Help
good morning all,
I have a quick question which has been bugging me this morning. Basically I am trying to assign a function to a emtpy movie clip, which loads a external
.swf, which it self is inside a large, emtpy movie clip.
Code:
//---------------------------------START FUNCTION---------------------------------
//loading of "product_window" - main banner of the different products
function product_window_load() {
_root.createEmptyMovieClip("product_section", this.getNextHighestDepth());
// this creates the movie clip in which contains the seperate "product_window"'s
//---------------------------------START LOOP---------------------------------
for (i=1;i<=_root.product_window_No;i++){
//function to call up loading
_root.product_window_name = "colour"+i+".swf"
//this defines the name of ".swf" of the "product_window" being loaded
_root.product_window = "_root.product_window"+_root.product_window_id;
//defines name of "product_window"
_root.product_section.createEmptyMovieClip(_root.product_window, i);
//creates blank movie clip which will subsequently load the individual product .swf's
_root.product_section[_root.product_window].loadMovie(_root.product_window_name);
//loads the ".swf" file, the name is determined by the variable "_root.product_window_name"
//----------------------START FUNCTION----------------------
_root.product_section[_root.product_window].onRollOver = function () {
trace ("onRollOver called " + _root.product_window);
};
//----------------------END FUNCTION----------------------
_root.product_window_id ++ ;
//increases the value of "product_window" by 1
Code:
_root.product_section[_root.product_window].onRollOver = function () {
trace ("onRollOver called " + _root.product_window);
};
does not work
but if i just target the the main empty movie clip which contains all the other ones, it works fine.
Code:
_root.product_section.onRollOver = function () {
trace ("onRollOver called " + _root.product_window);
};
I know i can proably get this to work using duplicate movie clip and cretaing a physicl movie clip on stage, but i was curious whether i can assing a function to a movie clip inside a movie clip
any help on this would be great
thanks
-smokey
ps. i know its not the smoothest coding, but its been like 3-4 years since ive been using flash
Link From One Movie Clip To Specific Frame Within Another Movie Clip
Hello,
I've been working on this problem on and off for weeks now, and am hoping I could get some assistance, as it is driving me batty and my deadline is quickly approaching. Here is the basic setup:
I am creating a Flash webpage. I created a Flash movie with 6 frames, with a movie clip on each frame, each movie clip being a single page of the website. What I would like to do is have button within one movie clip (say a button in the movie "contact" which is frame 5 of the main movie) link to a frame within another movie clip (say frame 3 called "project3" within the movieclip "portfolio" which is frame 2 of the main movie).
With all my efforts, I am only able to get the button to go to and play the called movie clip at frame 1, and no other frame number or label.
I have tried codes such as the following:
on (release){
this._parent.portfolio.gotoAndStop("project3");
}
on (release){
_root.portfolio.gotoAndStop("project3");
}
... and countless other options, but nothing seems to work. I would greatly appreciate any assistance with this matter. For the record, I admittedly do not know much Flash and am learning most of this on my own with a small base knowledge from a design class I took years ago using UltraDelv! Please let me know if I need to go into further detail.
Cheers!
[CS3.AS2] Button In A Movie Clip Link To Another Movie Clip And Play
what im doing is that making a button in a movie clip link to another movie and play/stop certain parts of that clip
lets say that there are 4 buttons are in movieA, and the other clip is called movieB
when the user clicks button1 in movieA, movieB will play from frame 1 to 5 and stop.
when user clicks button2 in movieA, movieB will play from frame 5 to 10.
and so on
so far my code for button1 is:
on (release){
this._parent.movieB.gotoAndStop(5);
}
on (release){
_root.movieB.gotoAndStop(5);
}
button2:
on (release){
this._parent.movieB.gotoAndStop(10);
}
on (release){
_root.movieB.gotoAndStop(10);
}
with this code, it just jumps to the designated frame.
what i want is to have it play from current frame to a designated frame
can anyone shed some light on this?
Remove Movie Clip And Attach Random Movie Clip
Hi: I am trying to create a mini game where there are pods of equations in which players must solve in order to make the pod disappear. Once a pod disappear a new one appears.
Attached is my .fla file so far- but I have been having trouble trying to remove movie clips once the player has solved the equation, and then attaching a random movie clip in the same location. I've been trying to use an if then statement but I'm not really sure? I also placed a removemovieclip at the end of a movieclip. I'm fairly new to actionscript.
So if anyone can help me with that I would really appreciate it. I am looking to finish this project in the next day or two!!
Thanks in advance.
Place Movie Clip Button Inside Movie Clip
Hi, I have searched the forum but cannot find exactly what I am looking for.
I have a movie clip of a map that I can zoom and drag and what I would like to do if possible is to have several other movie clips inside the first movie clip which when clicked go to and play at a given frame number on the timeline where a photo is displayed.
The 'several' movie clips will be small flashing red circles. Each one represents a place of interest and when clicked will display a photo of the place of interest.
|