dcsimg
A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Opening Dialog box in Flash

  1. #1
    Member
    Join Date
    Jan 2002
    Posts
    95

    Opening Dialog box in Flash

    Is it possible to make a button in flash that will make a system dialog box appear when pressed? For example, to tell the user that an error has occured.

    Also, will this feature work for both Windows and Macintosh?

    TIA

  2. #2
    Member
    Join Date
    Dec 2003
    Posts
    58
    Please, close your eyes for a moment and meditate on the security implications such a "feature" would have!

    Still want it?

  3. #3
    Member
    Join Date
    Jan 2002
    Posts
    95
    Perhaps I was too vague.

    I'm fairly certain it is possible to do this using dreamweaver. For example, some websites disable the use of right-clicking (this is is not what I'm trying to do). When you right-click, a dialog box appears saying something along the lines of "That feature is disabled." This, is more or less what I'm trying to accomplish. It is not for vindictive purposes.

  4. #4
    Member
    Join Date
    Dec 2003
    Posts
    58
    In that example a Javascript-dialog pops up. That's a little tricky, but it can be done with Flash, like so:

    getURL("javascript:void(alert('error'));","_self") ; // can't actually test it, right now ...

    I wouldn't recommend this for something as crucial as an error message though. After all, you have no guarantee that Javascript is turned on ... Aside of that, it should work on any browser on any platform.


    BTW: Javascript-dialogs always identify themselves as javascript-dialogs. Just to make perfectly clear they are NOT system dialogs.

  5. #5
    Member
    Join Date
    Jan 2002
    Posts
    95
    Thanks. That's exactly what I was looking for.

    I apologize for the confusion.

  6. #6
    Member
    Join Date
    Jan 2002
    Posts
    95
    One more quick question:

    How do I make it so that the alert message can be written on two or more lines?

  7. #7
    Member
    Join Date
    Dec 2003
    Posts
    58
    have you tried "\n"?

  8. #8
    Member
    Join Date
    Jan 2002
    Posts
    95
    \n does not appear in the alert box, but it also does not create a line break for some reason.

    I found this URL, but it does not seem to be working for me.

    Thanks for your help.

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