;

PDA

Click to See Complete Forum and Search --> : Load movie into main timeline form a mc


joca_hdj
04-22-2007, 02:06 PM
hi,
I am trying to load a movie from a movie clip.I used this code on a mc:

mc8.onRollOver=function(){
this.gotoAndPlay(2);
}
mc8.onRollOut=function(){
this.gotoAndStop(1);
}


Now, what i have is couple of buttons inside that movie clip any they just don't work.For instance , i wanna load a new movie into the main timeline by clicking on one of those buttons.But it does not work?What am i doing wrong here?

Here is the link in case i didnt explain it well.

Thanks a lot!!

http://isprobavanje.50webs.com/

blanius
04-22-2007, 03:43 PM
using this inside of a function for mc8 will refer to mc8. Is that what you want?

You say you want to load a movie but I don't see where you are loading anything.

joca_hdj
04-22-2007, 05:18 PM
Hi blanius,
i want load movie button in mc8 to load an external movie.I tryed with load function but it didn't work.I also tryed with geturl, didn't work again.

joca_hdj
04-22-2007, 06:13 PM
Right, i have a button inside a movie clip and when i tell it to load an external movie, it wont do it.

blanius
04-22-2007, 06:22 PM
Ok still a little short on information.... But I'll take a stab at it.

you want mc8 to load a external clip into the main timeline I think... Note that this will remove the movie mc8 as well I believe if it's a child of the main timeline.


mc1.onRelease=function(){
_root.loadMovie("mymovie.swf")
}

joca_hdj
04-22-2007, 07:30 PM
Thank you for your swift reply, it worked well but its not what i wanted.Now i have an mc that loads external movie.But i wanted buttons i had in that mc to load external movies.
I can't get those buttons to work.Is there a solution to this problem.I used clips as buttons movie clip and i put some buttons in it which were supposed to load some external movies.

something like this if this kind of code is possible:

mc1.btn1.onRelease=function(){
_root.loadMovie("mymovie.swf")
}

Which i doubt it is!

Thanks for your time and help!

blanius
04-22-2007, 09:24 PM
Well that's what I said would happen.... Think of movies as containers, this includes the root movie, which you generally would not want to load anything into. What you want to do then is have an empty movie clip and perhaps name it "container" then in your buttons assignments (assuming that you are putting the AS in the main timeline) would look like:

mc1.onRelease=function(){
_root.container.loadMovie("mymovie.swf")
}

joca_hdj
04-23-2007, 08:01 AM
I spent couple of hours trying to figure out this.I put the website i am working at
here (http://isprobavanje.50webs.com) so if you can just take a look.
All of my buttons inside "about us" mc load the same movie which i dont want.And when it loads it, why is my loaded movie in the left lower corner.

Thanks a lot!

bobgodwin
04-23-2007, 12:18 PM
Can you post the .fun files. I have a feeling this is a path problem.

joca_hdj
04-23-2007, 01:49 PM
Here is my drop down menu .fun file and one swf i want to load when "button 1" is pressed.
Even geturl would be fine if i just could get it working.

Any ideas?

joca_hdj
04-23-2007, 03:44 PM
I think that mouse does not see my buttons in the movie clip and i have no idea how to override that.

bobgodwin
04-23-2007, 04:39 PM
I was thinking of the file with the buttons, not the file that needs to be loaded.

joca_hdj
04-23-2007, 04:42 PM
what do u mean?buttons are inside "about us" mc?

bobgodwin
04-23-2007, 07:46 PM
Well, the whole thing has me confused. Maybe conflicting mouse statement between the mc & the button inside it?

blanius
04-24-2007, 09:43 AM
Wow, Ok you have a rollover action in clip that shows three buttons and then in the Actionscript you refer to btn6 but there is no btn6 in that clip.....

I suggest you first delete ALL of the scripts then NAME your movieclips and buttons to avoid confusion. Then write your scripts using the names. Remember to think of ALL movie clips as containers and you have to be specific about where they are when referring to them in script. For example if the button is IN mc1 then from the root time line it's mc1.btn1..

Look in the koolexchange.com and you'll see a couple of templates that do exactly what you are trying to do. They should get you going. There are like three from Laurence Henshall and one or two by AntZ and at least one by me there.

joca_hdj
04-24-2007, 06:10 PM
Thank you blanius for your answers!I did look in the koolexchange and i noticed that all the drop down menus are "on release".There is no any onrollOver example.So i decided to put the menu in the movie clip and put go to frame actions on buttons.That worked well, though it's not rollover thing, but never mind.It is kool anyway.
Have anybody ever played with onrollover drop down menus?
When i tried using Chris's movie clip as button code,i just couldn't get to the buttons inside the movie clip.I have no idea why!I ve tried everything i knew.I got an impression that mouse did not "see" the buttons inside a clip.

Anyway, thanks for your time and help!