center the projector?
A Flash Developer Resource Site

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

Thread: center the projector?

  1. #1
    Junior Member
    Join Date
    Aug 2002
    Posts
    3
    can someone remind me how to center the projector on the monitor without going full screen...i thought i had seen something on these boards about that before when i was looking for something else...but i'm not sure. much thanks

  2. #2
    Senior Member
    Join Date
    May 2001
    Posts
    109

    center.exe

    Hi there,
    Northcode has a free app that is supposed to center your exe. You can find it here http://www.northcode.com/misc/center.exe
    I tried it, it didnt work for me, give it a shot, let me know if it works for you.

  3. #3
    Tim (Super Moderator) Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,746

    That utility was really designed to let you center EXE files that you launched from your projector (via EXEC) but it could also be used to center your projector when launched from a CD, BAT file, etc.

    If you have trouble getting it to work, just give me a shout. I'm quite happy to build these little things to help people out and if they don't quite do the job for you I can always "adjust" em


  4. #4
    Senior Member
    Join Date
    May 2001
    Posts
    109
    I see, I havent made a bat file in ages, how would you make it center the main exe itself? I have a cd project that I want to center, currently I am just having it go fullscreen(it is 800x600) which looks a bit pixelated at higher res settings. I'd like to have it launch at its designed size but it never centers.

    [Edited by airman28 on 08-23-2002 at 10:52 AM]

  5. #5
    Tim (Super Moderator) Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,746

    usage: center.exe pattern

    CENTER allows you to reposition any running application on the desktop. The size of the window being centered and the size of the desktop are determined dynamically at run time so you don't have to include any of that information in your call.

    If you call CENTER without specifying a value for the pattern argument, nothing will happen. If you supply a value for the pattern, any window that contains the pattern in its caption will be centered on the desktop. Case is not important but spaces are significant.

    This command fscommand("EXEC", "center.exe" + chr(9) + "Flash"); will center all open windows that have "Flash" in the caption.

    * If you use the old Flash trick of using tabs in place of spaces, CENTER will look for tabs in the caption (exact match) and will probably fail to find the application.

    * Flash 5 will allow you use a tab between the application name and the pattern.

    * Flash MX does not allow spaces or tabs in the argument to the EXEC command. This means that the CENTER utility can't be called directly from Flash MX.

    * In a batch file the pattern can contain spaces which provides a workaround for Flash 5 limitations and makes it possible to use CENTER from Flash MX projectors.


  6. #6
    Tim (Super Moderator) Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,746

    I've also built a new version of the CENTER utility that's a little more flexible. Download http://www.northcode.com/misc/center.zip and have a look at the readme file.


  7. #7
    Junior Member
    Join Date
    Aug 2002
    Posts
    3
    [/B][/QUOTE]i've tried center.exe assigned to a button using the exec in flash 5...
    on (release) {
    fscommand ("exec", "center.exe");
    }
    the cmd file has the name of the file in it that i am trying to open and they are in the same folder as the center.exe app. it doesn't work for me though. is there a way to open the center.exe app? What would you assign the fscommand ("exec", "center.exe") to if you were trying to open the main projector with it centered...i didn't get that part in the last post. thanks again...


  8. #8
    Tim (Super Moderator) Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,746

    First, be sure you're using the right center.exe file! The old one works using a command line argument, the new one uses a CMD file.

    The cmd file has to have the same name as the EXE file you EXE from Flash. If you use fscommand("EXEC", "CENTER.EXE") then you should have CENTER.CMD in the same directory (the fscommand directory).

    The contents of the CMD file should be a fully qualified path to the file you want to launch, like "C:\WinNT\Notepad.exe" or a relative path to the file you want to launch (relative to where the CMD file is).

    Try it from the command line first to make sure you've got it working properly before you try and call it from Flash



  9. #9
    You can also use *********** Jugglor

    http://www.jugglor.com

    It has many other features too.

    Download a FREE evaluation and try for yourself.

  10. #10
    Member
    Join Date
    Nov 2001
    Posts
    82
    Northcode..

    This is so simple and briliant - I used your center application - thanks !!!

    It solved me a huge problem

    Thanks again.

  11. #11
    Junior Member
    Join Date
    Aug 2002
    Posts
    3

    Lightbulb center utility to overcome MX fscommand limitations?

    Northcode

    Would it be possible to give command line arguments to the program listed in center.cmd? This way your tool could also be used as a wrapper to foil the MX problem of not allowing spaces in the exec string (for example, to open an html document).

    Thanks,

    R

  12. #12
    Tim (Super Moderator) Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,746

    Yes, and it's a simple change. Right now I test to make sure the EXE in the CMD file actually exists. If I remove that check you can add a command line!


  13. #13
    Tim (Super Moderator) Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,746

    I just uploaded a new version that allows you to pass command lines to the application that you're launching. You can grab it from http://www.northcode.com/misc/center.zip. It replaces the old version but anything you did with the old version will still work with this one. Enjoy


  14. #14
    Junior Member
    Join Date
    Aug 2002
    Posts
    3

    center.exe odd behavior on XP?



    Hey, thanks for that change. One thing though, when I run a flash projector .exe from your center app, it loads with the caption "TRd ww: <full path of projector>" and there is no display, just the window border. Indeed it is centered.

    Maybe this is just XP?

    R

  15. #15
    Tim (Super Moderator) Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,746

    The little echo program was just for testing to see that the command line parameters were being passed properly. Echo.exe just displays a message box, it doesn't have a real "window" that center can position.

    Note: Message boxes without parent windows (like in Echo) are supposed to be centered in the work area of the display (i.e. the part not covered by the taskbar).


  16. #16
    Junior Member
    Join Date
    Oct 2002
    Posts
    12
    i hate bringing old posts back from the dead, but i was looking for ways to center a flash exe and came across this thread..

    i tried the northcode app and it works pretty well, but, in windows xp i am seeing some odd happenings..

    everything works fine, but the projector.exe that is being called from center.cmd is randomly opening at 2 different resolutions.. one resolution is the project size, and the other is about 20 percent bigger.. both are centered perfectly...

    its not a big deal, but unfortunately the slight increase in size jaggies my graphics and videos ..

    any advice?

    - eddie -

  17. #17
    Tim (Super Moderator) Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,746
    What are you putting in the .CMD file and how are you calling the whole thing from Flash?

  18. #18
    Junior Member
    Join Date
    Oct 2002
    Posts
    12
    the .cmd file is in the same directory as "center.exe" and i put "projector.exe" in the .cmd file.. the projector is in the same directory as the cmd and center.exe files..

    i'm calling it via autorun off of a cd, but that doesnt make a difference since simply double clicking the center.exe file with everything set up correctly yields varying sized projector windows...

    very odd.. is there any way to hard code it to open at a certain size only?

    thank you,

    - eddie -

  19. #19
    Tim (Super Moderator) Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,746
    Center doesn't monkey with the size of your EXE, just the position. It obviously shouldn't be opening two copies either. Can you send me the SWF file that you're using? I'll convert it to an EXE here and test it on XP to see if I can reproduce your problem. Send files to support@northcode.com

  20. #20
    Special Member raufaamir's Avatar
    Join Date
    Sep 2001
    Location
    Satellite Town, Pluto, Universe
    Posts
    201
    I also download the center.exe file recommended by northcode. This works fine but some time window opens at the different sizes.

    So pls let me know how can I overcome this problem?

    Thanks.

    [Illustration][Commercial Designing]
    [Textile Designing][Large Format Printing] [Web Designing]

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

Poll by Flashkit.com