A Flash Developer Resource Site

Results 1 to 17 of 17

Thread: pop-up from a text file?!!!

  1. #1
    Member
    Join Date
    Aug 2002
    Posts
    89

    pop-up from a text file?!!!

    Hi,

    I think I got myself deeper in flash than I can handle
    I'm trying to launch a pop-up window from a swf where the text is being generated by a text file. To follow what I'm saying please follow this link:

    http://www.mikeaqel.com >> Projects >> scroll down to ZiGGiN.com

    you will see that it's possible to click on the the text there... well, I need to do the same to the rest of the projects, but with a pop-up window that's launching a swf rather than a new browser window.

    My question is: how can do the pop-up since it's being launched from the text file?!

    Any help would be greatly appreciated.
    Great minds discuss ideas; Average minds discuss events; Small minds discuss People.

  2. #2
    Senior Member
    Join Date
    Feb 2001
    Location
    On the fifth floor.
    Posts
    1,202
    Hi 7amood,
    I remember that I've already sent an example of it to you. I do it one more time.
    As far as I understand you want to launch a pop-up window within a main movie. Is it right? If so, then you should write some function for launching a pop-up window. And then you can call this function from a text, by using asfunction. In my example I loadMovie, but the function may be any you wish (attachMovie, mc.gotoAndPlay(), etc).
    By the way, I've seen your site and noticed that you made a little mistake in the "projects.swf". At the end of text there all last paragraph (ZiGGiN.com) is reacting on a mouse event instead of just headline. If you want that only headline to react on mouse event, you should put closing tag (/a) right after … nZiGGiN.com (/b) (/font) HERE….
    Good luck.
    Attached Files Attached Files
    Last edited by sergwiz; 05-24-2003 at 05:45 AM.

  3. #3
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    It could also be done with a simple "a href" tag with a call to a javascript popup opener script.

  4. #4
    Senior Member
    Join Date
    Feb 2001
    Location
    On the fifth floor.
    Posts
    1,202
    But as I understand, he does not want new browser window to be launched but a new swf within a main.swf. Therefor there is no need of javascript here.

  5. #5
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    You could be right! Guess he used a bad choice of words... Thus the confusion on my part. But javascript & an "a href" tag (although, you're right, the asfunction would be easier) could still do it!

  6. #6
    Member
    Join Date
    Aug 2002
    Posts
    89
    sergwiz, you are absoloutly right. but I got stuck at the "writing the pop-up function level" and I need a lot of help there. Have you done anything like this befor? do you have a function that I can use? I'm really lost when it comes to ActionScript.

    Your observation is right as well... I will change that once all of my projects are linked correctly
    Great minds discuss ideas; Average minds discuss events; Small minds discuss People.

  7. #7
    Senior Member
    Join Date
    Feb 2001
    Location
    On the fifth floor.
    Posts
    1,202
    No, I don't have such a function, I just write it when it needs. Certainly I'll help you, but you should describe the task as precisely as possible, so that I could understand it. You see that even Oldnewbie hardly understands what you want. And I have understood you only because I already helped you on this problem in the past.

  8. #8
    Member
    Join Date
    Aug 2002
    Posts
    89
    Sorry guys if I wasn't clear enough

    what oldnewbie has suggested doesn't apply to my case due to the very reason you've mentioned.

    Ok, here is the file that I need to launch the pop-up from. When you look at it, you'll notice that I'm using a text file. The HTML link on ZiGGiN.com works fine.

    Now I need to do the same thing to the first paragraph "Spectrum FACET", but with an asfunction to launch a swf within a pop-up or just by itself... it just has to be separate from the main window. This swf will include screenshots of the project.

    Let me know if I'm not makinig any sense

    Thanks
    Attached Files Attached Files
    Great minds discuss ideas; Average minds discuss events; Small minds discuss People.

  9. #9
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Fail to see why you don't use the same exact thing you're doing with what you call your working link...

    Since...

    ...to launch a swf within a pop-up or just by itself... it just has to be separate from the main window...

    ...And using the asfunction to open another external .swf, it would be in the same window, unless you used the asfunction to open a popup, which you can do as you did for your other link!

  10. #10
    Member
    Join Date
    Aug 2002
    Posts
    89
    oldnewbie, feel free to download the file and show me what you mean...

    Thanks
    Great minds discuss ideas; Average minds discuss events; Small minds discuss People.

  11. #11
    Senior Member
    Join Date
    Feb 2001
    Location
    On the fifth floor.
    Posts
    1,202
    7amood, tell me the name of swf file you want to launch and it's
    width and height. The faster you do it the faster you'll get the result.

  12. #12
    Member
    Join Date
    Aug 2002
    Posts
    89


    the name: images.swf
    width: 600px
    hight: 500px
    Great minds discuss ideas; Average minds discuss events; Small minds discuss People.

  13. #13
    Senior Member
    Join Date
    Feb 2001
    Location
    On the fifth floor.
    Posts
    1,202
    Take it. And tell me is it that you want?
    Attached Files Attached Files

  14. #14
    Member
    Join Date
    Aug 2002
    Posts
    89
    That's awesome! did you do it only by this javascript function, then calling it? I tried that... but I think I had syntax errors. and I always had an empty browser window poping up as well... so I gave up on Javascript

    Now how do I center the pop-up?
    Last edited by 7amood; 05-24-2003 at 06:09 PM.
    Great minds discuss ideas; Average minds discuss events; Small minds discuss People.

  15. #15
    Senior Member
    Join Date
    Feb 2001
    Location
    On the fifth floor.
    Posts
    1,202
    Well, if it is that you wanted, this means that Oldnewbie was right and he understood you better than I did at first.

    If you want to center the pop-up, you should write this script into "images.html":

    (SCRIPT LANGUAGE=JavaScript)
    var winxpos = (window.screen.width-600)/2;
    var winypos = (window.screen.height-500)/2;
    window.moveTo(winxpos,winypos);
    (/SCRIPT)

    That's all.
    Last edited by sergwiz; 05-24-2003 at 06:15 PM.

  16. #16
    Member
    Join Date
    Aug 2002
    Posts
    89
    Yep he did, but like I said... I gave up on JavaScript because of the "extra" browser window I thought it will always pop-up. So I thought I had to use ActionScript. Anyways... now I know, and I thank you and oldnewbie for all the help and the knowladge.
    Great minds discuss ideas; Average minds discuss events; Small minds discuss People.

  17. #17
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    The extra window only comes up when you test your movie in the application itself. Through the html (as this should really be tested), no such window.

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