Welcome to TalkGraphics.com
Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2001
    Location
    Vancouver, BC, Canada.
    Posts
    55

    Default

    I need a button in a Flash movie which acts like "Browse for file" button in a web browser so it opens up Explorer dialog box to find a file on local hard drive (may be using FScommand?).
    Does anyone have any idea how this could be done?

    Thanks for reading :+)

    http://www.linecraft
    IP

  2. #2
    Join Date
    Jan 2001
    Location
    Vancouver, BC, Canada.
    Posts
    55

    Default

    I need a button in a Flash movie which acts like "Browse for file" button in a web browser so it opens up Explorer dialog box to find a file on local hard drive (may be using FScommand?).
    Does anyone have any idea how this could be done?

    Thanks for reading :+)

    http://www.linecraft
    IP

  3. #3
    Join Date
    Aug 2000
    Location
    Dallas, Tx
    Posts
    277

    Default

    Sorry nobody has been able to help you with this. I would like to know how to do this as well. Heck, I would like to know how to do this on a regular web page.

    Good luck,

    Scott
    IP

  4. #4
    Join Date
    Jan 2001
    Location
    Vancouver, BC, Canada.
    Posts
    55

    Default

    Thank you at least for the reply Stinger.
    If you really want to know how it is done on the web page go here: http://www.flashmove.com/board/showt...ghlight=upload

    The forum is quite active -people post and reply a lot.

    My goal is more complicated (I guess)-I want it done in the projector or from the player ( .swf on the local hard drive)

    Thanks again. [img]/infopop/emoticons/icon_biggrin.gif[/img]

    Alex.
    http://www.linecraft.com
    IP

  5. #5
    Join Date
    Aug 2000
    Location
    Toronto, Ontario, Canada
    Posts
    432

    Default

    ...I don't know of any way to do this from within Flash, without a hosting application. You can get Flash to interact with HTML via JavaScript, of course, and put the file browser there...but as always, for something like this, it seems like it's better done in Director (with all the caveats that come with that, of course).

    If it's for a projector, then I'd definitely say to do it in Director...and embed whatever Flash you need in the Director movie.

    If it's for the Web, I'd say to use HTML. Incidentally, Scott, the way to search for a file in HTML is simple: <INPUT TYPE="file" NAME="whatever"> - that's it!!!

    I'll keep looking for ways to upload a file using Flash, but I'm not sure it can be done.


    hth,
    Deep (just a guy)
    <font face="arial" size="2">
    Pradeep Kumar Nair, B.Math
    Interactive Developer
    http://www.bluespark.com
    ICQ: 39102360
    </font>
    hth,
    Deep (just a guy)
    --
    Pradeep Kumar Nair, B.Math
    CTO
    9 Story Entertainment
    http://www.9story.com
    IP

  6. #6
    Join Date
    Aug 2000
    Location
    Dallas, Tx
    Posts
    277

    Default

    Is there a way to limit the uploads to certain file types? For instance, if I only want .jpg files to be uploaded, would there be a way of filtering the file types?

    Thanks,

    Scott
    IP

  7. #7
    Join Date
    Jan 2001
    Location
    Vancouver, BC, Canada.
    Posts
    55

    Default

    Hi Stinger,
    I think limiting file type upload could be done this way:

    1. You define the actual upload function -"uploadFunction()"; and iteration variable "jpg_num"

    2.Then you check the substring of "the_file" textfield when your "submit" button is released:

    //Check for the file extension and weather the limit has been exceeded
    if ((the_file.substring((the_file.length-4),the_file.length)==".jpg")and (jpg_num>=limit)){
    //imitate javascript alert and do nothing
    }

    else if(the_file.substring((the_file.length-4),the_file.length)==".jpg"){
    //Iteration
    jpg_num++
    //upload code goes here
    uploadFunction();}
    }

    //If any other extension
    else {uploadFunction();}

    It's not a complete code but you get an idea.

    If you wan to limit a number of file types you could use an array to store file extensions and then loop through the array...

    One problem though: your flash movie has to communicate with JavaScript on the HTML page (setting a cookie) or with server. Otherwise the variables will be lost when the page is reloaded.

    Good luck [img]/infopop/emoticons/icon_razz.gif[/img]

    Alex Dzhulay
    http://www.linecraft.com
    IP

  8. #8
    Join Date
    Jan 2001
    Location
    Vancouver, BC, Canada.
    Posts
    55

    Default

    Deep, thanks for the Director idea.

    I am developing a small app and I need save and browse for file functionality.

    I was using WildForm SWfx for text effects before and the whole program is just a Flash projector file. You can Save from it (obviously).swf files. Do you think it's done in Director?

    Thanks.

    Alex.
    IP

 

 

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
  •