A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: .exe maximize window

  1. #1
    Senior Member
    Join Date
    Aug 2003
    Location
    new zealand
    Posts
    104

    .exe maximize window

    Hey.

    Wonder if someone could help?
    Something I thought would have been super easy is turning out to be difficult!!

    I have a .exe projector file. (I am using MX 2004)
    I know how to fullscreen using the fscommand, but I need the Windows bottom "start bar" to be available.
    So my programme needs to be in a window.

    But... when I autorun or click the .exe file. It randomly places the window on my screen.
    The problem is that I want it to be maximized when run!!

    Dose anyone know of any other script I could use.
    Just a maximize screen = true type thing??

    Cheers, werglum

  2. #2
    Senior Member
    Join Date
    Oct 2000
    Posts
    220
    Did you ever figure this out?

    I'm trying to do the same thing.

  3. #3
    Senior Member
    Join Date
    Aug 2003
    Location
    new zealand
    Posts
    104
    Hey Bud

    Sure thing, This one drove me made for some time.

    It can be maximized by auto-running a .bin file.
    Can't remember the exact code off-hand.
    But is real easy once you know where to start looking...
    Just look it up on the net.

    ...If you are still having trouble I can look it up for you.
    But as I said... once you know to use a .bin (Windows system file)
    It will be easy.

    Hope this helps, Werglum

  4. #4
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Grunzster, your signature's garaphic is too large for FK.

    http://www.flashkit.com/board/showth...hreadid=540268 //footer rules

  5. #5
    Senior Member
    Join Date
    Oct 2000
    Posts
    220
    Originally posted by werglum
    It can be maximized by auto-running a .bin file.
    Can't remember the exact code off-hand.
    But is real easy once you know where to start looking...
    Just look it up on the net.
    Thanks actually I used a .bat file. You need to use the .bat fil to launch the projector. Then you just ad /max or /maximize.

    Originally posted by oldnewbie
    Grunzster, your signature's garaphic is too large for FK.

    http://www.flashkit.com/board/showth...hreadid=540268 //footer rules
    Wow thanks for being such a BIG help!!!
    Sorry I didn't realize it was too big, it's been changed, but you could have pointed this out to me in PM, though.

  6. #6
    Junior Member
    Join Date
    Oct 2007
    Posts
    1

    .bat

    Here's the batch file I just cobbled together (not extensively tested):

    chdir "c:\program files\adobe\flex builder 2\"
    start /max sa_flashplayer_9_debug.exe %1

    - Change the above path to where the projector EXE is
    - Save this in a .bat file (text file with .bat extension) in the same folder as the projector EXE
    - Set SWFs to always open with this .bat file (right click on an SWF in explorer, open with, choose program, browse, select the batch file, Open, Always use the selected program..., OK)

    ----
    On second thought, this has nothing to do with your problem! I should learn to read.
    Last edited by blahblahblah333; 10-18-2007 at 09:08 PM. Reason: Oops.

  7. #7
    Junior Member
    Join Date
    Oct 2011
    Posts
    1
    hi all, (BTW: AS3)

    I see that it's been quite a long time. However i've searched all web and did not find a solution. There is indeed solution for .swf but not for .exe projectors. I am a newbie for actionscript but a good reverse engineer.I found some different samples and figured out a solution here it is;

    1) there is a solution for full screen projectors on the web which is:
    Actionscript Code:
    stop();

    stage.displayState=StageDisplayState.FULL_SCREEN;
    stage.scaleMode="noScale";
    fscommand("allowscale", "true");
    }

    I used this code on the first frame. It worked like a charm than i've added a "quit" button

    Actionscript Code:
    quit_mc.addEventListener(MouseEvent.MOUSE_DOWN, closeWin);

    function closeWin(e:Event):void
    {
        fscommand("quit");
    }

    It was ok for my work until the customer came back with a little wish:
    can we make a minimize button? I thought it would be easy but to my luck it never is.

    Using the first version of the code you may notice that the action forces to maximize. Even you hit the "esc" key it will maximize again. I found a way to minimize but it lasted less than a second.. It would maximize again.


    2) Ok... let's minimize(!)..well not realy minimize to taskbar but at least windowed, so that we get rid of the fullscreen:

    I've created a movie_clip with an instance name: min_mc to use as a minimize button.

    Actionscript Code:
    min_mc.addEventListener(MouseEvent.MOUSE_DOWN, minWin);

    function minWin(e:Event):void
    {
       stage.displayState=StageDisplayState.NORMAL;
       stage.scaleMode="noScale";
       fscommand("allowscale", "true");


    }

    It worked for me and saved my work..I've seen a lot people looking for such a solution.


    3) I want my fullscreen back .

    dublicate the movie clip and give another instance name to it as max_mc

    max_mc.addEventListener(MouseEvent.MOUSE_DOWN, maxWin);

    function maxWin(e:Event):void
    {
    stage.displayState=StageDisplayState.FULL_SCREEN;
    stage.scaleMode="noScale";
    fscommand("allowscale", "true");

    }

    I've noticed that fscommand ("fullscreen", "true"); does not work in this case or i could not manage it.

    I suggest you to improove this code and deliver in other forums too, because i've seen lot's of people looking for help about this topic.

    good luck

    Halil,
    Last edited by bonchak; 10-30-2011 at 11:11 AM.

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