Advanced Search

Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: How do I open my local 'My Documents' folder from a flash button link?

  1. #1
    Join Date
    Oct 2010
    Posts
    4
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default How do I open my local 'My Documents' folder from a flash button link?

    I browse through several different folders all day at work (...in and out - open and close - minmize maximize - in and out - open and close). It's a part of my job to access these files at random times when needed, but it's getting on my nerves and it's driving me insane.

    Of course the simple thing to do is make shortcuts to all of these folders and problem solved; however,...

    I wanted to do something a little more fancy than make a boring folder full of shortcuts... ...because staring at your typical boring folder full of icon shortcuts is just not satisfying for me Lol.

    I thought if I could simply make a nice clean elegant organized flash template of simply just buttons, then I could link them as shortcuts to these folders the same way (but in elegant style and user friendly ease).

    Keep in mind, all I am trying do is open up local folders (not local html files).

    I have the flash template tip top, and all the buttons work to real web URL's (google, yahoo, etc..)

    However,

    None of my local folder shortcuts will open up.

    I test the link in my browser and it works. I test it in windows explorer and it works, but when I place that same link in my XML file nothing happens.

    Here is an example link from XML file:

    <button name="HOME" linkType="_blank"link="C:\Users\Anonymous\Documents" />


    Does anybody know how to a link local folder in an XML document? Surely this is far too simple to be impossible, I just can't seem to get it right though.

    I can provide whatever you need me to give you a visual of what I'm looking at.

    Thanks in advance for anyone who resolves this for me.

  2. #2
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    You need to call it via "file:///" because it isnt on the http or ftp protocols.

    Code:
    <button name="HOME" linkType="_blank" link="file:///C:\Users\Anonymous\Documents" />
    I think would do it, dont have access to a pc right now that also assumes

    Code:
    <button name="HOME" linkType="_blank" link="http://www.google.com" />
    loads google into a new window.
    Corrections to my coding/thoughts welcome.

  3. The Following User Says Thank You to bluewalrus For This Useful Post:

    AdvancedNoob (10-03-2010)

  4. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,704
    Thanks
    43
    Thanked 3,133 Times in 3,097 Posts
    Blog Entries
    12

    Default

    You may even need:

    Code:
    file://localhost/C:/Users/Anonymous/Documents/
    In any case, the slashes must all agree (all / or all \). IE will sometimes accept \ for local files, but even it will sometimes balk at that. Other browsers do not accept \ for anything.

    In an xml file, depending upon how it's being interpreted, \ may be seen as an escape character. If so, it's skipped.

    There are security restrictions on Flash that are greater than those on browsers. These may or may not be a factor here.

    If having:

    a boring folder full of shortcuts
    is all you want to avoid - Once you have your shortcut, you can choose any icon you like for it. You can even make your own. Icon files (.ico) may be constructed with numerous sized icon versions inside them. These can each be different, or simply different resolution versions of the same image. Which version is used in the folder view depends upon the OS and the view settings for that folder. By playing with the two parts of this that you can easily change (the icon file and the folder view), you can get a fairly interesting looking interface.

    Even without making your own .ico file, there are many many icons to choose from in Windows icon libraries both on your computer already in the library offered for a program with no internal icons and in the various programs around your hard drive that have icons. Also, icons and icon libraries may be downloaded from the web.
    Last edited by jscheuer1; 10-03-2010 at 12:08 PM. Reason: add detail
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. The Following User Says Thank You to jscheuer1 For This Useful Post:

    AdvancedNoob (10-03-2010)

  6. #4
    Join Date
    Oct 2010
    Posts
    4
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    First of all I would really like to thank the bluewalrus and jscheuer1 for giving me a few toys to play with (the lines of code), it really does help to know you have support with techinical issues like these.


    What Ive found actually works is:

    <button name="HOME" linkType="_blank" link="file:///C:\Users\Anonymous\Documents" />

    -(and or also)-*they both work

    <button name="HOME" linkType="_blank" link="file://localhost/C:/Users/Anonymous/Documents/" />


    However, the URL's to real web pages only open up if I upload the template to my server (but the local links do not).

    No worries on that though, because I can use local batch files to call the real URL web pages (even though I have that "Run - Save" security warning each time).

    My next question though however, is now that I have successfully found a working local link, now it seems the local link only opens up behind the browser page I'm opening it from.

    Is there anyway I can code this to open up the window front and center right in front of my template so that it pops up right in front without me clicking the window to the front?
    Last edited by AdvancedNoob; 10-03-2010 at 04:25 PM. Reason: typo

  7. #5
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Removing linkType="_blank" should make it load up in your current window.
    Corrections to my coding/thoughts welcome.

  8. The Following User Says Thank You to bluewalrus For This Useful Post:

    AdvancedNoob (10-03-2010)

  9. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,704
    Thanks
    43
    Thanked 3,133 Times in 3,097 Posts
    Blog Entries
    12

    Default

    I don't know enough about Action Script to say. But in javascript (for IE and Firefox only) that would be focus(). You would obtain a reference to the window and do:

    win.focus();

    Generally whenever the browser opens a new window it gains focus unless you are simply populating an existing window, in which case it maintains the level of focus it has. Are you sure you are opening a new window, or are you just changing the 'page' in an existing one.

    But it might have to do with what is opened. If it's an Internet Explorer browser window, it should be fine. If it's Windows internal Explorer (file manager type thingy), tough to say.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  10. The Following User Says Thank You to jscheuer1 For This Useful Post:

    AdvancedNoob (10-03-2010)

  11. #7
    Join Date
    Oct 2010
    Posts
    4
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    Here is one thing I didn't mention for the sake of everyone thinking I was nuts. Lol

    This flash template is in an excel file. Lol That's right, I'm calling all of these local folders from a flash template in a web browser object embedded within an excel file.

    ...yeah.. what the??? lol

    Of course you may be wondering why... and that's because I work with this excel file in addition to these folders. The opening and closing of folders and back and forth to this excel file makes me dizzy as much as I do this from day to day at work.

    Consolidation, speed, and compact ease is my primary focus.

    That's why I'm trying to consolidate all shortcuts and folders in this excel file in one place. My goal is to leave this excel file as few times as possible.

    To bluewalrus: When I remove linkType="_blank", it opens the folder up actually in the excel file. You would think this would be all fine and dandy for me; however, when the folder is opened in the actual excel file window itself I have no back folder browser buttons, and to make matters worse they default in "tile folder view".

    You can call me picky or borderline OCD, but I work fast in and out of these folders and I can't quickly see the folder I need to jump into in a matter of seconds if they're in "tile view". Not to mention if I can't back out of any folder once I dive into one.

    What I'm doing may sound ridiculous. But believe me the code you guys have already helped me with is almost there, and the progress I could make with this excel flash consolidated web template is substantial.

    This is the most simple complicated idea I've ever come across.
    Last edited by AdvancedNoob; 10-03-2010 at 05:17 PM. Reason: typo

  12. #8
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,704
    Thanks
    43
    Thanked 3,133 Times in 3,097 Posts
    Blog Entries
    12

    Default

    I still think the solution might be in the ActionScript used to make the swf you are using. ActionScript is derived from javascript, so perhaps there is an equivalent for focusing the window once it's opened.

    However, throwing Excel into the mix might obviate that.

    You still haven't answered my question though. What opens? Is it the browser, or the native Windows Explorer (file manager type thing)?

    Anyways, I Googled: ActionScript window.focus

    and this was the first result that looked promising:

    http://help.adobe.com/en_US/AS3LCR/F.../HTMLHost.html

    In it is indicated that the ActionScript method is:

    Code:
    windowFocus
    However, that would only focus the current window (Excel in this case). What you might be able to use is:

    Code:
    windowBlur()
    to hopefully get the Excel window to recede after launching the new window. I'm not sure exactly how to code that in ActionScript, or if it would work, considering that the Excel window isn't a browser window.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  13. #9
    Join Date
    Jul 2009
    Location
    Binus University
    Posts
    452
    Thanks
    76
    Thanked 21 Times in 21 Posts

    Default

    what happen if i upload that flash file to the server.
    Is this script will work and open local my document that everyone click on it?

    If that could work out, so i can force someone to open some program to right, in their own computer? like Notepad / Microsoft Office something?
    _____________________

    David Demetrius // davejob
    _____________________

  14. #10
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,704
    Thanks
    43
    Thanked 3,133 Times in 3,097 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by davelf View Post
    what happen if i upload that flash file to the server.
    Is this script will work and open local my document that everyone click on it?

    If that could work out, so i can force someone to open some program to right, in their own computer? like Notepad / Microsoft Office something?
    That's an interesting question. I'd have to say no because the browser and/or the Flash plugin should 'know' that's an unsafe operation and either block it or raise a warning, unless the settings on your end (the user's end) were such as to allow it in general or for that domain specifically.

    Unsafe because once you run any application on the user's HD, you can potentially run any other.

    This would depend upon the browser and/or Flash plugin version (in the case of the browser, also upon which browser it is). In certain cases, the OS itself might block it. And, as I say, upon the settings in those (if any) visa vis allowing that sort of operation.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •