diff --git a/trunk/libsrc/FlashPlayer/FlashPlayer.cfg b/trunk/libsrc/FlashPlayer/FlashPlayer.cfg
new file mode 100644
index 000000000..4c2816a88
--- /dev/null
+++ b/trunk/libsrc/FlashPlayer/FlashPlayer.cfg
@@ -0,0 +1,38 @@
+-$A8
+-$B-
+-$C+
+-$D+
+-$E-
+-$F-
+-$G+
+-$H+
+-$I+
+-$J-
+-$K-
+-$L+
+-$M-
+-$N+
+-$O+
+-$P+
+-$Q-
+-$R-
+-$S-
+-$T-
+-$U-
+-$V+
+-$W-
+-$X+
+-$YD
+-$Z1
+-cg
+-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+-H+
+-W+
+-M
+-$M16384,1048576
+-K$00400000
+-LE"c:\program files (x86)\borland\delphi7\Projects\Bpl"
+-LN"c:\program files (x86)\borland\delphi7\Projects\Bpl"
+-w-UNSAFE_TYPE
+-w-UNSAFE_CODE
+-w-UNSAFE_CAST
diff --git a/trunk/libsrc/FlashPlayer/FlashPlayer.dof b/trunk/libsrc/FlashPlayer/FlashPlayer.dof
new file mode 100644
index 000000000..b5177cbaf
--- /dev/null
+++ b/trunk/libsrc/FlashPlayer/FlashPlayer.dof
@@ -0,0 +1,138 @@
+[FileVersion]
+Version=7.0
+[Compiler]
+A=8
+B=0
+C=1
+D=1
+E=0
+F=0
+G=1
+H=1
+I=1
+J=0
+K=0
+L=1
+M=0
+N=1
+O=1
+P=1
+Q=0
+R=0
+S=0
+T=0
+U=0
+V=1
+W=0
+X=1
+Y=1
+Z=1
+ShowHints=1
+ShowWarnings=1
+UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+NamespacePrefix=
+SymbolDeprecated=1
+SymbolLibrary=1
+SymbolPlatform=1
+UnitLibrary=1
+UnitPlatform=1
+UnitDeprecated=1
+HResultCompat=1
+HidingMember=1
+HiddenVirtual=1
+Garbage=1
+BoundsError=1
+ZeroNilCompat=1
+StringConstTruncated=1
+ForLoopVarVarPar=1
+TypedConstVarPar=1
+AsgToTypedConst=1
+CaseLabelRange=1
+ForVariable=1
+ConstructingAbstract=1
+ComparisonFalse=1
+ComparisonTrue=1
+ComparingSignedUnsigned=1
+CombiningSignedUnsigned=1
+UnsupportedConstruct=1
+FileOpen=1
+FileOpenUnitSrc=1
+BadGlobalSymbol=1
+DuplicateConstructorDestructor=1
+InvalidDirective=1
+PackageNoLink=1
+PackageThreadVar=1
+ImplicitImport=1
+HPPEMITIgnored=1
+NoRetVal=1
+UseBeforeDef=1
+ForLoopVarUndef=1
+UnitNameMismatch=1
+NoCFGFileFound=1
+MessageDirective=1
+ImplicitVariants=1
+UnicodeToLocale=1
+LocaleToUnicode=1
+ImagebaseMultiple=1
+SuspiciousTypecast=1
+PrivatePropAccessor=1
+UnsafeType=0
+UnsafeCode=0
+UnsafeCast=0
+[Linker]
+MapFile=0
+OutputObjs=0
+ConsoleApp=1
+DebugInfo=0
+RemoteSymbols=0
+MinStackSize=16384
+MaxStackSize=1048576
+ImageBase=4194304
+ExeDescription=
+[Directories]
+OutputDir=
+UnitOutputDir=
+PackageDLLOutputDir=
+PackageDCPOutputDir=
+SearchPath=
+Packages=vcl;rtl;vclx;VclSmp;vclshlctrls
+Conditionals=
+DebugSourceDirs=
+UsePackages=0
+[Parameters]
+RunParams=
+HostApplication=
+Launcher=
+UseLauncher=0
+DebugCWD=
+[Version Info]
+IncludeVerInfo=0
+AutoIncBuild=0
+MajorVer=1
+MinorVer=0
+Release=0
+Build=0
+Debug=0
+PreRelease=0
+Special=0
+Private=0
+DLL=0
+Locale=1029
+CodePage=1250
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=
+[HistoryLists\hlUnitAliases]
+Count=1
+Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
+[HistoryLists\hlOutputDirectorry]
+Count=1
+Item0=..\..\lib\
diff --git a/trunk/libsrc/FlashPlayer/FlashPlayer.dpr b/trunk/libsrc/FlashPlayer/FlashPlayer.dpr
new file mode 100644
index 000000000..cb89a93ba
--- /dev/null
+++ b/trunk/libsrc/FlashPlayer/FlashPlayer.dpr
@@ -0,0 +1,24 @@
+program FlashPlayer;
+
+uses
+ Forms,
+ Windows,
+ Dialogs,
+ uMain in 'uMain.pas' {frmMain};
+
+{$R *.res}
+
+begin
+ Application.Initialize;
+ Application.Title := 'FFDec Flash Player';
+ if(ParamCount<2) then
+ begin
+ ShowMessage('Wrong parameter count. This EXE is for FFDec internal use only.');
+ Application.Terminate;
+ end
+ else
+ begin
+ Application.CreateForm(TfrmMain, frmMain);
+ end;
+ Application.Run;
+end.
diff --git a/trunk/libsrc/FlashPlayer/FlashPlayer.exe b/trunk/libsrc/FlashPlayer/FlashPlayer.exe
new file mode 100644
index 000000000..94c2ecd64
Binary files /dev/null and b/trunk/libsrc/FlashPlayer/FlashPlayer.exe differ
diff --git a/trunk/libsrc/FlashPlayer/FlashPlayer.res b/trunk/libsrc/FlashPlayer/FlashPlayer.res
new file mode 100644
index 000000000..a707651d3
Binary files /dev/null and b/trunk/libsrc/FlashPlayer/FlashPlayer.res differ
diff --git a/trunk/libsrc/FlashPlayer/build.xml b/trunk/libsrc/FlashPlayer/build.xml
deleted file mode 100644
index f20b9d2a8..000000000
--- a/trunk/libsrc/FlashPlayer/build.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
- * Zooms in on a rectangular area of the movie. - *
- *- * The units of the coordinates are in twips (1440 units per inch). - * To calculate a rectangle in Flash, set the ruler units to Points - * and multiply the coordinates by 20 to get twips. There are 72 - * points per inch. - *
- */ - public void setZoomRect(int left, int top, int right, int bottom) - { - if (!created) - return; - - Variant[] args = new Variant[4]; - args[0] = new Variant(left); - args[1] = new Variant(top); - args[2] = new Variant(right); - args[3] = new Variant(bottom); - - flashObject.invokeNoReply(DISPID_SETZOOMRECT, args); - } - - /** - *- * Zooms the view by a relative scale factor specified by percent. - *
- *- * You cannot specify a reduction in the size of objects in the - * view when the current view is already 100%. - *
- *- * player.zoom(0); // resets the view to 100% - * player.zoom(50); // doubles the size of the objects in the view - * player.zoom(200); // reduces the size of objects in the view by one half - *- * @param factor zoom factor - */ - public void zoom(int factor) - { - if (!created) - return; - - Variant[] args = new Variant[1]; - args[0] = new Variant(factor); - - flashObject.invokeNoReply(DISPID_ZOOM, args); - } - - /** - *
- * Pans a zoomed-in movie to the coordinates specified by x and y. - * Pan does not pan beyond the boundaries of the zoomed-in movie. - *
- * - * @param mode specifies whether the values for x and y are pixels (0) - * or percents of window size (1). - */ - public void pan(int x, int y, int mode) - { - if (!created) - return; - - Variant[] args = new Variant[3]; - args[0] = new Variant(x); - args[1] = new Variant(y); - args[2] = new Variant(mode); - - flashObject.invokeNoReply(DISPID_PAN, args); - } - - /** - *- * Start playing the movie. - *
- */ - public void play() - { - if (!created) - return; - - flashObject.invokeNoReply(DISPID_PLAY); - } - - /** - *- * Stops playing the movie. - *
- */ - public void stop() - { - if (!created) - return; - - flashObject.invokeNoReply(DISPID_STOP); - } - - /** - *- * Rewinds the movie by a frame. - *
- */ - public void back() - { - if (!created) - return; - - flashObject.invokeNoReply(DISPID_BACK); - } - - /** - *- * Advance the movie by a frame. - *
- */ - public void forward() - { - if (!created) - return; - - flashObject.invokeNoReply(DISPID_FORWARD); - } - - /** - *- * Goes to the first frame. Same as gotoFrame(0). - *
- */ - public void rewind() - { - if (!created) - return; - - flashObject.invokeNoReply(DISPID_REWIND); - } - - /** - *- * Stop playing the movie. - *
- */ - public void stopPlay() - { - if (!created) - return; - - flashObject.invokeNoReply(DISPID_STOPPLAY); - } - - /** - *- * Activates the frame number specified by frameNumber in the - * current movie. If the data for a requested frame is not yet - * available, the player goes to the last frame available and - * stops, causing unexpected results during playback. - *
- *- * Use the getPercentLoaded() method to determine if enough of - * the movie is available to execute the GotoFrame() method. - *
- *- * flashPlayer.gotoFrame(0); // goto first frame - *- * @param frameNum zero-based frame number to go to. - */ - public void gotoFrame(int frameNum) - { - if (!created) - return; - - Variant[] args = new Variant[1]; - args[0] = new Variant(frameNum); - - flashObject.invokeNoReply(DISPID_GOTOFRAME, args); - } - - public int getCurrentFrame() - { - if (!created) - return 0; - - Variant result = flashObject.invoke(DISPID_CURRENTFRAME); - return result != null ? result.getInt() : 0; - } - - /** - *
- * Returns true if the movie is currently playing. - *
- */ - public boolean isPlaying() - { - if (!created) - return false; - - Variant result = flashObject.invoke(DISPID_ISPLAYING); - return result != null ? result.getBoolean() : false; - } - - /** - *- * Returns the percent (0 to 100) of the Flash Player movie - * that has streamed into the browser so far. - *
- */ - public int getPercentLoaded() - { - if (!created) - return 0; - - Variant result = flashObject.invoke(DISPID_PERCENTLOADED); - return result != null ? result.getInt() : 0; - } - - public boolean isFrameLoaded(int frameNum) - { - if (!created) - return false; - - Variant[] args = new Variant[1]; - args[0] = new Variant(frameNum); - - Variant result = flashObject.invoke(DISPID_FRAMELOADED, args); - return (result != null) ? result.getBoolean() : false; - } - - public int getFlashVersion() - { - if (!created) - return 0; - - Variant result = flashObject.invoke(DISPID_FLASHVERSION); - return result != null ? result.getInt() : 0; - } - - /** - *- * Loads the movie identified by url to the layer specified by - * layerNumber. - *
- * @param layer target layer to play the movie in. - * @param url URL or file path to movie. - */ - public void loadMovie(int layer, String url) - { - if (!created) - return; - - Variant[] args = new Variant[2]; - args[0] = new Variant(layer); - args[1] = new Variant(url); - - flashObject.invokeNoReply(DISPID_LOADMOVIE, args); - } - - /** - *- * For the timeline indicated by target, goes to the frame number - * specified by frameNumber. - *
- */ - public void gotoFrame(String timeline, int frameNum) - { - if (!created) - return; - - Variant[] args = new Variant[2]; - args[0] = new Variant(timeline); - args[1] = new Variant(frameNum); - - flashObject.invokeNoReply(DISPID_TGOTOFRAME, args); - } - - /** - *- * For the timeline indicated by target, goes to the frame label - * specified by label. - *
- */ - public void gotoLabel(String timeline, String label) - { - if (!created) - return; - - Variant[] args = new Variant[2]; - args[0] = new Variant(timeline); - args[1] = new Variant(label); - - flashObject.invokeNoReply(DISPID_TGOTOLABEL, args); - } - - /** - *- * Returns the number of the current frame for the timeline - * specified by target. Returned number is zero-based. - *
- *
- * if (player.getCurrentFrame("/MovieClip") == 0)
- * ; // first frame
- *
- */
- public int getCurrentFrame(String timeline)
- {
- if (!created)
- return 0;
-
- Variant[] args = new Variant[1];
- args[0] = new Variant(timeline);
-
- Variant result = flashObject.invoke(DISPID_TCURRENTFRAME, args);
- return (result != null) ? result.getInt() : 0;
- }
-
- /**
- * - * Returns the label of the current frame of the timeline specified - * by target. If there is no current frame label, an empty string - * is returned. - *
- */ - public String getCurrentLabel(String timeline) - { - if (!created) - return null; - - Variant[] args = new Variant[1]; - args[0] = new Variant(timeline); - - Variant result = flashObject.invoke(DISPID_TCURRENTLABEL, args); - return (result != null) ? result.getString() : ""; - } - - /** - *- * Plays the timeline specified by target. - *
- */ - public void play(String timeline) - { - if (!created) - return; - - Variant[] args = new Variant[1]; - args[0] = new Variant(timeline); - - flashObject.invokeNoReply(DISPID_TPLAY, args); - } - - /** - *- * Plays the timeline specified by target. - *
- */ - public void stopPlay(String timeline) - { - if (!created) - return; - - Variant[] args = new Variant[1]; - args[0] = new Variant(timeline); - - flashObject.invokeNoReply(DISPID_TSTOPPLAY, args); - } - - /** - * Sets the value of the Flash variable specified by name to - * the value specified by value. - */ - public void setVariable(String name, String value) - { - if (!created) - return; - - Variant[] args = new Variant[2]; - args[0] = new Variant(name); - args[1] = new Variant(value); - - flashObject.invokeNoReply(DISPID_SETVARIABLE, args); - } - - /** - * Returns the value of the Flash variable specified by varName. - *
- * String value = flashPlayer.getVariable("myvar");
- *
- * @return null if the variable does not exist, string value otherwise.
- */
- public String getVariable(String name)
- {
- if (!created)
- return null;
-
- Variant[] args = new Variant[1];
- args[0] = new Variant(name);
-
- Variant result = flashObject.invoke(DISPID_GETVARIABLE, args);
- return (result != null) ? result.getString() : "";
- }
-
- /**
- * - * For the timeline indicated by target, set string value of - * a property. - *
- * @param property one of following: - * PROP_X_POS, PROP_Y_POS, PROP_X_SCALE, PROP_Y_SCALE, - * PROP_ALPHA, PROP_VISIBLE, - * PROP_ROTATE, PROP_NAME, - * PROP_HIGH_QUALITY, PROP_FOCUS_RECT, PROP_SOUND_BUF_TIME - */ - public void setProperty(String timeline, int property, String value) - { - if (!created) - return; - - Variant[] args = new Variant[3]; - args[0] = new Variant(timeline); - args[1] = new Variant(property); - args[2] = new Variant(value); - - flashObject.invokeNoReply(DISPID_TSETPROPERTY, args); - } - - /** - *- * For the timeline indicated by target, returns string value of - * a property. - *
- * @param property one of following: - * PROP_X_POS, PROP_Y_POS, PROP_X_SCALE, PROP_Y_SCALE, - * PROP_CURRENT_FRAME, PROP_TOTAL_FRAMES, - * PROP_ALPHA, PROP_VISIBLE, - * PROP_WIDTH, PROP_HEIGHT, PROP_ROTATE, - * PROP_TARGET, PROP_FRAMES_LOADED, - * PROP_NAME, PROP_DROP_TARGET, PROP_URL, - * PROP_HIGH_QUALITY, PROP_FOCUS_RECT, PROP_SOUND_BUF_TIME - */ - public String getProperty(String timeline, int property) - { - if (!created) - return null; - - Variant[] args = new Variant[2]; - args[0] = new Variant(timeline); - args[1] = new Variant(property); - - Variant result = flashObject.invoke(DISPID_TGETPROPERTY, args); - return (result != null) ? result.getString() : ""; - } - - /** - *- * In the timeline specified by target, executes the action in the - * frame specified by frameNum. - *
- *
- * // call action in fifth frame of the main timeline
- * player.callFrame("/", 4);
- *
- */
- public void callFrame(String timeline, int frameNum)
- {
- if (!created)
- return;
-
- Variant[] args = new Variant[2];
- args[0] = new Variant(timeline);
- args[1] = new Variant(frameNum);
-
- flashObject.invokeNoReply(DISPID_TCALLFRAME, args);
- }
-
- /**
- * - * In the Timeline indicated by target, executes the action in the - * frame specified by the label frame label. - *
- */ - public void callLabel(String timeline, String label) - { - if (!created) - return; - - Variant[] args = new Variant[2]; - args[0] = new Variant(timeline); - args[1] = new Variant(label); - - flashObject.invokeNoReply(DISPID_TCALLLABEL, args); - } - - /** - * - * @param property one of following: - * PROP_X_POS, PROP_Y_POS, PROP_X_SCALE, PROP_Y_SCALE, - * PROP_ALPHA, PROP_VISIBLE, - * PROP_ROTATE, PROP_NAME, - * PROP_HIGH_QUALITY, PROP_FOCUS_RECT, PROP_SOUND_BUF_TIME - */ - public void setPropertyNum(String timeline, int property, double value) - { - if (!created) - return; - - Variant[] args = new Variant[2]; - args[0] = new Variant(timeline); - args[1] = new Variant(property); - args[2] = new Variant((float) value); - - flashObject.invokeNoReply(DISPID_TSETPROPERTYNUM, args); - } - - /** - *- * For the timeline indicated by target, returns numberic value of - * a property. - *
- * @param property one of following: - * PROP_X_POS, PROP_Y_POS, PROP_X_SCALE, PROP_Y_SCALE, - * PROP_CURRENT_FRAME, PROP_TOTAL_FRAMES, - * PROP_ALPHA, PROP_VISIBLE, - * PROP_WIDTH, PROP_HEIGHT, PROP_ROTATE, - * PROP_TARGET, PROP_FRAMES_LOADED, - * PROP_NAME, PROP_DROP_TARGET, PROP_URL, - * PROP_HIGH_QUALITY, PROP_FOCUS_RECT, PROP_SOUND_BUF_TIME - */ - public double getPropertyNum(String timeline, int property) - { - if (!created) - return 0.0; - - Variant[] args = new Variant[2]; - args[0] = new Variant(timeline); - args[1] = new Variant(property); - - Variant result = flashObject.invoke(DISPID_TGETPROPERTYNUM, args); - return (result != null) ? result.getFloat() : 0.0; - } -} diff --git a/trunk/libsrc/FlashPlayer/src/com/docuverse/swt/flash/FlashPlayerListener.java b/trunk/libsrc/FlashPlayer/src/com/docuverse/swt/flash/FlashPlayerListener.java deleted file mode 100644 index ff679f887..000000000 --- a/trunk/libsrc/FlashPlayer/src/com/docuverse/swt/flash/FlashPlayerListener.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.docuverse.swt.flash; - -/** - * Flash Player event listener - * - * BUGS: Event listening is currently broken. - * - * @author Don Park - */ -public interface FlashPlayerListener -{ - /** - * Generated when target changes ReadyState. - * @param newState the new state of the control, one of: - * READYSTATE_UNINITIALIZED; - * READYSTATE_LOADING; - * READYSTATE_LOADED; - * READYSTATE_INTERACsTIVE; - * READYSTATE_COMPLETE. - */ - void onReadyStateChange(int newState); - - /** - *- * Generated as the Flash movie is downloading. - *
- */ - void onProgress(int percentDone); - - /** - *- * Generated when an FSCommand action is performed in the - * movie with a URL and the URL starts with "FSCommand :". - * Use this to create a response to a frame or button - * action in the Flash movie. - *
- * @param command "Quit", "Fullscreen", "AllowScale", "Showmenu", "Exec" - */ - void onFSCommand(String command, String args); -} diff --git a/trunk/libsrc/FlashPlayer/src/com/docuverse/swt/ole/OleObject.java b/trunk/libsrc/FlashPlayer/src/com/docuverse/swt/ole/OleObject.java deleted file mode 100644 index 92bd12344..000000000 --- a/trunk/libsrc/FlashPlayer/src/com/docuverse/swt/ole/OleObject.java +++ /dev/null @@ -1,250 +0,0 @@ -package com.docuverse.swt.ole; - -import org.eclipse.swt.ole.win32.OleAutomation; -import org.eclipse.swt.ole.win32.OleFunctionDescription; -import org.eclipse.swt.ole.win32.OleParameterDescription; -import org.eclipse.swt.ole.win32.OlePropertyDescription; -import org.eclipse.swt.ole.win32.Variant; - -/** - * @author donpark - * - * To change this generated comment edit the template variable "typecomment": - * Window>Preferences>Java>Templates. - * To enable and disable the creation of type comments go to - * Window>Preferences>Java>Code Generation. - */ -public class OleObject { - - protected OleAutomation oleAutomation; - protected boolean owned; - - public OleObject(OleAutomation oleAutomation) { - this(oleAutomation, true); - } - - public OleObject(OleAutomation oleAutomation, boolean owned) { - this.oleAutomation = oleAutomation; - this.owned = owned; - } - - public void dispose() { - if (oleAutomation != null) { - if (owned) - oleAutomation.dispose(); - - oleAutomation = null; - } - } - - public int getDispID(String dispName) { - int[] dispIDs = oleAutomation.getIDsOfNames(new String[] { dispName }); - return dispIDs[0]; - } - - // Dispatch ID-based methods - - public Variant getVariantProperty(int dispID) { - return oleAutomation.getProperty(dispID); - } - - public boolean setVariantProperty(int dispID, Variant propValue) { - return oleAutomation.setProperty(dispID, propValue); - } - - public int getIntegerProperty(int dispID) { - Variant result = oleAutomation.getProperty(dispID); - return (result != null) ? result.getInt() : -1; - } - - public boolean setIntegerProperty(int dispID, int value) { - return oleAutomation.setProperty(dispID, new Variant(value)); - } - - public boolean getBooleanProperty(int dispID) { - Variant result = oleAutomation.getProperty(dispID); - return (result != null) ? result.getBoolean() : false; - } - - public boolean setBooleanProperty(int dispID, boolean value) { - return oleAutomation.setProperty(dispID, new Variant(value)); - } - - public String getStringProperty(int dispID) { - Variant result = oleAutomation.getProperty(dispID); - return (result != null) ? result.getString() : ""; - } - - public boolean setStringProperty(int dispID, String value) { - return oleAutomation.setProperty(dispID, new Variant(value)); - } - - public float getFloatProperty(int dispID) { - Variant result = oleAutomation.getProperty(dispID); - return (result != null) ? result.getFloat() : 0.0f; - } - - public boolean setFloatProperty(int dispID, float value) { - return oleAutomation.setProperty(dispID, new Variant(value)); - } - - public OleAutomation getAutomationProperty(int dispID) { - Variant result = oleAutomation.getProperty(dispID); - return (result != null) ? result.getAutomation() : null; - } - - public OleObject getObjectProperty(int dispID) { - Variant result = oleAutomation.getProperty(dispID); - return (result != null) ? new OleObject(result.getAutomation(), false) : null; - } - - public Variant invoke(int dispID) { - return oleAutomation.invoke(dispID); - } - - public void invokeNoReply(int dispID) { - oleAutomation.invokeNoReply(dispID); - } - - public Variant invoke(int dispID, Variant[] args) { - return oleAutomation.invoke(dispID, args); - } - - public void invokeNoReply(int dispID, Variant[] args) { - oleAutomation.invokeNoReply(dispID, args); - } - - // Name-based methods - - public Variant getVariantProperty(String name) { - return oleAutomation.getProperty(getDispID(name)); - } - - public boolean setVariantProperty(String name, Variant propValue) { - return oleAutomation.setProperty(getDispID(name), propValue); - } - - public int getIntegerProperty(String name) { - Variant result = getVariantProperty(name); - return (result != null) ? result.getInt() : -1; - } - - public boolean setIntegerProperty(String name, int value) { - return setVariantProperty(name, new Variant(value)); - } - - public boolean getBooleanProperty(String name) { - Variant result = getVariantProperty(name); - return (result != null) ? result.getBoolean() : false; - } - - public boolean setBooleanProperty(String name, boolean value) { - return setVariantProperty(name, new Variant(value)); - } - - public String getStringProperty(String name) { - Variant result = getVariantProperty(name); - return (result != null) ? result.getString() : ""; - } - - public boolean setStringProperty(String name, String value) { - return setVariantProperty(name, new Variant(value)); - } - - public float getFloatProperty(String name) { - Variant result = oleAutomation.getProperty(getDispID(name)); - return (result != null) ? result.getFloat() : 0.0f; - } - - public boolean setFloatProperty(String name, float value) { - return oleAutomation.setProperty(getDispID(name), new Variant(value)); - } - - public OleAutomation getAutomationProperty(String name) { - Variant result = oleAutomation.getProperty(getDispID(name)); - return (result != null) ? result.getAutomation() : null; - } - - public OleObject getObjectProperty(String name) { - Variant result = oleAutomation.getProperty(getDispID(name)); - return (result != null) ? new OleObject(result.getAutomation(), false) : null; - } - - public Variant invoke(String name) { - return oleAutomation.invoke(getDispID(name)); - } - - public void invokeNoReply(String name) { - oleAutomation.invokeNoReply(getDispID(name)); - } - - public Variant invoke(String name, Variant[] args) { - return oleAutomation.invoke(getDispID(name), args); - } - - public void invokeNoReply(String name, Variant[] args) { - oleAutomation.invokeNoReply(getDispID(name), args); - } - - // Common methods - - public int getX() { - return getIntegerProperty("X"); - } - - public boolean setX(int value) { - return setIntegerProperty("X", value); - } - - public int getY() { - return getIntegerProperty("Y"); - } - - public boolean setY(int value) { - return setIntegerProperty("Y", value); - } - - public int getWidth() { - return getIntegerProperty("Width"); - } - - public boolean setWidth(int value) { - return setIntegerProperty("Width", value); - } - - public int getHeight() { - return getIntegerProperty("Height"); - } - - public boolean setHeight(int value) { - return setIntegerProperty("Height", value); - } - - public void dump() { - System.out.println("Properties:"); - OlePropertyDescription propDesc; - for (int i = 0; - (propDesc = oleAutomation.getPropertyDescription(i)) != null; - i++) { - System.out.println(propDesc.name); - } - System.out.println(); - - System.out.println("Methods:"); - - OleFunctionDescription funcDesc; - for (int i = 0; - (funcDesc = oleAutomation.getFunctionDescription(i)) != null; - i++) { - System.out.print(funcDesc.name); - System.out.print("("); - for (int j = 0; j < funcDesc.args.length; j++) { - OleParameterDescription parmDesc = funcDesc.args[j]; - System.out.print(parmDesc.name); - System.out.print(", "); - } - System.out.println(")"); - } - System.out.println(); - } -} diff --git a/trunk/libsrc/FlashPlayer/src/com/jpexs/flashplayer/FlashPanel.java b/trunk/libsrc/FlashPlayer/src/com/jpexs/flashplayer/FlashPanel.java deleted file mode 100644 index 453a364b7..000000000 --- a/trunk/libsrc/FlashPlayer/src/com/jpexs/flashplayer/FlashPanel.java +++ /dev/null @@ -1,157 +0,0 @@ -package com.jpexs.flashplayer; - -import com.docuverse.swt.flash.FlashPlayer; -import java.awt.Canvas; -import java.lang.reflect.Method; -import java.net.URL; -import java.net.URLClassLoader; -import java.util.Timer; -import java.util.TimerTask; -import java.util.logging.Level; -import java.util.logging.Logger; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.SWTError; -import org.eclipse.swt.awt.SWT_AWT; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Shell; - -public class FlashPanel extends Canvas { - - private Thread swtThread; - private FlashPlayer swtPlayer; - private boolean noFlash = false; - private Shell shell; - - /** - * Connect this canvas to a SWT shell with a Browser component and starts a - * background thread to handle SWT events. This method waits until the - * browser component is ready. - */ - private void connect() { - if (noFlash) { - return; - } - if (this.swtThread == null) { - final Canvas canvas = this; - this.swtThread = new Thread() { - @Override - public void run() { - try { - Display display = new Display(); - shell = SWT_AWT.new_Shell(display, canvas); - shell.setLayout(new FillLayout()); - - synchronized (this) { - swtPlayer = new FlashPlayer(shell, SWT.NONE); - this.notifyAll(); - } - - shell.open(); - while (!isInterrupted() && !shell.isDisposed()) { - if (!display.readAndDispatch()) { - display.sleep(); - } - } - shell.dispose(); - display.dispose(); - } catch (SWTError e) { - e.printStackTrace(); - noFlash = true; - interrupt(); - } catch (Exception e) { - e.printStackTrace(); - interrupt(); - } catch (NoClassDefFoundError e) { - e.printStackTrace(); - noFlash = true; - interrupt(); - } catch (UnsatisfiedLinkError e) { - e.printStackTrace(); - noFlash = true; - interrupt(); - } - } - }; - this.swtThread.start(); - } - - // Wait for the Browser instance to become ready - synchronized (this.swtThread) { - while (this.swtPlayer == null) { - if (noFlash) { - break; - } - try { - this.swtThread.wait(100); - } catch (InterruptedException e) { - this.swtPlayer = null; - this.swtThread = null; - break; - } - } - } - } - - /** - * Stops the swt background thread. - */ - private void disconnect() { - if (noFlash) { - return; - } - if (swtThread != null) { - swtPlayer = null; - swtThread.interrupt(); - swtThread = null; - } - } - - /** - * Ensures that the SWT background thread is stopped if this canvas is - * removed from it's parent component (e.g. because the frame has been - * disposed). - */ - @Override - public void removeNotify() { - super.removeNotify(); - if (noFlash) { - return; - } - disconnect(); - } - - @Override - public void addNotify() { - super.addNotify(); - if (noFlash) { - return; - } - connect(); - } - - private void refresh() { - setSize(getWidth() - 1, getHeight() - 1); - new Timer().schedule(new TimerTask() { - public void run() { - setSize(getWidth() + 1, getHeight() + 1); - } - }, 100); - - } - - public void displaySWF(final String swf) { - if (noFlash) { - return; - } - swtPlayer.getDisplay().syncExec(new Runnable() { - @Override - public void run() { - swtPlayer.setMovie(swf); - swtPlayer.activate(); - } - }); - refresh(); - } -} \ No newline at end of file diff --git a/trunk/libsrc/FlashPlayer/uMain.dcu b/trunk/libsrc/FlashPlayer/uMain.dcu new file mode 100644 index 000000000..177919fd9 Binary files /dev/null and b/trunk/libsrc/FlashPlayer/uMain.dcu differ diff --git a/trunk/libsrc/FlashPlayer/uMain.dfm b/trunk/libsrc/FlashPlayer/uMain.dfm new file mode 100644 index 000000000..e9f242050 --- /dev/null +++ b/trunk/libsrc/FlashPlayer/uMain.dfm @@ -0,0 +1,397 @@ +object frmMain: TfrmMain + Left = 308 + Top = 161 + Width = 523 + Height = 333 + Caption = 'FFDec Flash Player' + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + Icon.Data = { + 0000010003003030000001001800A81C0000360000002020000001001800A80C + 0000DE1C00001010000001001800680300008629000028000000300000006000 + 0000010018000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000FAFAFAFAFAFAFAFAFAFAFAFAFAFAFA + FAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFA + FAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFA + FAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFA + FAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFAFA0000000000 + 00F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7 + F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7 + F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7 + F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7F7 + F7F7F7F7F7F7F7F7F7F7F7000000000000F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4 + F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F3F3F4E9E9EFE5E5EDE7E7EEEEEEF1F0F0 + F2E9E9EEF1F1F3F4F4F4F4F4F4F4F4F4F4F4F4EEEEF1E9E9EFE5E5EDE7E7EEEA + EAEFF2F2F3F4F4F4F4F4F4F4F4F4F4F4F4EEEEF1E9E9EFE5E5EDE8E8EFEEEEF1 + F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F40000000000 + 00F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F0F0F0D8 + D8E67C7CBB4C4CA46262AEA4A4CEC2C2DB8080BCCCCCE0EFEFF0F1F1F1F0F0F0 + E2E2EAA8A8CF7272B55555A85F5FAC8585BEC9C9DEEFEFF0F1F1F1F0F0F0E4E4 + EBA9A9CF6F6FB55454A76969B1A4A4CDE4E4EBF0F0F0F1F1F1F1F1F1F1F1F1F1 + F1F1F1F1F1F1F1F1F1F1F1000000000000EEEEEEEEEEEEEEEEEEEEEEEEEEEEEE + EEEEEEEEEEEEEEEEEEEEEEEEC8C8EA2E2EC80B0BC11313A51E1E8E1919A53535 + AF15158BA7A7CDEBEBEDEEEEEEDCDCE75151C01010B91111BF2121B51E1E921A + 1A8C242491DEDEE6EEEEEEE3E3E95A5AC70F0FBB1212BD2626AC20208F1F1F8F + 8282BDE9E9ECEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE0000000000 + 00EAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAC0C0ED0F0FFA00 + 00FF0000FF0000FF4C4CF21212F70B0BE0090985A1A1C9E7E7E9CCCCEB2323EF + 0000FF0000FF0000FF0000FF0C0CFD6868D841419DDADAE2D5D5EB3131F10000 + FF0000FF0000FF0000FF3030F67878B77F7FBAE5E5E8EAEAEAEAEAEAEAEAEAEA + EAEAEAEAEAEAEAEAEAEAEA000000000000E7E7E7E7E7E7E7E7E7E7E7E7E7E7E7 + E7E7E7E7E7E7E7E7E73636F90000FF0A0AC39292E18080F01717FC0000FF2929 + EE0E0E869F9FC7E2E2E62828FA0000FE1515CBA5A5E2BABAEB8787F12828FB78 + 78F1D3D3DEE4E4E64B4BF60000FF0A0AC99C9CDCB8B8EB6D6DF40F0FFDDDDDE3 + D6D6E0E6E6E6E7E7E7E7E7E7E7E7E7E7E7E7E7E7E7E7E7E7E7E7E70000000000 + 00E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4E4C2C2E80000FF1818D532 + 3295DADAE0E4E4E4D3D3E61515FC2D2DEF0E0E869C9CC48E8EED0000FF0808BF + 6464ACD9D9DFDFDFE2DFDFE2DCDCE2C0C0E6DFDFE2B8B8E80000FF1010D64141 + 9CDBDBE0E4E4E4E4E4E4BFBFE8E4E4E4E3E3E3E4E4E4E4E4E4E4E4E4E4E4E4E4 + E4E4E4E4E4E4E4E4E4E4E4000000000000E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1 + E1E1E1E1E1E19696EB0000FF1C1CAF41419CDADADEE1E1E1E1E1E12323FA2D2D + EF0E0E869A9AC25555F30303FE0C0C885A5AA79C9CC49F9FC59F9FC59F9FC59F + 9FC5A1A1C57C7CE80000FF0F0FA15656A5DBDBDFE1E1E1E1E1E1E1E1E1E1E1E1 + E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E1E10000000000 + 00DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD7D7DEC0000FF2727A638 + 3897D5D5D9DDDDDDDDDDDD2222FA2C2CEE0E0E869898C03535F61A1AF7090984 + 1010861E1E8C1F1F8D1F1F8D1F1F8D18188A17178A4F4FE60000FF1414905151 + A2D7D7DBDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD + DDDDDDDDDDDDDDDDDDDDDD000000000000DADADADADADADADADADADADADADADA + DADADADADADA7979EA0000FF3E3EAF21218DCDCDD5DADADADADADA2222F92B2B + EE0E0E869696BE2C2CF70000FF0000FF0000FF0000FF0000FF0000FF0000FF20 + 20E10D0D854C4CEA0000FF2A2A97353596D0D0D6DADADADADADADADADADADADA + D8D8D9DADADADADADADADADADADADADADADADADADADADADADADADA0000000000 + 00D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D79696E30000FF5454C40E + 0E859494BDCFCFD4D6D6D72121F92929EC0D0D859494BC4747F10C0CFC1F1FC1 + 1717BD7272E27E7EE77D7DE60505FE1C1CD71414886D6DE60000FF4A4AB21010 + 86A9A9C4D2D2D5D6D6D7D3D3D5CACAD2BDBDCDD6D6D7D7D7D7D7D7D7D7D7D7D7 + D7D7D7D7D7D7D7D7D7D7D7000000000000D4D4D4D4D4D4D4D4D4D4D4D4D4D4D4 + D4D4D4D4D4D4B8B8DA0000FF4E4EE920208D25258F8E8EB8B7B7C91A1AF51818 + E50B0B859191B96C6CE90000FF6D6DC61515886666A8BBBBCA9797D30000FF0D + 0DC15252A09393DF0000FF5D5DDE1818893434949D9DBFBABACA9A9ABE5151A0 + 6F6FACD0D0D3D4D4D4D4D4D4D4D4D4D4D4D4D4D4D4D4D4D4D4D4D40000000000 + 00D1D1D1D1D1D1D1D1D1D1D1D1D1D1D1D1D1D1D1D1D1D1D1D13F3FF10707FD64 + 64CA1E1E8C1717891717950303F30606DE0707828F8FB7C0C0D40B0BFD3D3DF0 + 6565AA1C1C8B2121910E0ED00000FF2626A7ABABC2CFCFD12626F71212FB6D6D + C121218E1A1A8A16169D0606E31A1A8A7979B0CDCDD0D1D1D1D1D1D1D1D1D1D1 + D1D1D1D1D1D1D1D1D1D1D1000000000000CECECECECECECECECECECECECECECE + CECECECECECECECECEABABD61212FB0000FF1818F51414EF0202FD0000FF2121 + E80B0B838D8DB5CCCCCE8080E00303FE1C1CF83232E70808F90000FF2A2AE1B2 + B2C5CBCBCDCECECEA1A1D91010FB0404FE2121F21111F30000FF0404FC9F9FBD + C4C4CACECECECECECECECECECECECECECECECECECECECECECECECE0000000000 + 00CACACACACACACACACACACACACACACACACACACACACACACACACACACAB1B1D04B + 4BEB1E1EF72525F46060E21717F82828EA0D0D858B8BB3C8C8CACACACA9999D7 + 4545ED1E1EF72E2EF16666E1C0C0C7C8C8C9CACACACACACACACACAB2B2D05555 + E92B2BF42B2BF35353E6A1A1D1C7C7C9CACACACACACACACACACACACACACACACA + CACACACACACACACACACACA000000000000C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7 + C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C71F1FF62828 + EA0C0C848989B1C5C5C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7 + C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7 + C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C7C70000000000 + 00C4C4C4C4C4C4C4C4C4C4C4C4C4C4C4C4C4C4C4C4C4C3C3C3C2C2C2C2C2C2C2 + C2C2C3C3C3C4C4C4C4C4C41E1EF62727E91212868989B0C2C2C4C4C4C4C4C4C4 + C4C4C4C4C4C4C4C4C4C4C4C4C4C4C4C3C3C3C2C2C2C3C3C3C2C2C2C3C3C3C4C4 + C4C4C4C4C4C4C4C4C4C4C4C4C4C4C4C4C4C4C4C4C4C4C4C4C4C4C4C4C4C4C4C4 + C4C4C4C4C4C4C4C4C4C4C4000000000000C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1 + C0C0C0BDBDBDB4B4B4ABABABABABABB2B2B2BDBDBDC0C0C0C1C1C11E1EF52D2D + EB53539B9D9DB5BFBFC0C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1BFBFBFB7 + B7B7ADADADA8A8A8AEAEAEBABABAC0C0C0C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1 + C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C1C10000000000 + 00BEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBDBDBDB0B0B08F8F8F7272727070708A + 8A8AAEAEAEBDBDBDBEBEBE3232EE4545E7B4B4BBBBBBBDBEBEBEBEBEBEBEBEBE + BEBEBEBEBEBEBEBEBEBDBDBDB6B6B69C9C9C7878786A6A6A7D7D7DA7A7A7BBBB + BBBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBE + BEBEBEBEBEBEBEBEBEBEBE000000000000BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB + A7A7A75252523B3B3B272727494949717171A3A3A3B8B8B8BBBBBBBBBBBBBBBB + BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBABABA60606045 + 45452B2B2B3838385F5F5F9A9A9AB7B7B7BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB + BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB0000000000 + 00B7B7B7B7B7B7B7B7B7B7B7B7B7B7B79292920000000000000000004040406B + 6B6B9F9F9FB4B4B4B7B7B7B7B7B7B7B7B7B7B7B7B7B7B7B7B7B7B7B7B7B7B7B7 + B7B7B7B7B7B7B7B7B7B6B6B6111111000000000000262626585858959595B3B3 + B3B7B7B7B7B7B7B7B7B7B7B7B7B7B7B7B7B7B7B7B7B7B7B7B7B7B7B7B7B7B7B7 + B7B7B7B7B7B7B7B7B7B7B7000000000000B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4 + 8F8F8F0000000000000000003F3F3F6969699C9C9CB1B1B1B4B4B4B4B4B4B4B4 + B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B3B3B310101000 + 0000000000262626565656929292B0B0B0B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4 + B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B4B40000000000 + 00B1B1B1B1B1B1B1B1B1B1B1B1B1B1B18D8D8D0000000000000000003F3F3F68 + 68689A9A9AAFAFAFB1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1 + B1B1B1B1B1B1B1B1B1B0B0B0101010000000000000262626565656909090ADAD + ADB1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1B1 + B1B1B1B1B1B1B1B1B1B1B1000000000000AEAEAEAEAEAEAEAEAEAEAEAEAEAEAE + 8A8A8A0000000000000000003E3E3E666666979797ACACACAEAEAEAEAEAEAEAE + AEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEADADAD10101000 + 00000000002626265555558E8E8EAAAAAAAEAEAEAEAEAEAEAEAEAEAEAEAEAEAE + AEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAEAE0000000000 + 00AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8787870000000000000000003E3E3E65 + 6565949494A8A8A8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAA9A9A91010100000000000002626265454548B8B8BA6A6 + A6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAA000000000000A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7 + 8585850000000000000000003E3E3E636363929292A5A5A5A7A7A7A7A7A7A7A7 + A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A6A6A60F0F0F00 + 0000000000262626535353898989A3A3A3A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7 + A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A70000000000 + 00A4A4A4A4A4A4A4A4A4A4A4A4A4A4A48282820000000000000000003D3D3D62 + 62628E8E8EA0A0A0A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3 + A3A3A3A4A4A4A4A4A4A3A3A30F0F0F0000000000002626265252528686869F9F + 9FA3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A3A4A4A4A4 + A4A4A4A4A4A4A4A4A4A4A4000000000000A1A1A1A1A1A1A1A1A1A1A1A1A1A1A1 + 8080800000000000000000003C3C3C5B5B5B8383839393939494949494949494 + 949494949494949494949595959797979B9B9BA0A0A0A1A1A1A0A0A00F0F0F00 + 00000000002525254D4D4D7A7A7A919191949494949494949494949494949494 + 9494949595959696969A9A9A9F9F9FA0A0A0A1A1A1A1A1A1A1A1A10000000000 + 009E9E9E9E9E9E9E9E9E9E9E9E9E9E9E7E7E7E0000000000000000003737374A + 4A4A6060606969696B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B747474 + 8989899999999D9D9D9D9D9D0F0F0F0000000000002424244141415B5B5B6868 + 686B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6A6A6A7171718181819595959D + 9D9D9E9E9E9E9E9E9E9E9E0000000000009B9B9B9B9B9B9B9B9B9B9B9B9B9B9B + 7C7C7C0000000000000000002727272C2C2C3131313333333434343434343434 + 343434343434343434343A3A3A5252527777779292929A9A9A9A9A9A0E0E0E00 + 00000000001C1C1C2B2B2B303030333333343434343434343434343434343434 + 3434343535354E4E4E6A6A6A8D8D8D9A9A9A9B9B9B9B9B9B9B9B9B0000000000 + 0097979797979797979797979797979779797900000000000000000000000000 + 0000000000000000000000000000000000000000000000000000181818585858 + 7777778F8F8F9696969696960E0E0E0000000000000000000000000000000000 + 000000000000000000000000000000000000000202025454546D6D6D8A8A8A96 + 9696979797979797979797000000000000949494949494949494949494949494 + 7676760000000000000000000000000000000000000000000000000000000000 + 000000000000000000002828288080808989899191919393939393930E0E0E00 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000303037E7E7E8787879090909393939494949494949494940000000000 + 009191919191919191919191919191917474740000000000000000002828283E + 3E3E5656566060606161616161616161616161616161616161617070708F8F8F + 9090909090909191919090900D0D0D0000000000001919193434345252525F5F + 5F6161616161616161616161616161616161616363638F8F8F90909090909091 + 91919191919191919191910000000000008E8E8E8E8E8E8E8E8E8E8E8E8E8E8E + 7171710000000000000000003B3B3B5959597D7D7D8C8C8C8E8E8E8E8E8E8E8E + 8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8D8D8D0D0D0D00 + 00000000002424244C4C4C7676768B8B8B8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E + 8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E0000000000 + 008B8B8B8B8B8B8B8B8B8B8B8B8B8B8B6F6F6F0000000000000000003A3A3A58 + 58587B7B7B8989898B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B + 8B8B8B8B8B8B8B8B8B8A8A8A0D0D0D0000000000002424244B4B4B7474748888 + 888B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B + 8B8B8B8B8B8B8B8B8B8B8B000000000000888888888888888888888888888888 + 6D6D6D0000000000000000003A3A3A5656567878788686868787878787878787 + 878787878787878787878787878787878787878787878787878787870D0D0D00 + 00000000002424244A4A4A717171858585878787878787878787878787878787 + 8787878787878787878787878787878787878888888888888888880000000000 + 008484848484848484848484848484846969690000000000000000003737374D + 4D4D676767717171737373737373737373737373737373737373737373737373 + 7373737777777F7F7F8282820C0C0C0000000000002424244444446262627070 + 707373737373737373737373737373737373737373737373737373737676767D + 7D7D828282848484848484000000000000818181818181818181818181818181 + 6767670000000000000000003434343D3D3D4545454949494949494949494949 + 494949494949494949494949494949494B4B4B5858587272727F7F7F0C0C0C00 + 00000000002323233A3A3A434343484848494949494949494949494949494949 + 4949494949494949494A4A4A5353536A6A6A7B7B7B8080808181810000000000 + 007E7E7E7E7E7E7E7E7E7E7E7E7E7E7E64646400000000000000000013131314 + 1414141414141414141414141414141414141414141414141414141414141414 + 2E2E2E4D4D4D6C6C6C7B7B7B0C0C0C0000000000000D0D0D1414141414141414 + 1414141414141414141414141414141414141414141414141421212149494963 + 63637777777E7E7E7E7E7E0000000000007B7B7B7B7B7B7B7B7B7B7B7B7B7B7B + 6363630000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000003232325D5D5D7070707979790C0C0C00 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000001919195A5A5A6A6A6A7777777A7A7A7B7B7B0000000000 + 007777777777777777777777777777776262620E0E0E0E0E0E0D0D0D0D0D0D0D + 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D + 4747477070707474747676761919190E0E0E0D0D0D0D0D0D0D0D0D0D0D0D0D0D + 0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D2B2B2B6F6F6F73 + 7373767676777777777777000000000000747474747474747474747474747474 + 7474747474747474747373737373737373737373737373737373737373737373 + 7373737373737373737373737373737373737373737374747474747474747474 + 7474737373737373737373737373737373737373737373737373737373737373 + 7373737373737373737373737373737474747474747474747474740000000000 + 0071717171717171717171717171717171717171717171717171717171717171 + 7171717171717171717171717171717171717171717171717171717171717171 + 7171717171717171717171717171717171717171717171717171717171717171 + 7171717171717171717171717171717171717171717171717171717171717171 + 71717171717171717171710000000000006E6E6E6E6E6E6E6E6E6E6E6E6E6E6E + 6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E + 6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E + 6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E + 6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E6E0000000000 + 006B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B + 6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B + 6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B + 6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B6B + 6B6B6B6B6B6B6B6B6B6B6B000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000002800 + 0000200000004000000001001800000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8 + F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8 + F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8F8 + F8F8F8000000000000F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F2F2F2E8E8 + EFDADAE8F2F2F3F2F2F3F3F3F3F3F3F3F3F3F3F2F2F3E4E4EDD9D9E7F1F1F3F3 + F3F3F3F3F3F3F3F3F2F2F3D8D8E7E9E9EFF2F2F2F3F3F3F3F3F3F3F3F3F3F3F3 + F3F3F3000000000000EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEDEDEE7373D90505 + AD0303883636B517178FBDBDD7EEEEEEC4C4E62A2ABB0505AE0808941B1B8CB8 + B8D5EEEEEE9696DA1212B60707A40808857A7AB9EEEEEEEEEEEEEEEEEEEEEEEE + EEEEEE000000000000E9E9E9E9E9E9E9E9E9E9E9E9E9E9E96565F50000FE1717 + F02121FB0707FC070796B9B9D3AFAFEE0505F91313EA3737F90909FE7878D8AF + AFCF7A7AF20000FE1B1BEC1E1EFB5353F28E8EC0E9E9E9E9E9E9E9E9E9E9E9E9 + E9E9E9000000000000E5E5E5E5E5E5E5E5E5E5E5E5D5D5E70404FE04049DDEDE + E2C2C2E90B0BFE1B1BA0B5B5D02222FB0202B6D1D1DCE4E4E4CDCDE7C3C3E9CE + CEE70505FE0404A1DCDCE1E3E3E5B5B5EBE4E4E4E5E5E5E5E5E5E5E5E5E5E5E5 + E5E5E5000000000000E0E0E0E0E0E0E0E0E0E0E0E0A9A9E80E0EFA21218EE0E0 + E0E0E0E01515FC1B1BA0A0A0D10808FD0707847070B07070B07070B07070B078 + 78D90F0FF92C2C92E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0 + E0E0E0000000000000DBDBDBDBDBDBDBDBDBDBDBDB9999E62222F6050582D2D2 + D8DBDBDB1515FC1A1A9F8F8FD20707FE0101E01D1DEC1F1FEC1F1FEC1F1FB64C + 4CD02929F00D0D85D9D9DADBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDB + DBDBDB000000000000D6D6D6D6D6D6D6D6D6D6D6D6B3B3DD0303FE1818908484 + B5D5D5D61414FB18189DA0A0C70707FE2525AB7575C7ACACDD3232F51515B86D + 6DCE0A0AFD0E0E879595BCD5D5D6D3D3D5A3A3C2D6D6D6D6D6D6D6D6D6D6D6D6 + D6D6D6000000000000D2D2D2D2D2D2D2D2D2D2D2D2D1D1D22323F73F3FDF0505 + 882B2B9B0303F8010194A7A7C13C3CF25656DE1212893636A60202F82929A5C9 + C9D21818FA4545D90707872A2AA21212BA48489CD2D2D2D2D2D2D2D2D2D2D2D2 + D2D2D2000000000000CDCDCDCDCDCDCDCDCDCDCDCDCDCDCDA2A2D71212FA0505 + FD0A0AF80404FD18189DA3A3BDB4B4D32727F60E0EFB0202FE4646DAC7C7CCCD + CDCDA0A0D81919F90505FD0303FD5050D8C9C9CCCDCDCDCDCDCDCDCDCDCDCDCD + CDCDCD000000000000C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C6C6C9ACAC + D0C2C2C91313FA18189C9F9FB9C8C8C8C8C8C8B1B1CEBCBCCAC7C7C7C8C8C8C8 + C8C8C8C8C8C8C8C8B4B4CEC0C0C9C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8C8 + C8C8C8000000000000C3C3C3C3C3C3C3C3C3C2C2C2C0C0C0BDBDBDBEBEBEC1C1 + C1C3C3C31212F918189C9B9BB5C3C3C3C3C3C3C3C3C3C3C3C3C2C2C2BFBFBFBD + BDBDBFBFBFC2C2C2C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3C3 + C3C3C3000000000000BEBEBEBEBEBEBEBEBEBABABAA2A2A28282828E8E8EB6B6 + B6BEBEBE2D2DF09797C2BBBBBDBEBEBEBEBEBEBEBEBEBEBEBEB9B9B99B9B9B82 + 8282949494B7B7B7BEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBEBE + BEBEBE000000000000BABABABABABABABABA757575212121242424616161ACAC + ACBABABABABABABABABABABABABABABABABABABABABABABABA6161611E1E1E2B + 2B2B6E6E6EAEAEAEBABABABABABABABABABABABABABABABABABABABABABABABA + BABABA000000000000B5B5B5B5B5B5B5B5B55C5C5C0000001515155B5B5BA6A6 + A6B5B5B5B5B5B5B5B5B5B5B5B5B5B5B5B5B5B5B5B5B5B5B5B54444440000001E + 1E1E686868A9A9A9B5B5B5B5B5B5B5B5B5B5B5B5B5B5B5B5B5B5B5B5B5B5B5B5 + B5B5B5000000000000B0B0B0B0B0B0B0B0B05A5A5A0000001515155A5A5AA2A2 + A2B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B04242420000001E + 1E1E666666A4A4A4B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 + B0B0B0000000000000ABABABABABABABABAB5757570000001414145858589E9E + 9EABABABABABABABABABABABABABABABABABABABABABABABAB4141410000001D + 1D1D646464A0A0A0ABABABABABABABABABABABABABABABABABABABABABABABAB + ABABAB000000000000A7A7A7A7A7A7A7A7A75555550000001414145757579A9A + 9AA7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A73F3F3F0000001D + 1D1D6262629C9C9CA7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7A7 + A7A7A7000000000000A2A2A2A2A2A2A2A2A25353530000001414145353538F8F + 8F9A9A9A9A9A9A9A9A9A9A9A9A9A9A9A9D9D9DA1A1A1A2A2A23D3D3D0000001D + 1D1D5D5D5D9191919A9A9A9A9A9A9A9A9A9A9A9A9B9B9B9D9D9DA1A1A1A2A2A2 + A2A2A20000000000009D9D9D9D9D9D9D9D9D5151510000001313133F3F3F5656 + 565A5A5A5A5A5A5A5A5A5A5A5A5C5C5C6B6B6B9595959D9D9D3C3C3C0000001B + 1B1B4242425858585A5A5A5A5A5A5A5A5A5A5A5A5E5E5E7272729797979D9D9D + 9D9D9D0000000000009898989898989898984E4E4E0000000202020505050606 + 060606060606060606060606061313135656568D8D8D9898983A3A3A00000002 + 02020505050606060606060606060606060606061C1C1C5E5E5E8E8E8E989898 + 9898980000000000009393939393939393934B4B4B0000000404041111111B1B + 1B1D1D1D1D1D1D1D1D1D1D1D1D3535358A8A8A92929293939338383800000006 + 06061212121B1B1B1D1D1D1D1D1D1D1D1D1D1D1D4343438B8B8B929292939393 + 9393930000000000008F8F8F8F8F8F8F8F8F4A4A4A0000001414145050508484 + 848E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8F8F8F8F8F8F3636360000001C + 1C1C5959598686868E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8E8F8F8F8F8F8F + 8F8F8F0000000000008A8A8A8A8A8A8A8A8A4747470000001313134E4E4E8080 + 808A8A8A8A8A8A8A8A8A8A8A8A8A8A8A8A8A8A8A8A8A8A8A8A3434340000001B + 1B1B5757578282828A8A8A8A8A8A8A8A8A8A8A8A8A8A8A8A8A8A8A8A8A8A8A8A + 8A8A8A0000000000008585858585858585854444440000001313134A4A4A7474 + 747D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7E7E7E8484843333330000001B + 1B1B5252527676767D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7F7F7F848484 + 8585850000000000008080808080808080804242420000000F0F0F2D2D2D3333 + 333434343434343434343434343434343535354A4A4A75757531313100000015 + 15152F2F2F3434343434343434343434343434343434343737374F4F4F777777 + 8080800000000000007C7C7C7C7C7C7C7C7C4141410000000000000000000000 + 0000000000000000000000000000000004040451515174747430303000000000 + 00000000000000000000000000000000000000000000000E0E0E555555767676 + 7C7C7C0000000000007777777777777777775B5B5B3A3A3A3939393939393939 + 393939393939393939393939393939393C3C3C7272727777775353533A3A3A39 + 3939393939393939393939393939393939393939393939444444737373777777 + 7777770000000000007272727272727272727272727272727272727272727272 + 7272727272727272727272727272727272727272727272727272727272727272 + 7272727272727272727272727272727272727272727272727272727272727272 + 7272720000000000006D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D + 6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D + 6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D + 6D6D6D0000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000002800000010000000200000000100180000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00F1F1F1F1F1F1CFCFED6464C97E7ECBE7E7EDB1B1E45B5BCBACACD1CACAED57 + 57CD9393C9F1F1F1F1F1F1000000000000E7E7E7E7E7E72E2EE68282E63232DA + 9898E74242D09A9AEEAFAFDE2424E58D8DE2A7A7E0E7E7E7E7E7E70000000000 + 00DDDDDDC5C5E13939CEDBDBDC4141DB5D5DEA2222CA3D3DD65757C53C3CCCDD + DDDDDDDDDDDDDDDDDDDDDD000000000000D4D4D4CDCDD53434E75151B42323CF + 8484DD5454C14242D97979B74040E45F5FB96969BBD4D4D4D4D4D40000000000 + 00CACACACACACAA4A4D46868D93434D4B9B9C49494D89191CECACACAB5B5CF6F + 6FDCAEAEC9CACACACACACA000000000000C1C1C1BABABAA1A1A1C1C1C15C5CD1 + B9B9BFC1C1C1C1C1C1A7A7A7B5B5B5C1C1C1C1C1C1C1C1C1C1C1C10000000000 + 00B7B7B72A2A2A292929B7B7B7B7B7B7B7B7B7B7B7B78080801111118B8B8BB7 + B7B7B7B7B7B7B7B7B7B7B7000000000000AEAEAE282828282828AEAEAEAEAEAE + AEAEAEAEAEAE7A7A7A111111858585AEAEAEAEAEAEAEAEAEAEAEAE0000000000 + 00A4A4A4262626282828A4A4A4A4A4A4A4A4A4A4A4A47373731010107E7E7EA4 + A4A4A4A4A4A4A4A4A4A4A40000000000009B9B9B2424240E0E0E1F1F1F1F1F1F + 2323237676766C6C6C0707071C1C1C1F1F1F1F1F1F4343439B9B9B0000000000 + 009191912222221C1C1C6666666666666A6A6A9090906666660B0B0B50505066 + 6666666666828282919191000000000000888888202020262626888888888888 + 8888888888885F5F5F0F0F0F6C6C6C8888888888888888888888880000000000 + 007E7E7E1E1E1E0B0B0B1111111111111111112A2A2A58585804040411111111 + 11111111111616166363630000000000007474746A6A6A656565656565656565 + 6565656E6E6E7070706565656565656565656565656767677474740000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000AC410000AC410000AC410000AC410000 + AC410000AC410000AC410000AC410000AC410000AC410000AC410000AC410000 + AC410000AC410000AC410000AC41} + OldCreateOrder = False + OnActivate = FormActivate + OnCreate = FormCreate + PixelsPerInch = 96 + TextHeight = 13 + object flaPreview: TShockwaveFlash + Left = 8 + Top = 8 + Width = 489 + Height = 281 + TabOrder = 0 + ControlData = { + 67556655000B00008A3200000B1D000008000200000000000800000000000800 + 0000000008000E000000570069006E0064006F00770000000800060000002D00 + 310000000800060000002D003100000008000A00000048006900670068000000 + 08000200000000000800060000002D0031000000080000000000080002000000 + 0000080010000000530068006F00770041006C006C0000000800040000003000 + 0000080004000000300000000800020000000000080000000000080002000000 + 00000D0000000000000000000000000000000000080004000000310000000800 + 0400000030000000080000000000080004000000300000000800080000006100 + 6C006C00000008000C000000660061006C0073006500000008000C0000006600 + 61006C007300650000000800060000002D0031000000} + end +end diff --git a/trunk/libsrc/FlashPlayer/uMain.pas b/trunk/libsrc/FlashPlayer/uMain.pas new file mode 100644 index 000000000..9afaebc9f --- /dev/null +++ b/trunk/libsrc/FlashPlayer/uMain.pas @@ -0,0 +1,189 @@ +unit uMain; + +interface + +uses + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, + Dialogs, OleCtrls, ShockwaveFlashObjects_TLB, StdCtrls; + +type + TfrmMain = class(TForm) + flaPreview: TShockwaveFlash; + + procedure FormActivate(Sender: TObject); + procedure FormCreate(Sender: TObject); + procedure FormDestroy(Sender: TObject); + procedure Button1Click(Sender: TObject); + private + { Private declarations } + public + { Public declarations } + end; + + type + TPipeThread = class(TThread) + protected + flashFile:string; + w:integer; + h:integer; + procedure Execute; override; + procedure displaySWF; + procedure setPos; + end; + + TBuf = array[0..255] of byte; +var + frmMain: TfrmMain; + k:String; + t:TPipeThread; +implementation + +{$R *.dfm} + + + + + +function arrToStr(k:TBuf;len:integer):string ; +var s:string; +i:integer; +begin + s:=''; + for i:=0 to len-1 do + begin + if k[i]=0 then + break; + s:=s +''+ chr(k[i]); + end; + Result:=s; +end; + +procedure TPipeThread.displaySWF(); +begin + frmMain.flaPreview.Free; + frmMain.flaPreview:=nil; + frmMain.flaPreview:=TShockwaveFlash.Create(frmMain); + frmMain.flaPreview.Left:=0; + frmMain.flaPreview.Top:=0; + frmMain.flaPreview.Width:=self.w; + frmMain.flaPreview.Height:=self.h; + frmMain.flaPreview.Parent:=frmMain; + frmMain.flaPreview.Movie:=flashFile; + + frmMain.flaPreview.Play; + frmMain.Caption:='set movie:'+flashFile; + //showmessage('flashmovie:'+flashFile); +end; + + + +procedure TPipeThread.setPos(); +var movie:WideString; +begin + movie:=frmMain.flaPreview.Movie; + SetWindowPos(frmMain.Handle,0,0,0,self.w,self.h,SWP_SHOWWINDOW); + frmMain.flaPreview.Parent:=nil; + frmMain.flaPreview.Left:=0; + frmMain.flaPreview.Top:=0; + frmMain.flaPreview.Width:=self.w; + frmMain.flaPreview.Height:=self.h; + frmMain.flaPreview.Parent:=frmMain; + frmMain.flaPreview.Movie:=movie; + + frmMain.Caption:=''+inttostr(self.w)+'x'+inttostr(self.h); + frmMain.Repaint; +end; + +procedure TPipeThread.Execute(); +var pipe:cardinal; +numBytesRead:DWORD; +buffer:TBuf; +pipename:PAnsiChar; +len:integer; +cmd:integer; +begin +pipename:=PAnsiChar('\\.\\pipe\ffdec_flashplayer_'+ParamStr(1)); +while (not self.Terminated) do +begin + pipe:=CreateFile(pipename,GENERIC_READ, + FILE_SHARE_READ + FILE_SHARE_WRITE, + nil, + OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL, + 0 + ); + numBytesRead:= 0; + + repeat + begin + ReadFile(pipe,buffer,1,numBytesRead,nil); + cmd:=buffer[0]; + if(cmd=1) then + begin + ReadFile(pipe,buffer,1,numBytesRead,nil); + if(numBytesRead>0) then + begin + len:=buffer[0]; + ReadFile(pipe,buffer,len,numBytesRead,nil); + self.flashFile:=arrToStr(buffer,numBytesRead); + Synchronize(displaySWF); + end; + end; + if(cmd=2) then + begin + ReadFile(pipe,buffer,4,numBytesRead,nil); + self.w:=buffer[0]*256+buffer[1]; + self.h:=buffer[2]*256+buffer[3]; + Synchronize(setPos); + end; + end + until numBytesRead<=0; + CloseHandle(pipe); + + +end; + +end; + +procedure TfrmMain.FormActivate(Sender: TObject); +var target:HWND; +begin + if(ParamCount>=2) then + begin + SetForegroundWindow(HWND(strtoint(ParamStr(2)))); + frmMain.Caption:='FlashPlayerWindow_'+ParamStr(2); + Application.Title:='FlashPlayerWindow_'+ParamStr(2); + target:=HWND(strtoint(ParamStr(1))); + SetWindowLong(frmMain.Handle, GWL_STYLE, 0); + ShowWindow(frmMain.Handle, SW_SHOW); + frmMain.Left:=0; + frmMain.Top:=0; + windows.SetParent(frmMain.Handle,target); + end; +end; + +procedure TfrmMain.FormCreate(Sender: TObject); +begin + if(ParamCount>=2) then + begin + ShowWindow(Application.Handle, SW_HIDE) ; + SetWindowLong(Application.Handle, GWL_EXSTYLE, getWindowLong(Application.Handle, GWL_EXSTYLE) or WS_EX_TOOLWINDOW) ; + ShowWindow(Application.Handle, SW_SHOW); + t:=TPipeThread.Create(true); + t.Resume; + end; +end; + +procedure TfrmMain.FormDestroy(Sender: TObject); +begin +t.Free; +end; + +procedure TfrmMain.Button1Click(Sender: TObject); +begin + +//flaPreview. +//flaPreview.Visible:=true; +end; + +end.