A Flash Developer Resource Site

Page 3 of 6 FirstFirst 123456 LastLast
Results 41 to 60 of 109

Thread: INSTA-TUTE! - Popping a New Window in a Single Step

  1. #41
    Junior Member
    Join Date
    Jan 2001
    Posts
    9
    okay I Found the thread about putting it all on CD. It looks like it will get me through after I've had a chance to study it. My most pressing problem right now is the script error though. I have found some references to using ifFrameLoaded but no detailed instructions. I'm afriad I'm at the point now that my brain is on overload and any more thinking I do will result in the oozing of foul smelling fluids from my ears. I have got to leave this alone a while and eat breakfast. Maybe fifteen cups of coffe is the missing ingredient. Meantime if anybody out there has any advice it would be greatly appreciated. I can't put this thing out there knowing that half the time when the page loads the user will get a javascript error. The thought of revamping the whole site to do away with the four or five popups is not very appealing either.

  2. #42
    Member
    Join Date
    Sep 2000
    Location
    London, England.
    Posts
    57
    Originally posted by pcastleman
    the _blank is in the object actions box where it says Window. You have to make sure that line is empty and doesn't say _blank, or anything else I assume.
    ---

    I tried the above and I definately made sure that the _blank wasnt in there and ensured there was nothing else in the field. It still opens that second blank window with nothing in it except the words 'object'.

    Im using Flash4 and the browser window its opening is IE5. Can anyone help as this is a pain in arse!

    Cheers...John

    PS - What does the 'WindowName' bit of the script do????

  3. #43
    Senior Member
    Join Date
    Sep 2000
    Posts
    910
    Hmmm...seems to be a lot of confusion on this little script??

    jaspinal...I think what you're doing is you're testing in Flash Player...so, what you're seeing is normal.

    What you want to do is File>Publish Preview>Default-(HTML)...or just hit F12.

    This will allow you to preview your movie in a browser window...then when you call the script with your button...it will work the way it should.

    Also, the 'WindowName' is the name you want to appear at the top of the new window you pop...could be your website name...anything.

    pcastleman...not sure about your script error...is this in relation to popping the window?

    Hope this helps.......

    -pigghost-


  4. #44
    Junior Member
    Join Date
    Jan 2001
    Posts
    9
    Yes it is the link that activates the pop up that generates the error. The error I get is "object doesn't support this action". It only happens if the user clicks on a link before the movie has completely loaded. I have noticed after I try it out a few times I stop getting the error. Could it be because it's in cache and so doesn't have to wait to load? I have no idea how to set the ifFrameLoaded action to an object. From what I can tell you have to direct it to a frame. Since the on Mouse Event action is set to an object, how can I do that? Is there a way to make the object action only occur after a certain frame? Should I insert the ifFrameLoaded action before the mouse event, and then direct it where? I'm getting more and more confused. Maybe I'll just go read some of the threads on preloading.
    [Edited by pcastleman on 02-15-2001 at 01:03 PM]

  5. #45
    Senior Member
    Join Date
    Jun 2000
    Posts
    113
    what would i have to change if i wanted a scroll bar in my window.

    peace, 1lOvE
    rYaN

  6. #46
    Senior Member
    Join Date
    May 2000
    Posts
    114

    Smile

    in the java script code, just put scrollbars=yes, e.g getURL ("javascript:window.open('http://www.gear78.com/comp1.html','Computer1','width=700,height=600,top= 0,left=0,toolbar=no,scrollbars=yes,resizable=yes,m enubar=no,status=yes,directories=no,location=no'); void(0);");

  7. #47
    Senior Member
    Join Date
    Jun 2000
    Posts
    113
    thanks azatrum, works like a charm!

    peace, 1lOvE
    rYan

  8. #48
    Member
    Join Date
    Feb 2001
    Posts
    38

    Smile

    good stuff here, but I`ve just got one q.

    Is there a way of opening the new window in the centre of the screen by default rather than having to state in pixes where u want it to open?

    ie:

    ("javascript:window.open('http://www.newwindow.com/anything.htm','whatever,'width=700,height=600,top= 0,left=0,toolbar=no,scrollbars=yes,resizable=yes,m enubar=no,status=yes,directories=no,location=no');

    where the top and left options are, is there anything you can replace these with to open the window defaulted in the centre in any screen res?

    ta for any help.

  9. #49
    Senior Member
    Join Date
    Sep 2000
    Posts
    1,159
    Centering your Pop-up Window

    Here is another modified polar-lights script for poping your window in the center of the screen. The variables 'varHeight''varWidth' and your set Height/Width should match for this to work properly:


    on (release) {

    varHeight="300"
    varWidth="400"

    getURL ("javascript:window.open('http://www.flashkit.com','Welcome_To_FlashKit','width=400 ,height=300,top='+((screen.availHeight/2)-(" add varHeight/2 add"))+',left='+((screen.availWidth/2)-(" add varWidth/2 add "))); void(0);");
    }


  10. #50
    Member
    Join Date
    Feb 2001
    Posts
    38
    thanks but this didnt seem to work in Flash 4. I changed the lines

    varHeight ="300"
    varWidth ="400"

    to

    Set Variable: Height ="300"
    Set Variable: Width ="400"

    but it didnt work, whats wrong here?


  11. #51
    Senior Member
    Join Date
    May 2000
    Posts
    114
    Thanx GGW but there sure is a confusion here. I think what porky means is that is varHeight="300" varWidth="400" is actually the set variable action, or the var action?

  12. #52
    Member
    Join Date
    Feb 2001
    Posts
    38
    is there a var action in Flash 4? and if there is where is it???

  13. #53
    Senior Member
    Join Date
    Sep 2000
    Posts
    1,159
    Yea, again, the code is different for Flash 4. My intention was to set two variables:

    varHeight
    varWidth

    You can do the same with Flash 4, just use the setVariable command. And you will have to adjust the open window code as well - see the earlier post about the code that works for Flash 4.

  14. #54
    wow this is amazing stuff...very useful.

  15. #55
    Junior Member
    Join Date
    Jan 2001
    Posts
    9
    Well I tried everything I can figure out how to do. I put a preloader in the movie but the problem persist. Again if you click on the link before the movie is finished playing (it's gotta be finished loading with the preloader) you get a javascript error. "Object does not support that action". Has anybody else had this problem with this code? I don't know what else to do. I can't really get rid of the pop ups. Maybe there is an alternate more reliabe way to accomplish this? Or maybe somebody can give me some specific pointers on how to us FSCommand? Do I understand right that it sends a message to the browser that there is javascript and so loads the necessary plugin to run it? I am totally at a lost.

  16. #56
    Junior Member
    Join Date
    Jan 2001
    Posts
    9
    one more thing I thought about. If you have several pop ups in the movie do the window names have to all be different? Maybe that is where my problem is. Well it gives me something to try anyway. I sure could use some help with this.

  17. #57
    Senior Member
    Join Date
    Sep 2000
    Posts
    1,159
    Well how much are you loading? You could easily make it so your buttons don't show until the site is finished loading, but depending on your load, that could take a while. Do you have it posted out on a website anywhere we could take a look at it? Give each new window its own unique name - no spaces between the words.

    Also, let's address the use of a popup window. Generally, I will only use a popup to launch my site initially, or from within my site to show something that is not specifically related to the site - like a client website design. That you have menu items that all launch popups may be a questionable design choice.

  18. #58
    Junior Member
    Join Date
    Jan 2001
    Posts
    9
    not all the menu items launch pop ups, just the ones that take the user to sites outside our own. I'm afraid it's not online yet, or not at least where I can direct you to at this moment. Thanks for the reply though. I probably need to rename the windows it sounds like, since I used the same name for all three. I was considering using this other code I found that includes some code in the html. It looks a bit more complicated though. It's not a big movie at all really, 50k. And the links don't appear till the last 10 frames or so of the movie. At any rate I am too tired tonight to think about it much more. I'll try the name thing tomorrow and see how that works. Thanks again~

  19. #59
    The Supreme Shaman and Keeper of Polar Lights
    Join Date
    Apr 2000
    Posts
    1,175
    Hey GreatGooglyWoogly !

    And where is "thanks again to Polar Lights" ?
    In any way you are welcome

    PS But take a look at #2.F
    PPS For multiply pop-ups it is better to use
    javascript:uniqueobjectname=window.open('url.html' ,'uniquewindowname','lalala


  20. #60
    Senior Member
    Join Date
    Sep 2000
    Posts
    1,159
    OMG!!! It's Ilya! From Polar-lights Ladies and Gentlemen!

    Folks really, this is the guy you should be thanking for this script. I got it all from his site and thank GOD it was there! Ilya, I have tried to give you credit where I can and hopefully it has driven some traffic to your excellent site!

    I view the ability to pop a window to run your flash in as essential - especially to us Java rusty users who can't manipulate the back button!

    Again, nice work and I hope I haven't offended you by blatently stealing your work and bringing it here to FK for our folks!

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