14 Replies Latest reply on Dec 12, 2006 4:36 AM by shikozel

    POpup window

    Rob_Base
      I have been trying to create a popup window that is attached to a selection of text such as "read more info" or an object in flash 8. Please provide details on how I can accomplish that task. Please help (I want to place an image and some text in the popup window). Window size about 3 x 4 with scrolling bar.
        • 1. Re: POpup window
          shikozel Level 1
          you need to convert your text field into a movie clip. give it an instance name (ei, popUp_mc). and then put this actionscript on the first frame of your movie:

          popUp_mc.onRElease=function(){
          getURL("myPage.html","_blank")
          }
          • 2. Re: POpup window
            carlmal2
            Make sure the Window component is in your library (drag the window component to the stage and delete it).

            [CODE]
            myPopUp_win = PopUpManager.createPopUp(this, Window, true, {closeButton:true,title: "Whatever Title ", contentPath:"myMovieClipReadMoreText_mc",titleStyleDeclaration:"newStyle"});

            windowListener = new Object();

            windowListener.click = function(evt){
            detail_win.deletePopUp();
            }

            detail_win.addEventListener("click", windowListener);
            detail_win.setSize(555,504);
            detail_win._x = 150;
            detail_win._y = 80;

            [/CODE]
            • 3. Re: POpup window
              Rob_Base Level 1
              When I pasted the code in flash8, I got this; (received 20 errors message). Tell me if this is correct.

              onClipEvent (load) {
              not_set_yet.onLoad = function(
              [CODE]
              myPopUp_win = PopUpManager.createPopUp(this, Window, true, {closeButton:true,title: "Whatever Title ", contentPath:"myMovieClipReadMoreText_mc",titleStyleDeclaration:"newStyle"});

              windowListener = new Object();

              windowListener.click = function(evt){
              detail_win.deletePopUp();
              }

              detail_win.addEventListener("click", windowListener);
              detail_win.setSize(555,504);
              detail_win._x = 150;
              detail_win._y = 80;

              [/CODE]
              ) {
              };
              }
              • 4. Re: POpup window
                shikozel Level 1
                what are you trying to do? what do you want pop up? html page or you want to pop up a Movie clip?
                • 5. Re: POpup window
                  Rob_Base Level 1
                  Go to this website: http://www.templatemonster.com/flash-templates/12565.html. Once you are there - allow template to load and click "more" under latest news and watch the popup window show. That is want I am trying to duplicate. Can that be done? Please help?

                  May have to click on "more" once more to show popup.
                  • 6. Re: POpup window
                    Rob_Base Level 1
                    Sorry try this; go to: http://www.templatemonster.com and "search product" catagory for food and drink. Then scroll to second roll and select item # 12565 "view". the selection starts to load and then look at "latest news". The "more" text will show a popup window on selection. That is want I am trying to create.

                    May have to select twice on order to see popup window. Let me know if this can be done?

                    Thanks for all your help.
                    • 7. Re: POpup window
                      shikozel Level 1
                      of course it can be done. This pop up window is just a movie clip that looks like a window. once you put this movie clip on the stage you can program it to be dragable
                      • 8. Re: POpup window
                        Rob_Base Level 1
                        How do you do it? Walk me through. Please
                        • 9. Re: POpup window
                          shikozel Level 1
                          this is a start. draw a window box. convert it into MovieClip where linkage name= "windowPop". create a btn on the stage and name its instance= "readMoreBtn"

                          then put this code on the first frame



                          readMoreBtn.onRelease=popWindow


                          function popWindow():Void{
                          _root.attachMovie("windowPop","windowPop_mc",0)
                          _root.windowPop_mc.onPress=function(){
                          this.startDrag(false)
                          }
                          _root.windowPop_mc.onRelease=_root.windowPop_mc.onReleaseOutside=function(){
                          this.stopDrag()
                          }



                          }




                          • 10. Re: POpup window
                            Rob_Base Level 1
                            I am new to flash8. How do you put code on the first frame. Walk through please?
                            • 11. Re: POpup window
                              albee
                              Sorry Rob Base, but this effect is not done in Flash at all. It is either DHTML or CSS. Of course you could duplicate this in Flash, but it is unclear what the result you want should actually do. In the template monster example, you can never rollover the window. Attempting to do so makes it disappear. Would you want to be able to rollover the window and interact with it? You need to define your interface parameters. If you just want to duplicate exactly what is going on in the example you gave, then it would not be too hard to do it in Flash. If this is what you want to do, let me know... If you want to find out how to do this with CSS, try the Dreamweaver forums...
                              • 12. Re: POpup window
                                shikozel Level 1
                                hey albee, you are wrong. no DHTML. pure flash. I dont know how you conclude it is DHTML. maybe you looked at the wrong example.

                                Rob Base, putting code on the frame is kind of basic and if you don't know how to do it you will run to many other problems. why don't you start with much simpler project just to understand the concept of flash
                                • 13. Re: POpup window
                                  Rob_Base Level 1
                                  Thanks for the help, but I have no time to waste. I need this done ASAP for my business which is my main source of income. If you can help, I would be very thankful. I have the action on the frame, but nothing is happening.

                                  I placed the my cursor over frame (layer called "readMoreBtn") and I right click - and selected "action". Pasted code in action script and I was certain that instance names were correct and nothing happen when I published to html. When in browser, I clicked the "readMoreBtn and nothing happen. Any suggestions?
                                  • 14. Re: POpup window
                                    shikozel Level 1
                                    why dont you do a regular pop up. just pop up html page like that:
                                    getURL("myHTML.html","_blank")