|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
paths
hello everyone, im new to flash but not a computer newbie, i already do development and decided to give flash a whirl and so far i like
![]() but one thing is really getting on my nerves. I have come to the stage where i am starting to break up my files into multiple swf docs and loading them thro the loadmovie action and get a bit of fancy preloading happening. BUT when i load a mc into the main time line, none of my buttons on the main time line work. i know i have to fix the paths but i thought i had.what i had b4 was: movie clip called content, when buttons got clicked they went to different labels in the content instance of the clip. now when i load in the movie clip into an empty mc called content1, content1.loadmovie("content.swf") my content1.gotoandStop("whatever") doesnt work. so i tried _root.content1.gotoandstop("whatever"); still nothing, and loads more... i have tried loads of things and am almost out of patience. can anyone give me pointers in the right direction? even a decent tutorial anywhere that explains loading mc and using them with actionscript would be cool
__________________
microsofts butterfly is their way off telling u their systems have a **** load of buggs Advocating Linux Guide Lesbian Linux Great & Practical Computer Books like the links? Last edited by StealthElephant : May 15th, 2003 at 06:57 AM. |
|
#2
|
|||
|
|||
|
Something I noticed:
gotoAndStop("yourLabel"); // you had gotoandStop Also, instead of labels, try frame numbers and see if that works. hth, Mike
__________________
I'm not impatient, I just have a low tolerance for boredom. |
|
#3
|
|||
|
|||
|
ok, i get it.
at first it was a bit confusing because your terminology is a bit off (or maybe mine is outdated). when you load whatever.swf, it's a "movie" not a "movie clip". im not being anal but movie clip refers to that specific object, and it can confuse people. anwyays with that said i am pretty sure i know what the problem is. i was obsessed with flash 5 but it has been about a year since i did anything major. i have not tried this exact endeavor but similar things and i know when you call content1.gotoandStoP() you are telling content1 to go to a specific frame. however what you really want to go to a specific frame is the content.swf you loaded into content1, right? so i dont know if there is an identifier for a movie inside a movie clip, but if it were "foo" then you it would be content1.foo.gotoAndStop(). alternatively if it is not necessary to load the movie into the MC, simply load the movie into _level1 (or is it level_1 i forgot) you're main movie is in _level0 so content.swf will be on TOP of it. then to reference this movie change your paths to _level1.gotoAndStop(). good times. |
|
#4
|
|||
|
|||
|
Yeah, the terminology for loading a swf as opposed to loading a movieclip, say from the library, is ambiguous. When you load a swf into a target, that swf effectively becomes part of that target, and the movieclips contained in the swf can be targeted as if they were part of the "host" mc. This also goes for loading into _level0 or whatever. Personally, I like to set a counter to load swfs into their levels, and increment the counter before I load them. I also find it easier in most cases to create a target before I load a swf. This allows you to dynamically name the host clip, as well as apply other actions you may not want to apply to _level0.
Code:
var counter = 0;
createEmptyMovieClip("contentTarget", counter);
counter++;
contentTarget.attachMovie("theMovie", "movie1", counter)
// Or...
contentTarget.loadMovie("something.swf", counter);
|
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > paths |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|