User Tag List

Results 1 to 3 of 3

Thread: drag a file into mmf and save somewhere?

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module

    Join Date
    Jul 2006
    Location
    S.East England
    Posts
    744
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    drag a file into mmf and save somewhere?

    Hi All,

    Is this at all possible?

    I want the user to be able to drag a file into my MMF app and for that file to save somewhere on my computer/network. The file can be anything ie jpg, docx, avi.

    I have tried a few things, but couldn't seem to get it working correctly..

    any ideas greatly appreciated.

  2. #2
    Clicker Multimedia Fusion 2SWF Export Module

    Join Date
    Sep 2006
    Posts
    1,544
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    MMF2's support for dragging and dropping files onto an application can be found under "Special" conditions/actions, the gear icons.
    For conditions, you want the "Have have been dropped?" condition. This will trigger whenever a file is dragged and dropped into the frame
    Then you can retrieve the address of the dragged and dropped files in any expression in an event on that line, using an expression of the Special object again-
    for example:

    Set Global String A to Dropped$(0)

    Dropped$ is under the "Drag and Drop" menu
    The drag and drop supports multiple files being dropped at once, so understanding the proper syntax is important. The files will be listed in order. You can retrieve the number of files dropped from the expression just above it.

    Meanwhile to save a file, you want to use the "File Object" extension, which can copy, delete, paste, etc with files.
    So to construct a simple program that takes the files dragged and dropped onto the frame and saves them elsewhere, it might look like:


    *Have files been dropped?
    -Start loop "Dropped Files" for (NDropped) number of loops

    *On loop "Dropped Files"
    -File Object: Copy a file (Dropped$(loopindex("Dropped Files")) to {whereever your destination is}


    Determining your destination might also be complicated. Say you have a specific folder, "/content", in your applications directory. Then you could move the listed file there by determining the name of the file, moving it to your applications folder + "/content/" and then the name of the file itself. Also, you'd need the extension type (ex .png) For example

    Destination = (apppath$ + "/content/" + FileName$( "File", Dropped$(loopindex("Dropped Files")) ) + ExtensionName$( "File", Dropped$(loopindex("Dropped Files")) )

    Result can be seen in this example file
    drop files.mfa

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module

    Join Date
    Jul 2006
    Location
    S.East England
    Posts
    744
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks. I had tried something similar to what you describe but I didn't quite get it working - appreciate the effort you have taken to explain things better to me

    (and for the example!)

Similar Threads

  1. LOAD/SAVE clone file in ARRAY FILE
    By daniele in forum Multimedia Fusion 2 - Technical Support
    Replies: 20
    Last Post: 24th July 2015, 01:47 AM
  2. When I drag a .jpg file into mmf2 it doesn't show me the picture.
    By UnicornMan in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 16th September 2013, 02:41 PM
  3. How can I save a .ccn file?
    By ekr3peeK in forum Vitalize
    Replies: 3
    Last Post: 7th July 2009, 04:05 PM
  4. File drag over/drag leave features
    By Ran_TH in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 12th January 2009, 05:22 AM
  5. Get and save the file from URL?
    By Blizna in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 29th August 2006, 11:30 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
  •