Friday, July 13, 2007

Controlling an Imported Captivate Movie

All these little widgets on my site use these variables, they are all in the Captivate help filebut I guess not many people can find them due to the amount of questions on the Captivateforum

rdcmndPrevious = 1 Is used to go back one slide in a captivate movie
rdcmndNextSlide = 1 Is used to go forward one slide in a captivate movie
rdcmndPause = 1 Is used to pause a captivate movie
rdcmndResume = 1 Is used to play a captivate movie
rdcmndRewindAndStop rewind and stop the movie
rdcmndRewindAndPlay Is used to restart and play a captivate movie
rdcmndGotoFrame Is used to go to a specific frame, note this is Frame not a Slide (see rdinfoFrameCount)
rdcmndExit does what is say's exit's the movie
rdcmndInfodisplay the information window (Yep that little Info box that everyone moans about
rdinfoFrameCount total number of swf frames in the movie (this is not the number of frames in the main Timeline, but the sum of all slide frames)
rdinfoSlidesInProject number of slides in the movie (including hidden slides)
rdinfoCurrentFrame current frame (goes from 1 to rdinfoFrameCount when you play the movie)
rdinfoCurrentSlide slide currently playing (zero based)
rdinfoSlideCount number of slides in the movie (not including hidden slides)
rdIsMainMovie can be used to identify a Captivate movie

And a couple of unpublished variables

rdcmndHidePlaybar =
is used to hide or show the playbar 1= hide 0=show
rdcmndCC =
is used to show or hide Closed Captions 1= show 0=hide
rdcmndMute =
is used to mute or unmute the audio 1= mute 0=unmute

I do not use flash as I am not clever enought to understand it, instead I use Swishmax a nice little app.
To create an external playbar in swish I would create a set of buttons then add the following script to each

Restart buttonon (release) {this._parent._parent.rdcmndRewindAndPlay = 1;}
Rewind buttonon (release) {this._parent._parent.rdcmndPrevious = 1;}
Pause buttonon (release) {this._parent._parent.rdcmndPause = 1;}
Play buttonon (release) {this._parent._parent.rdcmndResume = 1;}
Forward buttonon (release) {this._parent._parent.rdcmndNextSlide = 1;}
Exit button on (release) {fscommand("Quit","true");}

Monday, July 02, 2007

Google Analytics in an all-Flash site

Old Version:
http://www.google.com/support/googleanalytics/bin/answer.py?answer=74979

New Version:
http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55520


its very easy:
1. Get a Google analytics account

2. Give it a URL

3. Google Analytics gives you a little bit of code to embed in the HTML

4. Paste the code into your html

5. Use one line of code in flash for every click

This is a great way to do path analysis in a Flash site.