I have created a web page using cakephp. Now I feel like my boring map on the main page is killing it. I bought imapbuilder which lets you do flash effects on images, however I don't seem to be able to get the code working.
Here is the code I pasted in my home page, but it won't load. All I see is a blank square.
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0"
width="800" height="747" align="middle">
<param name="allowScriptAccess" value="always" />
<param name="movie" value="imapbuilder/loader.swf" />
<param name="base" value="imapbuilder/" />
<param name="flashvars" value="datasource=urlife_map.xml" />
<param name="loop" value="false" />
<param name="menu" value="true" />
<param name="quality" value="best" />
<param name="wmode" value="transparent" />
<param name="bgcolor" value="#ffffff" />
<embed src="imapbuilder/loader.swf" base="imapbuilder/" flashvars="datasource=urlife_map.xml" loop="false" menu="true" quality="best" wmode="transparent" bgcolor="#ffffff" width="800" height="747" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>
</object>
This same code I pasted into a separate file and it worked. I kept the folder imapbuilder on the same directory as the home page file.
Does anyone have an idea why this won't load and work on my website?
Files can only be accessed if they are located inside the webroot directory of your app using a standard CakePHP setup.
I suggest you move the imapbuilder folder to the webroot folder and also append all references to it with a / (e.g. /imapbuilder/loader.swf instead of just imapbuilder/loader.swf).
I think an easier solution for you is to use iMapBuilder.net -- which is the online version of iMapbuilder. The map will then be remotely hosted on their server, and all you need to do is copy and paste their code so that no file copying / directory issues.
I have used imapbuilder.net on few CMS based sites, e.g. dotnetnuke and wordpress. And the online based map solution is a lot easier than their Windows version, at least for CMS based sites.
Related
My add-in loads properly with Word on Windows, but shows loading errors through Word Online (tested with Chrome, Firefox & Edge) even though clicking through the prompt buttons eventually loads the add-in and everything works as expected. This is what I am seeing in the add-in just loading a usage page (https://office.flexxlegal.com/Home/Usage):
Page loads in the taskpane with a grey overlay & loading animation
Receive Add-in Error message - Something went wrong and we couldn't start this add-in. Please try again later or contact your system administrator.
Click the Retry button
Page is displayed again in the taskpane with the overlay and loading animation
Receive Add-in Error message - This add-in may not load properly, but you can still try to start it.
Click the Start button
The page loads and everything works as expected
Here are the parts of the app manifest related to his control:
<Control xsi:type="Button" id="Flexx.Help">
<Label resid="Flexx.Help.Label" />
<Supertip>
<!-- ToolTip title. resid must point to a ShortString resource. -->
<Title resid="Flexx.Help.Label" />
<!-- ToolTip description. resid must point to a LongString resource. -->
<Description resid="Flexx.Help.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Flexx.qicon_16x16" />
<bt:Image size="32" resid="Flexx.qicon_32x32" />
<bt:Image size="80" resid="Flexx.qicon_80x80" />
</Icon>
<!-- This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFunction or ShowTaskpane. -->
<Action xsi:type="ShowTaskpane">
<TaskpaneId>FLTaskPane</TaskpaneId>
<!-- Provide a url resource id for the location that will be displayed on the task pane. -->
<SourceLocation resid="Flexx.Help.Url" />
</Action>
</Control>
<Resources>
<bt:Images>
<bt:Image id="Flexx.qicon_16x16" DefaultValue="https://office.flexxlegal.com/assets/img/Q16.png" />
<bt:Image id="Flexx.qicon_32x32" DefaultValue="https://office.flexxlegal.com/assets/img/Q32.png" />
<bt:Image id="Flexx.qicon_80x80" DefaultValue="https://office.flexxlegal.com/assets/img/Q80.png" />
</bt:Images>
<bt:Urls>
<bt:Url id="Flexx.Help.Url" DefaultValue="https://office.flexxlegal.com/Home/Usage" />
</bt:Urls>
<!-- ShortStrings max characters==125. -->
<bt:ShortStrings>
<bt:String id="Flexx.Help.Label" DefaultValue="Getting Started" />
</bt:ShortStrings>
<!-- LongStrings max characters==250. -->
<bt:LongStrings>
<bt:String id="Flexx.Help.Tooltip" DefaultValue="Click to view usage information to get started with this FlexxLegal add-in." />
</bt:LongStrings>
</Resources>
With the webpage being loaded there is no code-behind, no javascript, just a static HTML page. Any insight into what the issue might be, or how I would go about determining the issue?
Thanks,
Ryan
With the webpage being loaded there is no code-behind, no javascript, just a static HTML page
This is your issue. Your add-in's pages must reference the office.js library and include an Office.initialize handler.
I suggest reviewing the documentation for instructions on how Office Web Add-ins work: Understanding the JavaScript API for Office.
I have embedded silverlight control in my html page using object tag. I have to show and hide the parent of object tag by changing the display property of the parent tag. I need to do this because the layout of the page is tabbed, i.e. user can switch between tabs. Showing a tab requires to hide the content of previous tab and show the new content.
Below is the object tag code:
<div id="slControlDiv" style="width:0px; height:0px;">
<object id="slobj" data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100" height="25" style="display: block;">
<param name="source" value="ILCFileUploader.xap"/>
<param name="onError" value="onSilverlightError" />
<param name="background" value="white" />
<param name="minRuntimeVersion" value="4.0.50826.0" />
<param name="autoUpgrade" value="true" />
</object>
When I hide the parent of object tag, i.e change the display to none and then show it back by changing display to block or empty, silverlight control reloads.
Is there anyway to prevent its reloading? I have tried changing visibility to collapse and then to visible, but this works only in IE8 and Firefox. In other browsers the element still keeps occupying the space, although it is hidden. I want the control to release the space as well when it is hidden.
Thanks & regards,
Nadeem Ullah
I found that setting "visibility=hidden|show" of a containing element (eg a div) allowed hiding|showing the contained object element without it reloading when re-shown. Using the "offsets" method also works (absolutely positioning it out of the visible area of the document).
I'm having a somewhat maddening issue just trying to get the Silverlight Pivot Control to work out of the box.
When I wire everything together, I see this stack trace in the JavaScript errors:
Unhandled Error in Silverlight Application Set property 'System.Windows.FrameworkElement.Style' threw an exception. [Line: 9 Position: 35] at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
at VehiclePivotViewer.MainPage.InitializeComponent()
at VehiclePivotViewer.MainPage..ctor(IDictionary`2 initParams)
at VehiclePivotViewer.App.Application_Startup(Object sender, StartupEventArgs e)
at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)
I actually downloaded a helper library to dig further into that exception, and it looks like it's having a hard time with the MainPage.xaml markup, even though it all appears to be valid.
If it's helpful, I've listed the steps I took to set it all up below.
Create a new MVC3 web application
Create a Silverlight 4 application project in the same solution, and add it to the web project
Add the five System.Windows.Pivot assembly references
Add the control to my MainPage.xaml
<Grid x:Name="LayoutRoot" Background="White">
<Pivot:PivotViewer x:Name="Viewer" />
</Grid>
Wire up the collection URL: Viewer.LoadCollection(initParams["CollectionUrl"], null);
Set the appropriate values in the view:
`
<div id="silverlightControlHost">
<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
<param name="source" value="ClientBin/xxxPivotViewer.xap"/>
<param name="onError" value="onSilverlightError" />
<param name="background" value="white" />
<param name="minRuntimeVersion" value="4.0.50826.0" />
<param name="autoUpgrade" value="true" />
<param name="enableHtmlAccess" value="true" />
<param name="initParams" value="collectionUrl=#ViewBag.CollectionUrl %>" />
<a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50826.0" style="text-decoration:none">
<img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>
</a>
</object><iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe></div>
`
Anyone have any thoughts or suggestions? I'm extremely new to Silverlight, and am kinda sorta pulling my hair out.
It looks like you are missing <% in front of #ViewBag.CollectionUrl.
I noticed that I had this same problem using only one of my two Visual Studio development machines. The offending machine likely had some wrong versions of the Silverlight dependencies installed, or was missing something crucial. A clean install of VS 2010 and all the Silverlight development tools, as well as the Pivot Control solved the issue. So, for anyone who happens to run into this post, this error may be caused by an incorrect/incomplete Silverlight/Pivot development environment.
Required tools are:
Visual Studio 2010. Get a free version for academics at Dreamspark
Silverlight 4 Tools for VS 2010
Silverlight 4 Toolkit
Silverlight Developer Runtime
My client request a flash header for his website. I'm using asp.net and a master page (where the code for the flash header is). My problem is that whenever I go to a page that's not in the website's root, the flash doesn't appear. I've had the same issue with pure css menus on this site...
Here's the code:
<div id="header">
<!--[if !IE]> -->
<object type="application/x-shockwave-flash"
data="App_Themes/Default/banner1.swf" width="1000" height="400">
<!-- <![endif]-->
<!--[if IE]>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
width="1000" height="400">
<param name="movie" value="App_Themes/Default/banner1.swf" />
<embed src="App_Themes/Default/banner1.swf" width="1000" height="400"></embed>
<!--><!--dgx-->
<param name="loop" value="true" />
<param name="menu" value="false" />
<p></p>
</object>
<!-- <![endif]-->
</div>
As you can see, I'm not calling the path to the flash object relative to the website root (in case this isn't clear... if it were an asp.net control, I'd use ~/App_Themes/Default/banner1.swf")
The flash object is being loaded relative to the location of the current page that's being viewed on the website. Assuming an indeterminate folder depth from root, how can I change the code to load the flash relative to the root, rather than the current page?
I have considered changing the path that's being used by perpending / or ~/ to it, but this only results in the flash not loading on any page at all.
Looking at the source code, the server modifies /App_Themes/Default/banner1.swf to ~/App_Themes/Default/banner1.swf
Sticking a ~/ in a plain URL won't work. Try using this:
<object type="application/x-shockwave-flash"
data="<%=ResolveUrl('~/App_Themes/Default/banner1.swf')%>"
width="1000" height="400">
I've been using uploadify in an app for a few years and it has always worked fine. When I upgraded to the 2.1.0 version, it now comes bundled with swfobject 2.2.
In firefox, safari, and chrome, the file upload and everything works perfectly. However, in all versions of IE, the javascript is not passing any of the parameters to the flash file properly.
Debugging the buttonImg for example works fine inside of the uploadify js, but from inside the flash file it reads as undefined. Again, this is only IE.
What could cause IE to not pass js parameters to the flash object? I'm running the latest flash version.
I've checked into the other related posts here and no one seems to have solved this issue. No javascript errors at all. The flash uploader loads and even appears to work, but only with default values.
I have narrowed the problem down a bit further but still don't understand what's happening. In SWFOjbject 2.2, line 436, the javascript is attempting to replace the "el" element with the new object and it's parameters.
When I alert out "par" I see the list of parameters, complete with the flashvar that I would expect.
<param name="quality" value="high">
<param name="wmode" value="opaque">
<param name="allowScriptAccess" value="sameDomain">
<param name="flashvars" value="uploadifyID=fileInput&pagepath=/clients/WhackCMS/admin/js/tinymce/plugins/whackupload/&buttonImg=http%3A//192.168.0.4/clients/WhackCMS/admin/img/btn-browse.png&script=http://192.168.0.4/clients/WhackCMS/admin/pages/upload&folder=&scriptData=single-auth-token%3Dd06ac6f98b93d980fe7fa1e24fa91ab3f36622ea%26thumb-size%3D150x150&width=157&height=31&wmode=opaque&method=GET&queueSizeLimit=999&simUploadLimit=1&fileDesc=Images&fileExt=*.jpg;*.jpeg;*.gif;*.png&auto=true&fileDataName=Filedata">
I've tried the default el.outerHTML and the $(el).replaceWith methods, but when I try to view the updated "el" object, all I see are some default parameters:
<OBJECT style="VISIBILITY: visible" id=fileInputUploader classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 width=157 height=31>
<PARAM NAME="_cx" VALUE="4153">
<PARAM NAME="_cy" VALUE="820">
<PARAM NAME="FlashVars" VALUE="">
<PARAM NAME="Movie" VALUE="http://192.168.0.4/clients/WhackCMS/admin/uploader_tinymce.swf">
<PARAM NAME="Src" VALUE="http://192.168.0.4/clients/WhackCMS/admin/uploader_tinymce.swf">
<PARAM NAME="WMode" VALUE="Opaque">
<PARAM NAME="Play" VALUE="0">
<PARAM NAME="Loop" VALUE="-1">
<PARAM NAME="Quality" VALUE="High">
<PARAM NAME="SAlign" VALUE="LT">
<PARAM NAME="Menu" VALUE="-1">
<PARAM NAME="Base" VALUE="">
<PARAM NAME="AllowScriptAccess" VALUE="sameDomain">
<PARAM NAME="Scale" VALUE="NoScale">
<PARAM NAME="DeviceFont" VALUE="0">
<PARAM NAME="EmbedMovie" VALUE="0">
<PARAM NAME="BGColor" VALUE="">
<PARAM NAME="SWRemote" VALUE="">
<PARAM NAME="MovieData" VALUE="">
<PARAM NAME="SeamlessTabbing" VALUE="1">
<PARAM NAME="Profile" VALUE="0">
<PARAM NAME="ProfileAddress" VALUE="">
<PARAM NAME="ProfilePort" VALUE="0">
<PARAM NAME="AllowNetworking" VALUE="all">
<PARAM NAME="AllowFullScreen" VALUE="false">
</OBJECT>
It just seems like the el element is simply not being replaced properly. When I attempt this in firefox and safari, the html updates properly.