Want to make externally controlled character

Questions about the Character Builder, primarily for content creators.

Want to make externally controlled character

Postby Dean on Sat Jul 22, 2006 4:04 pm

I am far from proficient with flash, or the character builder, but I have been able to make some decent character movies. However, I want to make a movie that is controlled with external links. I have tried to follow the instruction provided in the manual, but I am not able to get it all in my head. Does anyone have an example of how to do this?

I pretty much understand how to embed the javascript on the html page and how to create the link (I hope). What I don't understand his how to create the command in the character builder to hook the different scenes to the html link.

Any help would be appreciated
Dean
 
Posts: 18
Joined: Fri Mar 21, 2008 6:24 am

Postby staff on Sun Jul 23, 2006 5:08 pm

Please see Project Options, HTML tab, and turn on Include sample external control JavaScript. This will create a sample HTML link that "sets the focus". In Character Builder, the "focus" is always on a given presentation - if the presentation is in a given slide or scene, then that slide or scene will also be visible. You have two means of external control: you can set where the current focus is, and you can set whether the character is "presenting" or idle. This is accomplished through the Focus and Presenting variables, in the root of the generated flash movie.
staff
Site Admin
 
Posts: 632
Joined: Fri Mar 21, 2008 6:24 am
Location: Bellevue, Washington

Postby Dean on Thu Aug 03, 2006 11:44 am

Can you paste some examples of the code to input into the action properties and how the associated html link would look. I am really lost on this.
Dean
 
Posts: 18
Joined: Fri Mar 21, 2008 6:24 am

Postby staff on Thu Aug 03, 2006 11:54 am

So here is the HTML that is generated:

<!-- saved from url=(0013)about:internet -->
<!-- This file has been automatically generated by the Character Builder.
It can be used to test the generated SWF file(s). You can also cut and
paste from this file into your own web page. DO NOT MODIFY THIS FILE,
unless you have turned off HTML File generation (Project Options
HTML) or your changes will be overwritten the next time you Render to Flash. -->
<html>
<head>
<script src="AC_RunActiveContent.js" type="text/javascript"></script>
<script type="text/javascript" language="JavaScript">
<!--
var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
function Play(label)
{
var Movie1Obj = InternetExplorer ? Movie1 : document.Movie1;
Movie1Obj.SetVariable("Focus", label);
Movie1Obj.SetVariable("Presenting", "true");
}
// -->
</script>
</head>
<body>
<script type="text/javascript">
AC_FL_RunContent('codebase','http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0',
'width','640','height','480','id','Movie1','name','Movie1',
'movie','Test','src','Test',
'quality','high','bgcolor','#ffffff','loop','false','menu','false',
'pluginspage','http://www.macromedia.com/go/getflashplayer');
</script>
<br>
<a href="javascript:Play('Pres1')">Presentation 1</a><br>
</body>
</html>

So look at the anchor at the end:

<a href="javascript:Play('Pres1')">Presentation 1</a><

All you need to do is ensure that the function that declaration for Play is also included in the <head> portion of your script, as shown above.
staff
Site Admin
 
Posts: 632
Joined: Fri Mar 21, 2008 6:24 am
Location: Bellevue, Washington

Postby Dean on Thu Aug 03, 2006 1:46 pm

I got it working... the problem was that it was saving the output into a different folder than what I thought it was, so I wasn't even looking at the code that I was modifying.

I now have several scenes that are externally linked.

I would like to have a way to stop the audio with an external link. Do you have an example of how to do this?
Dean
 
Posts: 18
Joined: Fri Mar 21, 2008 6:24 am

Postby staff on Fri Aug 04, 2006 7:43 am

You could add a function:

function Stop()
{
var Movie1Obj = InternetExplorer ? Movie1 : document.Movie1;
Movie1Obj.SetVariable("Presenting", "false");
}

Then call Stop() to get the character to smoothly stop what he is doing or saying, then return to the Idle state.
staff
Site Admin
 
Posts: 632
Joined: Fri Mar 21, 2008 6:24 am
Location: Bellevue, Washington


Return to Character Builder

Who is online

Users browsing this forum: No registered users and 1 guest

cron
Image 01