Can you please let me know how to add flash object into the custom task pane using VSTO?
+1
A:
You can add a "Shockwave flash object" control to your task pane or form region. You may have to find it in your user controls and add it in you tool box. You can then set the Movie property to the URI of the flash swf.
Marcus
Update
You can add you swf file to your project and set it to copy to output then you need to reference it in code.
add a helper property to you addin or copy the code out.
static public string AssemblyDirectory {
get {
string codeBase = Assembly.GetExecutingAssembly().CodeBase;
UriBuilder uri = new UriBuilder(codeBase);
string path = Uri.UnescapeDataString(uri.Path);
return Path.GetDirectoryName(path);
}
}
Then in your taskpane showing/init event
String swfPath = AssemblyDirectory + Path.DirectorySeparatorChar + "menu.swf";
axShockwaveFlash1.LoadMovie(0, swfPath);
76mel
2009-07-15 08:58:48
yes i did that but when i do setup the pulgin it will not have the flash object in it that is i tried to place the .swf (flash file) in project bin folder it didnt work but if i place flash file ouside the project folder and specify the path then it works fine even in that during setup .swf files are not copied
2009-07-15 09:47:08
please help me how can i slove this
2009-07-15 09:47:53
2009-07-16 03:10:29
please can i know to which folder of my project i must add .swf file
2009-07-16 03:43:28
hi Marcus thanks for the post i tried as u specified i placed .swf file in project folder i.e in bin directory then i copied that into output directory and i added ur code but it works when it is executed but it will not work when application is run through setup please can i know how to make it work
2009-07-16 04:25:59
divya, How are you seting this up as click once ? also can you see the swf file in you vsto cache folder ? it could be a number of things .. one that it not getting copied or 2 security is stopping it .. also ouput the path ... Assembly.GetExecutingAssembly().CodeBase should get you the manifest .
76mel
2009-07-16 08:52:11
You could also install the swf file in a known path on the client may be %app_data%
76mel
2009-07-16 09:04:57
ya i am trying to setup through click once .swf file is available in setup folder Application files>bin>debug but also its not taking no security issue but one more thing i s after deployment the file extension is getting change like i.e before deployment movie.swf and after deployemnet movie.swf.DEPLOY like this its changing i am not able to proceedreally can be place flash object in custom pane???
2009-07-16 09:11:57
How shall i copy .swf file in the process of setup ?? and how shall install swf file through setup??
2009-07-16 09:15:08
Clickonce is a pain... when you click the vsto file its insatlls the addin into another location .. normally on XP c:\document and settings\<username>\Local Settings\Apps\2.0 and normally under one of the sub dires there. take a look to see if you swf flie is bein installed into there. You could always do a good old msi install .. check out : http://code.msdn.microsoft.com/VSTO3MSI/Release/ProjectReleases.aspx?ReleaseId=729
76mel
2009-07-16 09:35:22
yes it getting copyied to the c:\document and settings\<username>\Local Settings\Apps\2.0 \flashexmp\bin\movie.swf to this location so can i give the path for this ,if yes then how can i give please help me
2009-07-16 09:43:57
.swf is getting copied to the c:\document and settings\<username>\Local Settings\Apps\2.0\99876512.. \flashexmp..\bin\movie.swf to this location so can i give the path for this ,if yes then how can i give please help me
2009-07-16 09:48:51
A:
thanks for all who are all replied for my post the code helped me in one way i did some changes and i executed ,it solves my problem thanks for all the reply
Please post your answer as it will help others .. the above worked for me .. codebase contains the ClickOnce cache path and from there you can find your files.
76mel
2009-07-17 09:43:41
A:
Hi,
I have come across such a situation where I need to put flash object in Outlook Addin while addin is loading for the first time. Can I load addin asynchronously ?
Can you please provide help on that.
Thanks, Ashish Chotalia
Ashish
2010-09-10 09:18:50