How do I create a Popup in flash?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • teenIce
    New Member
    • Aug 2007
    • 36

    How do I create a Popup in flash?

    Hi all,

    I need help...I have a flash file name test.swf and there are button to launch another swf file. I try to use loadmovie() method but it replace my old swf with the new one. What I'm trying to do is more like popup for the old flash.

    Hope you all can help me.
    Thanks in advance.
    Last edited by kestrel; Aug 17 '07, 01:58 AM. Reason: I changed the Thread title so that it was more descriptive.
  • kestrel
    Recognized Expert Top Contributor
    • Jul 2006
    • 1071

    #2
    You could use Javascript to generate a popup window.

    [code=actionscri pt]
    on (release) { getURL("javascr ipt:popup('http ://www.something.c om/test.swf')"); }

    [/code]

    let me know if it works

    --
    Kestrel

    Comment

    • teenIce
      New Member
      • Aug 2007
      • 36

      #3
      Kestrel,

      It doesn't work. The error says
      Code:
       Object expected
      . Is this will open another windows?

      Comment

      • kestrel
        Recognized Expert Top Contributor
        • Jul 2006
        • 1071

        #4
        Yes, that code is supposed to open a new window. let me check my work.

        Comment

        • kestrel
          Recognized Expert Top Contributor
          • Jul 2006
          • 1071

          #5
          Try this:

          [code=actionscri pt]
          var jscommand:Strin g = "window.open('h ttp://www.adobe.com', 'win','height=2 00,width=300,to olbar=no,scroll bars=yes');"; getURL("javascr ipt:" + jscommand + " void(0);");
          [/code]
          This will create a window that is 200px in height, 300 in width, has no tool bar and allows scroll bars. You can change any of those properties if you want. That should work.

          Comment

          • teenIce
            New Member
            • Aug 2007
            • 36

            #6
            Thanks Kestrel.
            I'll try and inform you the result.

            Comment

            • kestrel
              Recognized Expert Top Contributor
              • Jul 2006
              • 1071

              #7
              OK, you're going to have to add [code=actionscri pt]on (release)[/code] if you want it to open up when you click on something

              Comment

              • teenIce
                New Member
                • Aug 2007
                • 36

                #8
                Yes.

                It works..Thanks Kestrel. But I want your opinion in my scenario. I had two flash file (A and B) . Let say, A supposedly call B and pass certain variables, is it possible I can load B in the same page with A and never unload A.

                Thank you in advance.

                Comment

                • kestrel
                  Recognized Expert Top Contributor
                  • Jul 2006
                  • 1071

                  #9
                  You should ask all new questions in a new thread. That way, your question is more likely to be seen and answered.

                  --
                  Kestrel

                  P.S.
                  Use good thread titles :)

                  Comment

                  Working...