A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Website Movie Clips

  1. #1
    Junior Member
    Join Date
    Mar 2016
    Posts
    4

    Website Movie Clips

    Hi all,

    I'm coming here for some developer help as I'm completely out of my element. I'm a graphic designer who used to work with a programmer; he has since left the company rather hastily and I have content we need to deliver. We were working on a website together; I would design each page, he would write the code. Now that he's gone, I'm trying to figure out how to stitch these pages together and I have no idea what I'm doing.

    As common practice, every page has its own independent .swf. There is animation embedded within each page, that requires it's own play controls. Our UI is it's own .swf that loads each page externally. My question for you is, what would the code look like for clicking one button and loading a new page within the UI, essentially replacing the old page? It looks like in the action script he used _visibility toggles, but when I try and rewrite that code for the new pages, it doesn't work.

    Our button setup is essentially you click a button and it isolates a part on the page, and if you click it again it's supposed to load a new page. Is this too complex? Where the hell do I go from here? Any help would be appreciated.

    Thanks!

  2. #2
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi,

    Look into

    loadMovie(destination);
    unloadMovie(destination);

    or even better I think is MovieClipLoader

  3. #3
    Junior Member
    Join Date
    Mar 2016
    Posts
    4
    Hey Fruitbeard, thanks for the reply!

    So, the code for loading the movieclips into the file looks like this:

    var my_loader:MovieClipLoader = new MovieClipLoader();
    my_loader.addListener(my_listener);
    my_loader.loadClip("IMS_Master_v1.swf", _root.masterContainer);

    var my_loader:MovieClipLoader = new MovieClipLoader();
    my_loader.addListener(my_listener);
    my_loader.loadClip("MDMC_v2.swf", _root.mdmsContainer);

    They are loaded in to separate empty movieclips on the main time line. How would I get the button to turn one on and the other off?

  4. #4
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi,

    You will need to sort out how you decipher which one goes first ect etc etc

    my_loader1.unloadClip(_root.masterContainer);
    my_loader2.loadClip("MDMC_v2.swf",_root.mdmsContai ner);

    my_loader2.unloadClip(_root.mdmsContainer);
    my_loader1.loadClip("IMS_Master_v1.swf",_root.mast erContainer);

  5. #5
    Junior Member
    Join Date
    Mar 2016
    Posts
    4
    Ah, so when I add the var my_loaders I should add sequential numbers to them so they can be targeted in the code? So my code would look like:

    var my_loader1:MovieClipLoader = new MovieClipLoader();
    my_loader1.addListener(my_listener);
    my_loader1.loadClip("IMS_Master_v1.swf", _root.masterContainer);

    var my_loader2:MovieClipLoader = new MovieClipLoader();
    my_loader2.addListener(my_listener);
    my_loader2.loadClip("MDMC_v2.swf", _root.mdmsContainer);

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center