Link to home
Start Free TrialLog in
Avatar of cyberspy
cyberspy

asked on

How to make a movie clip draggable?

Hi all,
Please help. I am trying to make a movie clip draggable.  What I should specify in the action script window for my movie clip?

Also, I have another question.  I want to open a text document from Flash.  Say, the flash movie will be played on a harddrive (not online) and I have a text file, or a .doc file located on  my computer.  Is there a way I can open the file and launch Word for example? I don't want to open the file in flash but to open it from Flash.

Thanks.

ASKER CERTIFIED SOLUTION
Avatar of rootdir
rootdir

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rootdir
rootdir

I have created example for you post your email I will send it to u.

Cheers
RootDir
Avatar of cyberspy

ASKER

RootDir,

Thanks for your help.  I wasn't sure if I needed a button in it and I was trying to make it work with onClipEvent.  But it works now.
Also, I edited my question and added some points, maybe you can answer the second part for me as well?
Also, for the draggable clip, there's an option to specify for  "constrain to recrangle" and there's top, bottom, left and right.  How do these numbers work? I tried to specify them but not much changed.  Also I don't want the movie clip to be dragged outside of my main movie stage and i wanted to specify it somehow.  Can that be done?
Thanks again.

RootDir,

Please disregard the other part of the question regarding the specifications for "constraining to rectange", I figured that one out.  I just need to know the other part regarding the text file.  Thanks.

cyberspy,

Here is good example from macromedia site for drag movie

http://www.macromedia.com/support/flash/action_scripts/nesting_movies/index.html

try to move some of those boxes and see the magic.

for your second question -

Keep in mind that this below tech. only works in desktop version. not on internet. If you want to do it on internet you have to consider iis security in mind.

simple way you have to create batch file and call it from flash. So that whatever file you wanted to call it will open with associated program.

You have to call batch file with "fscommand" function and "exec" parameter.

on (release)
{
     fscommand ("exec", "start\yourbatchfile.bat");
}

See this tech. depends upon on which platform you are running your flash movie.

See this example for your further ref.

http://www.actionscripts.org/tutorials/beginner/exec_files/index.shtml

they have shown how commands are different from win95,98 to win2000. You have to play with these commands. It is because of different commands for different microsoft operating systems.

Otherwise you have create seperate vb application/exe which take file name as parameter and open that file for you.

I think this will help you lot. If you have any questions post them.

Two questions for 100 pts.? Just kidding

Cheers,

RootDir
I'm not sure I got all of this.  How do I create a batch file and how does it work? What if I want to use it on Mac? does it work only for windows?
thanks, I added some points for you.

the draggable movie I figure out, don't worry about that one.
Yep this will work on windows. I think batch files are ava. in unix but I am not sure in Mac.

Do you use Mac or Windows?

I will fig. is batch file works on Mac?

RootDir
I think,

 if you are using windows then you have to create batch file(.bat).

 if you are using Unix then you have to create .batch file

 if you are using mac then you have to create .mac file

 Which will open whatever file you need to open and call resp. .bat or .batch or .mac file from flash that's it.
Thanks for your help!