Problem loading movies

  • c0rpz
  • Newbie
  • Newbie
  • User avatar
  • Posts: 7
  • Loc: Perú

Post 3+ Months Ago

hi, i have a site, which it loads external swf´s into a empty MC, i want this loading with a transition animation, like a change on the place when the external swf may be load, so i have 2 MC, one empty with the instance name "contenedor" here is the loader; the other, one layer up is the transition ("trans"), well i put in the button this code:

Code: [ Select ]
on (press) {
    tellTarget("_root.trans"){
        play();
    }
}
  1. on (press) {
  2.     tellTarget("_root.trans"){
  3.         play();
  4.     }
  5. }


well, then i try to put the loadMOvie in the same on(press) action but it loads the swf at the same time that the transition is playing, and if i put the

Code: [ Select ]
loadMovie("quien.swf", "loaderMC");


on the last frame into the transition MC, it loads perfectly, but then i will need to create more layers to every section of the site i´m doing...

here i´m stuck with that-- the transition MC it´s a 1 second long, so i think i probably try to make something like a "timer" in the button that waits 1 second till the tansition ends and loads the movie...but how? :roll:
  • Sulfin
  • Graduate
  • Graduate
  • User avatar
  • Posts: 129
  • Loc: canada

Post 3+ Months Ago

Ok, this isn't that hard to fix. Now, if I understand your problem correctly, you're trying to avoid having to re-write your load script for every different movie, right?

If that's right, you should make the movie you're loading a variable:
Code: [ Select ]
on (press) {
  _root.movieName="quien.swf"
  tellTarget("_root.trans"){
   play();
  }
}
  1. on (press) {
  2.   _root.movieName="quien.swf"
  3.   tellTarget("_root.trans"){
  4.    play();
  5.   }
  6. }


THat way, it tells a variable when you press what movie you want loaded. All you have to do is change the action in your transition to this:
Code: [ Select ]
loadMovie(_root.movieName, "loaderMC");

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 17 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
 
cron
 

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