12 Replies Latest reply on May 26, 2009 7:46 AM by kglad

    Double-sized pop-ups?

    icklegemma Level 1

      I'm very new to Flash so apologies if this is a daft question - I've had look around other sites but cannot find anything specific to my question...


       

      Basically I need to add a new feature in Flash where I add another button which launches the player in a separate window and plays the file back – at let’s say twice the size – not full screen. Attached is screenshot of what it should look like.


      I could really use some help with this - I don't have a clue where to start as I've only dealt with relatively easy fixes before

        • 1. Re: Double-sized pop-ups?
          kglad Adobe Community Professional & MVP

          you can use getURL() (as2) or navigateToURL() (as3) to call the javascript window.open() method with the window size you want and targeting a html file that embeds a double sized flv screen.  you'll then need to use localconnection to communicate the duration of the flv in the original and navigate to that location when you start the popups flv.

           

          this is not going to look good unless you do something to ensure the flv is cached so the popup can retrieve the flv from the cache.

          1 person found this helpful
          • 2. Re: Double-sized pop-ups?
            icklegemma Level 1

            OK that's helpful but I could really do with some examples of the code to get me going if that's ok?

             

            (I really am new to this!!)

             

            Thanks

            • 3. Re: Double-sized pop-ups?
              icklegemma Level 1

              Hello,

               

              I've had a bash at the code but it's not working...

               

              At the moment I have put in a layer (called Double Size) and button to do this, then got on the 'Actions- Frame' panel and put in the following AS code behind that button:

               

              navigatetoURL('www.testing.com');

               

              But when I try it everything goes a bit mad - can someone please give me a 'Dummies guide to flash' explanation?!

               

              Thanks!

              • 4. Re: Double-sized pop-ups?
                kglad Adobe Community Professional & MVP

                you're using as3:

                 

                navigateToURL("javascript:NewWindow=window.open('http://www.adobe.com','newWin','width=400,height=300,left=0,top=0, toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No');

                1 person found this helpful
                • 5. Re: Double-sized pop-ups?
                  icklegemma Level 1

                  Ah, I see, thanks for that, most helpful.

                   

                  If I build the player though I get three complier errors:

                   

                  1095: Syntax error: A string literal must be terminated before the line break.

                  1084: Syntax error: expecting identifier before end of program.

                  1084: Syntax error: expecting rightparen before end of program.

                   

                  Any clues?

                  • 6. Re: Double-sized pop-ups?
                    kglad Adobe Community Professional & MVP

                    try:

                     

                     


                    navigateToURL("javascript:NewWindow=window.open('http://www.adobe.com','newWin','width=400,height=300,left=0,top=0,toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No')");
                    • 7. Re: Double-sized pop-ups?
                      icklegemma Level 1

                      Crumbs, now I get another 3 errors:

                       

                      1067: Implicit coercion of a value of type String to an unrelated type flash.net:URLRequest.

                      1180: Call to a possibly undefined method addFrameScript.

                      Warning: 3590: void used where a Boolean value was expected.  The expression will be type coerced to Boolean.

                       

                      I guess this might be something to do with my original code though as I'm adding to a Flash PLayer someone else has designed?

                      • 8. Re: Double-sized pop-ups?
                        kglad Adobe Community Professional & MVP
                        var url:String = "http://www.adobe.com";
                        var jscommand:String = "window.open('" + url + "','win','height=400,width=300,toolbar=no,scrollbars=yes');";  
                        var urlR:URLRequest = new URLRequest("javascript:" + jscommand + " void(0);");  
                        navigateToURL(urlR, "_blank");  
                        
                        • 9. Re: Double-sized pop-ups?
                          icklegemma Level 1

                          Ah, interesting, I think I'm beginning to understand!

                           

                          Now I just get the two errors!

                           

                          1180: Call to a possibly undefined method addFrameScript.

                          Warning: 3590: void used where a Boolean value was expected.  The expression will be type coerced to Boolean.

                           

                          Do I need to change this 'addFrameScript' method and sort out something else in my code to get rid of these?

                          • 10. Re: Double-sized pop-ups?
                            kglad Adobe Community Professional & MVP

                            those two error aren't caused by that code.

                             

                            the addframescript error is usually caused by having a document class that extends the sprite class (and putting code on a timeline or extending then main timeline beyond 1 frame).  and the 3590 error may be caused by having a function that should return a boolean and has no return statement.

                            • 11. Re: Double-sized pop-ups?
                              icklegemma Level 1

                              Thanks for your help with this kglad - I'll try and resolve the problems in the code that you couldn't help with.

                               

                              Thank you for your patience!

                               

                               

                              • 12. Re: Double-sized pop-ups?
                                kglad Adobe Community Professional & MVP

                                you're welcome.

                                 

                                if you click file/publish settings/flash/permit debugging the compiler will reveal the code's line number that's causing each error.  you can then post that code in a new thread and get more help.