loadMovie Actionscript questions

  • LongHairRkr
  • Newbie
  • Newbie
  • LongHairRkr
  • Posts: 13

Post 3+ Months Ago

Hey guys,

Hope you can help with this one. I am working on a site and I want to use buttons on level 0 of the loadMovie script and have my level 1 movies load in BEHIND my buttons, so the graphics fall in behind the buttons ... how would I do this?

Do I need to use loadMovie to make my buttons ALL be level 1?

Is there an easier way to do this?

Thank for any help you can give me.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • LongHairRkr
  • Newbie
  • Newbie
  • LongHairRkr
  • Posts: 13

Post 3+ Months Ago

Oh ... one more thing, if it helps.

I have dozens of other movies I am piecing together ... so my button level is one continuous movie and the others are added in as the user surfs the site to lessen the load time ... and I will be using a preloader to begin the site.

Thanks again!
  • krismeister
  • Graduate
  • Graduate
  • krismeister
  • Posts: 202

Post 3+ Months Ago

Use the target attribute.

Put a blank MovieClip behind your buttons to start with and load the movie into that clip.

See the examples here:
http://www.adobe.com/support/flash/acti ... ry423.html
  • LongHairRkr
  • Newbie
  • Newbie
  • LongHairRkr
  • Posts: 13

Post 3+ Months Ago

That worked perfect ... thanks!
  • LongHairRkr
  • Newbie
  • Newbie
  • LongHairRkr
  • Posts: 13

Post 3+ Months Ago

One more series of dumb questions ...

The site I'm working on has 5 levels to it ... level 0 is the movie that loads the buttons and the content, it does nothing else. Level 1 is a blank level for things that need to be under my background movies. Level 2 is the area FOR my background movies, which will only control another level of movie in one single instance (I figured out how to do THAT using the targets). Level 3 is for my content, text, movie thumbs and such. Finally, level 4 is for all of my buttons and actual controls. That being said: Can level 4 be used to load and unlad all of my movies on levels 1 through 3, or must that instruction come from level 0? Is there a site with good instruction on this if so?

Thanks again!
  • krismeister
  • Graduate
  • Graduate
  • krismeister
  • Posts: 202

Post 3+ Months Ago

I'm not a fan of loading movies via _levels in actionscript. It usually makes it more confusing to keep track of what is where. Much better to use the method I described earlier with MovieClips on your layers pallet.

If you want to load a MovieClip when you're inside of a different MovieClip use either:

this._parent.myOtherMC -- this method is called relative
_root.myOtherMC -- this method is called absolute

For more information on how to access a MC from within other MCs you should look up variable scope.

Another handy feature inside of Flash's ActionScript panel is the target Icon, this will help you target a MC from where ever you are.
  • LongHairRkr
  • Newbie
  • Newbie
  • LongHairRkr
  • Posts: 13

Post 3+ Months Ago

Everything I'm finding online shows how to control the level 1 movie FROM the level 0 movie ...

I can't seem to find any good information on making the movie on level 4 control the movies loaded into level 1, 2 and 3 though.

Any other suggestions? I'm still working on the last two examples and I guess I just don't get how they work without a straight forward description.

Example: On pushing a button in my movie on level 4, I want it to unload and reload a NEW movie clip into level 2 and 3 at a certain frame number during the playing of level 4 movie ... to save on load times. Do you have any good examples of what the AS would look like for that and where it would be placed in the movie on level 4?

Sorry ... I'm still learning this, so it might just be going over my head the way it's explained on most stuff ... Livedocs seems to be written for those who already understand it all. LOL!
  • krismeister
  • Graduate
  • Graduate
  • krismeister
  • Posts: 202

Post 3+ Months Ago

LongHairRkr wrote:
Example: On pushing a button in my movie on level 4, I want it to unload and reload a NEW movie clip into level 2 and 3 at a certain frame number during the playing of level 4 movie ... to save on load times.


You won't be able to load a Movie and jump to a certain frame of that Movie in one call. You'll have to split it up into 2 calls. 1 to load the movie and the second to jump to the frame after Flash has finished loading it. I recommend learning how to setup an onLoad listener:
http://livedocs.adobe.com/flash/mx2004/ ... 00945.html

---

Here's an example of how to load a Movie into a MovieClip from a Button in another MovieClip.

Movie Organization

mainMovie
|
|-- mainStage_mc
|
|-- nav_mc
------|
------|-- myButton_bt


Code in nav_mc:

Code: [ Select ]
myButton_bt.onPress=function(){
_root.mainStage_mc.loadMovie('movieURL.swf');
}
  1. myButton_bt.onPress=function(){
  2. _root.mainStage_mc.loadMovie('movieURL.swf');
  3. }
  • LongHairRkr
  • Newbie
  • Newbie
  • LongHairRkr
  • Posts: 13

Post 3+ Months Ago

I'll give that a try ... thanks a ton!
  • LongHairRkr
  • Newbie
  • Newbie
  • LongHairRkr
  • Posts: 13

Post 3+ Months Ago

Okay ... apparently I am too stupid to get this to work properly, so let me see if I can get a SPECIFIC example to work with.


My main movie is named Welcome.swf ... it rests on level 0.
My buttons are in level 4 and the movie is called Idea.swf.
The button is named shows_btn ...

I want it to move the Idea.swf movie to a new scene (Which I already have finished, and it moves just fine.) and LOAD a movie titled Shows Movie.swf into level 2 (which will play straight through to it's own stop point) of the Welcome.swf, as well as load a second movie titled Show Dates.swf into level 3 of the Welcome.swf (Which will ALSO play into it's own stop point.).

EXACTLY how would I code this ... and WHERE do I put the Script? Do I put it in the actions of the BUTTON? Or in a frame within the movie? Or do I have to have numerous codes in a couple spots?

Tried to go with the listener method ... but I can't find anything straight foreward enough to get me where I need to be.

Sorry ... like I said, still learning!

I hope this makes sense ... I know I might be asking the impossible. LOL!

Once again thanks for dealing with my pain in the butt questions. :roll:
  • LongHairRkr
  • Newbie
  • Newbie
  • LongHairRkr
  • Posts: 13

Post 3+ Months Ago

WOO HOO! I finally figured it out ... thanks for all your help!

Post Information

  • Total Posts in this topic: 11 posts
  • Users browsing this forum: No registered users and 12 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.