KB118: The "Object doesn't support this property or method" error

Normally when you create Flash files you will copy them to your web server and your clients will access them with a url such as http://www.myorganization.com/myproject.swf. However if you use the Builder's Run in Browser feature, or simply double-click on a local Flash file, you are running content from a local file system url, such as c:\...\Character Builder Projects\MyProject\Output\MyProject.swf.

When running flash files from the file system you will need to tell Flash that it can trust the Flash content before it lets you access it properly. For example, controlling the CB output through the External Connection mechanism will NOT work until you use the procedure described in this note. It will result in the javascript error "Object doesn't support this property or method".

Here are the steps to take to make the "Character Builder Projects" folder a trusted location:

  1. Right click on the Flash output and choose Settings.

  2. Click Advanced... on the resulting dialog - the Adobe Settings Manager will open in a web browser.

  3. Click Global Security Settings Panel.

  4. From the dropdown choose Add Location....

  5. Click Browse for folder... and browse to your "Character Builder Projects" folder located in your Documents directory.

  6. Click Confirm to confirm this as a trusted location. Your screen should look like this:

Note that your end-users will not need to do this as they will normally be running your content over the web.

Users of the Character Server and the msSpeak API will also need to use this procedure to allow local content to access a cs.exe URL, such as may be found in the External Message panel.

There is one other case where the "Object doesn't support this property or method" error can arise. For security and cross-browser compatibility, the Character Server must always reside on the same domain as the Character Builder output. You can, however, place your actual character on a different domain - simply place a full path to the Character Builder content in the OBJECT tag. If you use this technique, you will once again run into the "Object doesn't support this property or method" error until you add the parameter allowScriptAccess=always. If not specified, the allowScriptAccess defaults to "sameDomain", which only lets you use the API on CB output residing in the same domain as your web page. By setting this value to "always", you enable the API for use with CB output residing on a different server. Here is an example of how this might look on your page:

AC_FL_RunContent('codebase','http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0', 'width','250','height','400','id','Movie1','name','Movie1', 'movie','http://www.myserver.com/myproject','src','http://www.myserver.com/myproject', 'quality','high','bgcolor','#ffffff','loop','false','menu','false', 'allowScriptAccess','always', 'pluginspage','http://www.macromedia.com/go/getflashplayer');



Copyright © 2016 Media Semantics, Inc. All rights reserved.
Comments? Write webmaster@mediasemantics.com. See also our privacy policy.

Image 01