PDA

View Full Version : Loading a movie from a flashmenu?


xtreme
03-23-2004, 05:09 AM
If I want do load a movie from a button I use the code.

Video.Load("Video1", "AutoPlay\\Videos\\movie.avi", true, false);

How do I load a move from a flashmenu, what is the link i flash?

yosik
03-23-2004, 08:48 AM
You have to use FSCommand in Flash for the button (OnClick).
In AMS, have an action for the flash object on FSCommand and use the FSCommand/FSCommand Arg as variable (for example the name of the video file).
Then you can use your action, using that variable instead of the video file name.
Good Luck
Yossi

xtreme
03-23-2004, 01:10 PM
Originally posted by yosik
You have to use FSCommand in Flash for the button (OnClick).
In AMS, have an action for the flash object on FSCommand and use the FSCommand/FSCommand Arg as variable (for example the name of the video file).
Then you can use your action, using that variable instead of the video file name.
Good Luck
Yossi

Thanks!

But I dont understand mutch of that ;) Do you want to give me little code please?

yosik
03-23-2004, 03:43 PM
Here it is.
I added the FLA in the Doc folder.
You have to put a video file into the video folder and link the play action on the flash object to the video file.
Goood luck
Yossi

xtreme
03-23-2004, 04:48 PM
It works great. But if I have an dropdown flashmenu?

I post an exampel what I meen.

yosik
03-24-2004, 07:20 AM
Just attach the FSCommand to the relevant button.
WHat you can do is use the FSCommandArg which is the second parameter in the FSCommand in flash and then in AMS, in the action for the flash object, use an IF statement which checks the value of this parameter and, accordingly, shows the relevant movie.
Yossi

xtreme
03-24-2004, 06:22 PM
Sorry but I dont understand, I have testing many hours now. Think the problem is that Iam not so good in flash. ;)

I post the menu and XML file I would like to use. Can you insert the code for 2 buttoms ex "Other" and "Project1" and the right code in the movieobject in AMS, please.

Thanks for all help.