codewala

code it

Disable mouse click events in Adobe Captivate from Flash 8

A friend of mine and myself were looking for a way to disable captivate mouse click events from flash, after hours of RnD on it found a very simple workaround to disable/enable mouse click events of Captivate from Flash8. Below are the steps.

1. Create following objects in Flash
– a movieclip having instance name cpContainer_mc
– two buttons having instance name disableListener_btn and enableListener_btn

2. Place your captivate file on the same path and name it as cp.swf

3. On the first frame of Flash paste this code

// prototype to disable listeners
MovieClip.prototype.disableListeners = function ()
{
// store old listeners
if(this.onMouseUp != null)
{
this.$_onMouseUp = this.onMouseUp;
}
// clear listeners array
this.onMouseUp = null;
}
//
// prototype to enable listeners
MovieClip.prototype.enableListeners = function ()
{
// set listeners back to previous state
if(this.onMouseUp == null)
{
this.onMouseUp = this.$_onMouseUp;
}
}
//
// code for the buttons
disableListener_btn.onRelease = function()
{
for(var i in cpContainer_mc)
{
if(typeof(cpContainer_mc[i]) == "movieclip" )
{
cpContainer_mc[i].disableListeners()
}
}
}
//
//
enableListener_btn.onRelease = function()
{
for(var i in cpContainer_mc)
{
if(typeof(cpContainer_mc[i]) == "movieclip" )
{
cpContainer_mc[i].enableListeners()
}
}
}
cpContainer_mc.loadMovie("cp.swf")

4. Compile and run the Flash file – click the buttons to enable/disable the Captivate mouse click events.

April 29, 2011 Posted by | actionscript 2.0, Captivate, Flash | 4 Comments

Tool to convert PowerPoint to Word

Was looking for a tool which would easily convert PPT into Word. Found a nice tool to covert the PowerPoint file into Word document.

http://www.okdosoft.com/okdo-ppt-to-word-converter.htm

Features

  • Batch convert numerous Ppt format files once to save your time.
  • Preserve the original layout of your Ppt in an editable Word.
  • Support Convert Ppt to Doc/Docx/Docm by default way.
  • Support save PowerPoint page layout Mode.
  • Support extract the character of PowerPoint to convert.
  • Support convert the lantern slide content to Doc/Docx/Docm by image way.
  • Custom to set the output file name.
  • Custom the Word margin size and page size.
  • You can add the whole folder to convert.
  • Save List: Save the converted files to a list.
  • Load List: Load the saved list files directly to convert.
  • You can set to open the output folder when conversion finished.

April 26, 2011 Posted by | PowerPoint, Word | Leave a comment

macro to select only text from table cell in Word

When I used to copy content from Word from selected table cell into PowerPoint the para formatting used to get lost. To retain the para formatting only the text from the table cell should be copied.

Below is the macro on how to select only the text from a selected table cell.


Sub select_text()
'
Dim oDoc As Document
Dim oRng As Range
'
Set oDoc = ActiveDocument
'
oDoc.Tables(1).Rows(1).Cells(1).Select
'
Set oRng = Selection.Cells(1).Range.Paragraphs(1).Range
oRng.End = oRng.Cells(1).Range.End - 1
oRng.Select
'
End Sub

April 11, 2011 Posted by | VBA, Word | Leave a comment