A Flash Developer Resource Site

Page 1 of 2 12 LastLast
Results 1 to 20 of 21

Thread: [Resolved] [Resolved] [Resolved] [Resolved] [Resolved] [Resolved] [Resolved] how to minimize

  1. #1
    Senior Member
    Join Date
    Jul 2001
    Posts
    354
    is there any way to have a button in a projector that is running in full screen that will minimize the projector when clicked on? Also this projector has swf's comeing from the internet into levels so I need it to minimize everything when clicked on. Is this even possible with flash. And just so every one knows the reason I whent to full screen mode was to get around the issuce of diffrent size monitors.

  2. #2
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766

    http://www.northcode.com/misc/Min.exe

    MIN takes a single string argument and will minimize any application that has that string appearing in it's title bar or task bar button text. The title bar and/or the task bar don't have to be visible and case doesn't matter.

    For example, the command below will minimize all open windows with "notepad" anywhere in the title or text on the task bar button.

    fscommand("EXEC", "MIN.EXE\tNotepad");

    MIN.EXE has to be in the same dir as your projector for this to work but you can probably figure out how to change the location if you really need to.


  3. #3
    Senior Member
    Join Date
    Jul 2001
    Posts
    354
    Thanks Northcode but I have downloaded the min. program before and have no idea what to do with it LOL. I am just a amature trying to learn as I go. The problem I have is the projector I have made is given out on my web page for people to download then the pull my swf's into. how would I go about setting mini up so that it would download with the projector file. hope this makes some sence

  4. #4
    Senior Member
    Join Date
    Jul 2001
    Posts
    354
    matter of fact I am now looking at your ftools and scraching my head even harder hehehehhehe. Man don't you hate us amatures, life would be great if we were all born with the nolage of programming already built into us.

  5. #5
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766

    If you add fscommand("EXEC","MIN.EXE\tFlash"); to the On (Release) action for a button then when you press the button your projector would be minimized. That's assuming you haven't used resource hacker or something to change the title from "Flash" to something else.

    MIN.EXE has to be in the same dir as your projector when it runs so if you're letting people download your projector from the web then you'd have to find a way to bundle MIN.EXE with your projector into a ZIP file or into a single EXE.

    SWF Studio can do that and there are other tools out there that will also get the job done. You can find a list of third party tools at http://www.macromedia.com/support/fl...ites.htm#tools

    flashtools.net belongs to The Master (one of the moderators here). My stuff is over at http://www.northcode.com I like to keep things simple for everyone, that's why I wrote SWF Studio (you don't need MIN.EXE if you have SWF Studio, that functionality comes built-in).


  6. #6
    Senior Member
    Join Date
    Jul 2001
    Posts
    354
    Thanks for your time NorthCode, well guess I will just have to leave that feture out of my projector. Tied up all my monie into developing what I have right now but will keep it in mind later down the road when this project starts to pay off, sounds like this is just what I need.

  7. #7
    Senior Member Knoj's Avatar
    Join Date
    Sep 2000
    Location
    Ames IA
    Posts
    361
    Thanks for the help NorthCode, but I can not seem to get it to work... I have done exactly as you say, but nothing happens... Any more help on this? In addition, when the movie is clicked on in the menu-bar, can you make it go right back to full screen?

    Thanks

    I think I may have found why mine is not working, I am using flash 4, and the "\t" thing is only for flash 5...
    Is there another solution for flash 4 users?
    [Edited by Knoj on 03-26-2002 at 02:28 AM]

  8. #8
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766

    This is what you need to make it work with Flash 4.

    fscommand("EXEC","MIN.EXE" + chr(9) + "Flash");

    Sorry for the delay, just go back from http://www.flashinthecan.com


  9. #9
    Senior Member Knoj's Avatar
    Join Date
    Sep 2000
    Location
    Ames IA
    Posts
    361
    Once again, North Code saves the day! Dude, you are awsome, you should be promoted, or given a raise, or at least win the lotery or somethin'. Thanks for your help man!

  10. #10
    Senior Member Knoj's Avatar
    Join Date
    Sep 2000
    Location
    Ames IA
    Posts
    361
    Ok, maybe I spoke too soon, but I don't retract my earlier statement. I have not gotten it to work though... Here is exactly what I have:
    Code:
    On (Release)
          FS Command ("EXEC", "Min.exe" + chr(9) + "Flash")
    End On
    Any one have any clue on why I still can't get this to work?

  11. #11
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766

    For that EXACT example to work, the word "Flash" has to appear in the title bar (or task bar) for the projector you want to minimize.

    You can try this from a DOS box to make sure it's working properly for you. Open up an Internet Explorer window (or windows) and type this in the DOS box

    min.exe internet

    And then press ENTER. All your IE windows should be minimized to the task bar. Now try the same trick with your projector running.


  12. #12
    Senior Member Knoj's Avatar
    Join Date
    Sep 2000
    Location
    Ames IA
    Posts
    361
    Oddly enough, that didn't work, I made sure I had the file in the C: directory to make things extra simple, but no go... I even tried min.exe prompt but the dos prompt window didn't even close... Could it be that I am running Windows 2000? Are there any other options I might explore? Where did you find this Min.exe program? Is it yours? Is it someone elses? Would they have bug updates to maybe work with windows2k? Are there any other tests that I might do to find out the problem? Do you have an example of this that you have done in the past that I might try on my computer?

    Thank you for all of your time!

  13. #13
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766

    I'm an idiot (my new mantra). You have my apologies for any time you've wasted testing this!

    The version that I posted was indeed broken. It was looking for a match only at the beginning of the caption instead of anywhere in the caption.

    I just recompiled it and uploaded a version that works properly. You can get it from http://www.northcode.com/misc/Min.exe

    I will not reply to postings in the future unless I've ingested at least 500 mg of caffeine


  14. #14
    Senior Member Knoj's Avatar
    Join Date
    Sep 2000
    Location
    Ames IA
    Posts
    361
    Rather odd, but here is the solution for flash 4 users:
    Code:
    On (Release)
          FS Command ("EXEC", "Min.exe" & chr(9) & "lash")
    End On
    Notice that the word is "lash", this is NOT a typo! For some odd reason, if you put the "f" in "flash" it will NOT work... (yeah, don't ask how long it took to figure that out...) Then the next thing is that the "+" have been replaced with "&", that's a flash 4 thing. Oh, and when you enter the information into the "arguments" section, you MUST make it an expression, and make sure you have it quoted correctly. The above has no typos in it, as it was coppied, and pasted directly here. Also, this only works with the version Min.exe (1.0.0.1) found at http://www.northcode.com/misc/Min.exe I thank NorthCode for putting a huge effort into all of this, as none of us (that I know of) has given him any money for the work here on the FK boards!

    Well, now we can emulate the 3 main window buttons of a normal window with FS commands, and a Min.exe Thanks again my great northern friend!

  15. #15
    Howling Mad !
    Join Date
    Mar 2002
    Posts
    59
    I know this is about standalone app's, but is it possible to use MIN on a webserver?
    I mean, is there a cgi or other little script that does the same for IE?

    Hope I'm making sense, it's late....

    WW
    I Love Having fun with Swish
    [swf width="300" height="40" background="#000000"]http://www.nightinwinter.nl/Question.swf[/swf]

  16. #16
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    You can't use the Min utility I wrote from a web server, if you try to launch it via getURL() the user would be prompted to download it instead. I don't know of any way to minimize other open windows from a web based Flash app, but you can use javascript and the window element to control the size and position of the IE window that you're in, for example...

    Code:
    <script language="javascript">
       function Startup() 
       { 
          window.resizeTo(500, 500); 
          window.moveTo(100, 100);  
       }
    </script> 
    <body onLoad="Startup();">
    Instead of calling it from the onLoad of the body tag you can call your javascript in response to an FSCommand. The javascript function has to be in the same HTML page as the one that your SWF file is embedded in.

    Colin Moock has some excellent info on his site at:
    http://www.moock.org/webdesign/flash/fscommand

    So, you might not be able to minimize the IE window, but you can do things like make it really tiny, move it off the visible display (with negative values for x and y), and tons of other stupid tricks that regulat HTML pop-ups use to annoy us on a daily basis.

    Use this knowledge wisely...
    Last edited by Northcode; 12-29-2003 at 12:23 AM.

  17. #17
    Banned By GMF Wannabe Gambini's Avatar
    Join Date
    Oct 2000
    Posts
    976
    Hi, download a copy of Flash Studio PRO and you can use the following code:
    Code:
    fscommand ("flashstudio.minimize");
    I hope this helps!

  18. #18
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    I know this is about standalone app's, but is it possible to use MIN on a webserver?
    I mean, is there a cgi or other little script that does the same for IE?
    Gambini, please take the time read the most recent question in the thread, not just the first post, before replying with a cookie cutter answer.

  19. #19
    Banned By GMF Wannabe Gambini's Avatar
    Join Date
    Oct 2000
    Posts
    976
    Oops, my bad! Happy New Year!

  20. #20
    Howling Mad !
    Join Date
    Mar 2002
    Posts
    59
    Originally posted by Northcode
    Code:
    <script language="javascript">
       function Startup() 
       { 
          window.resizeTo(500, 500); 
          window.moveTo(100, 100);  
       }
    </script> 
    <body onLoad="Startup();">

    Use this knowledge wisely...
    Thanks for the info, but these options are not acceptable for me.
    I don't want the window to move offscreen incase I have to return to it and the minimization achieved through unsigned javascripts even with focus and blur options used is not what I'm looking for. MIN seemed nice, but if its only usable under a windows system then alas, my search hath ended in misery
    I Love Having fun with Swish
    [swf width="300" height="40" background="#000000"]http://www.nightinwinter.nl/Question.swf[/swf]

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