A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Button Problem Someone Please Help!

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

    Button Problem Someone Please Help!

    I have a Button with the following action:

    on (rollOver) {
    gotoAndPlay(2);
    }
    on (rollOut) {
    gotoAndPlay(3);
    }
    on (release) {
    // loadMovieNum("main_4.swf",2);
    if (_root.pressed_link<>4) {
    _level2.gotoAndPlay("dissappear");
    _root.pressed_link = 4;
    }
    }


    it works fine but I need it to open a file called "main_4.exe" not "main_4.swf" When I change the code to

    // loadMovieNum("main_4.exe",2);

    it still opens the .swf file. Can someone help me out.

    -Thanks

  2. #2
    ___________________
    Join Date
    May 2004
    Posts
    3,174
    Code:
    on (rollOver) {
    gotoAndPlay(2);
    }
    on (rollOut) {
    gotoAndPlay(3);
    }
    on (release) {
    //  loadMovieNum("main_4.swf",2);
    if (_root.pressed_link<>4) {
    _level2.gotoAndPlay("dissappear");
    _root.pressed_link = 4;
    }
    }
    those slashes it make that line not do anything

  3. #3
    Junior Member
    Join Date
    Oct 2004
    Posts
    6
    when I take the slashes out the button will not work unless I keep the .swf extension in the code. When I take the slashes out and add the .exe extension the button does nothing.

  4. #4
    ___________________
    Join Date
    May 2004
    Posts
    3,174
    you must have a magical flash that's different from mine then.

  5. #5
    Junior Member
    Join Date
    Oct 2004
    Posts
    6
    I have tried to edit it in the newest flash MX and the older version with the same problem. Could it be somthing in a differnt action that this one keeps refering back too?

  6. #6
    Beyond the Sea
    Join Date
    Mar 2000
    Posts
    997
    I don't think you can target an .exe directly...I think it's part of the flash player's limitations in relation to files and the operating system.

    What you'll probably have to do is write a .bat file that will open your exe and target that instead. Or, you could always use SWF Studio or one of the other flash projector-enhancing programs out there.

    You might get more response in the standalone forum here on flashkit...
    The Coolest Website EVER!
    Do you live in Kansas City? Come join us at KCWebCore

  7. #7
    ___________________
    Join Date
    May 2004
    Posts
    3,174
    ______________

    ok that was childish, my bad.

    1. // indicates a comment line - a place for programmers to leave instructions. you'll see the line turn gray in the actions panel - this means it doesn't do anything - i promise.
    2. you can't use loadmovienum or loadmovie or anything like that to load exe files. loadmovienum will only load swf and jpg files.
    3. there's a couple different non-complicated ways but they will all give the user a choice to "open" or "save" - if they pick "open" it'll work; if that's not ok, everything else is probably gonna be over your head.

    * right click your exe and pick "create shortcut".
    * copy that shortcut to the same folder as your swf.
    * rename it to
    code:

    jim


    * put this on your button
    code:

    on (rollOver) {
    gotoAndPlay(2);
    }
    on (rollOut) {
    gotoAndPlay(3);
    }
    on (release) {
    getURL("jim.lnk",2);
    if (_root.pressed_link<>4) {
    _level2.gotoAndPlay("dissappear");
    _root.pressed_link = 4;
    }
    }



    good luck


    ________________

    edit: replies werent there, didnt mean to bump yas
    Last edited by moagrius; 10-14-2004 at 02:47 PM.

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