3 Replies Latest reply on Feb 12, 2009 10:42 PM by timVFXflash

    Load SWF  (not the same question)

    timVFXflash
      Thanks in advance to anyone who can help me out with this.

      I built a simple flash page that has a video container and 11 buttons that pull up external flv files respectfully (I also built the usual player controls as well). I put a button on the stage that when pressed it pulls up another video page with 11 more buttons to 11 more videos. It's sort of like a menu system on a DVD. I used some acton script to close the net connect and Net Stream when loading the other SWF file so that's all good, but when the new swf comes in the buttons from the old page disappear but if you move the mouse to where they used to be the pointer turns into the hand and if you click it activate the button function for the previous page playing the video from the previous page (you don't see the video, only hear it).

      What I want to do seems so simple in concept.... have a page that contains some buttons that play vidoes and a button that when pressed pulls up a whole new page with more buttons to different videos (replaces the old page completely). Both swf file work perfectly by independently.

      Here's some of my code to give you an idea of where I'm at
      //////////////////////////
      The main swf file is placed inside an HTML page and starts like this....

      var nc:NetConnection = new NetConnection();
      nc.connect(null);

      var ns:NetStream = new NetStream(nc);
      theVideo.attachVideo(ns);

      ns.play("Reel.f4v");
      /////////////////

      Then I have some buttons to control vidoe etc....

      The button that loads the second swf works like this:

      HQbutton.onPress = function() {

      loResSite.loadMovie("flashdvd_complete_LO_rev5.swf");
      ns.close();
      nc.close();

      }

      This page comes in perfectly all the buttons work, the netstream and connection from the previous page is closed nicely, but the buttons are still there, they are not visible, but if you move to where they were you get the "click here" hand.

      Believe me I looked everywhere for a solution... and I'm running out of hair to pull out of my head. Any help would be greatly appreciated.

      Thanks again

      T





        • 1. Re: Load SWF  (not the same question)
          timVFXflash Level 1
          I came up with a solution that works... withouth having to load another swf.... Works great!

          I copied all the key frames from the second swf and pasted them into frame 10 in the "main swf". Then did a gotoAndStop(10); when "next page" button is pressed. Then a gotoAndStop(1) when the "back" button is pressed.

          I don't know if this is how you are supposed to do it, I'm really a compositor that just dabbles in Flash. But it works great, so I'm just going to leave it at that.

          Hope this helps someone else some day who finds themselvels on the same path that i was on.
          • 2. Re: Load SWF  (not the same question)
            graylensman Level 1
            Here's a more elegant and easier solution to your problem:


            when you load in the new swf,
            first_Button.enabled=false;

            then when you unload the new swf,

            first_Button.enabled=true;


            • 3. Re: Load SWF  (not the same question)
              timVFXflash Level 1
              Thanks for the reply....

              I will try that, but I'm not sure I understand completely. Do you mean I put first_button.enabled=false for each button (i.e. vidButton1, vidButton 2 etc.)? The same for the =true buttons?

              I'll try a few scenarios with this idea.
              Will post my result when finished.

              Thanks again.