cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Embedding Flash as an Embedded XUI Control in Arbortext

Highlighted
Newbie

Embedding Flash as an Embedded XUI Control in Arbortext

Hi - we would like to embed Flash content in a .swf file into an Arbortext xml document.

I see that XUI controls can be embedded into an Arbortext document and that an XUI control can be an ActiveX container (and Flash is ActiveX) so in theory it should all work..

I'm wondering - has anyone ever tried this and if so any details on how it was implemented (or pitfalls) would be great..

thx

David



Tags (2)
16 REPLIES 16
Highlighted

RE: Embedding Flash as an Embedded XUI Control in Arbortext

Well, as you said, there's an ActiveX component to embed .swf files. You just have to define an ActiveXControl in your .dcf file whith programId=Shockwaveflash.Shockwaveflash.9 (or any other version), inPlaceActivate=yes if you want to have it embeded onto the surface of your document.

You need to have a script to control your Flash movie (at least initialization). You can define 3 functions to do it : controlName_OnInitialize, controlName_OnClose and controlName_OnCancel (see customizer's guide for further informations). Typically, you will have in your controlName_OnInitialize function something like :

controlName.Movie = "your_file.swf";
controlName.Loop = false;
controlName.Play();

It's possible to establish communication beetween Arbortext and your Flash movie, if you need to do it, I should be able to give you some tips about it.

Samuel

Highlighted

RE: Embedding Flash as an Embedded XUI Control in Arbortext

Samuel - thanks for your invaluable help..

We are new to scripting in Arbortext .. can you advise where to place the script to control the Flash .swf? Do you have a sample of a very basic flash control script?


(I am assuming you are meaning a javascript script - right?)

We will definitely also need to communicate between Arbortext and Flash so if you can provide details on the tips you mentioned that will be great and save us a lot of time trying to get this to work 🙂

David

Highlighted

RE: Embedding Flash as an Embedded XUI Control in Arbortext

David,

Here is a basic script file to load a Flash movie :



File Test.js
Highlighted

RE: Embedding Flash as an Embedded XUI Control in Arbortext

Samuel - thanks again for this very helpful info.

We are presently temporarily assigning one of our Flash specialists to the Arbortext project. I will have her try out your code.

Thanks again.

David

Highlighted

RE: Embedding Flash as an Embedded XUI Control in Arbortext

Hi Samuel,

I am the Flash person that David talked about in last thread of this post. We really appreciate your help so far .

We tried to make a simple example with your instructions, but didn't succeed. It seems that Arbortext was able to recognize the element name and relate the Flash ActiveXControl to it. Because when I right click on it, it says "About Adobe Flash 9". But the Flash movie wasn't loaded. The same right click menu says, "Movie not loaded". And it displayed a blank on Arbortext. It seems like that the Flash movie wasn't found. I placed a simple flash movie, test.swf, in the same folder as the xml and dcf file.


I attached a zip file. I put it under the folder of "C:\Program Files\Arbortext\Editor\custom\doctypes\flash-test". There is a script file, test.js, which was placed under"C:\Program Files\Arbortext\Editor\custom\scripts" as you suggested. Inside the test.js, it is

/*
* Initialization
*/
function FlashTest_OnInitialize(ActiveNode) {
FlashTest.Movie = "test.swf";
FlashTest.Loop = false;
FlashTest.Play();
}



The example is really simple with only one xml element. I couldn't figure out what else is missing to just display the Flash movie inside Arbortest Editor.

That would be great if you can try this example and give us some hints. We are stuck. Again, we really appreciate it.



Thanks,

Jin


















In Reply to:

David,

Here is a basic script file to load a Flash movie :



File Test.js
Highlighted

RE: Embedding Flash as an Embedded XUI Control in Arbortext

Maybe it's a path problem. I currently use absolutes pathnames, and I didn't yet try with relatives.
Highlighted

RE: Embedding Flash as an Embedded XUI Control in Arbortext

Hi Samuel, Thanks for your quick reply.

I tried absolute path name as well. For example,

/*
* Initialization
*/
function FlashTest_OnInitialize(ActiveNode) {
FlashTest.Movie = "C:\test.swf";
FlashTest.Loop = false;
FlashTest.Play();
}

or FlashTest.Movie = "C:\Program Files\Arbortext\Editor\custom\doctypes\flash-test\test.swf";

Is that how you define absolute file path for swf file? Thanks so much.




Highlighted

RE: Embedding Flash as an Embedded XUI Control in Arbortext

I finally got it loaded. You are right about file path.

I found that "C:/test.swf" will work, instead of "C:\test.swf".

Thanks.

Highlighted

Embedding Flash as an Embedded XUI Control in Arbortext

You may find you need to escape backslashes in quoted strings, eg.
"c:\\test.swf" instead of "c:\test.swf".



-G


Highlighted

RE: Embedding Flash as an Embedded XUI Control in Arbortext

Hi Samuel,

I got a new question. Do you know how to embed FlashVars in Arbortext? I assume it is also in the OnInitialize function. But what's the format? I didn't find any information on embedding Flash with Arbortext online at all. Your help is really valuable.

Also can I define the width and height and ScaleMode within OnInitialize function in the way below? I generally want to know how to write embed/param tag that we usually do in a html page.

/*
* Initialization
*/
function FlashTest_OnInitialize(ActiveNode) {
FlashTest.Movie = "C:/test.swf";
FlashTest.Loop = false;
FlashTest.Height = 500;
FlashTest.Width = 800;
FlashTest.ScaleMode = "ShowAll";
FlashTest.Play();
}

But it didn't work. Maybe I am missing something again.

Thanks,

Jin

Highlighted

RE: Embedding Flash as an Embedded XUI Control in Arbortext

Thanks, the escape backslashes worked. Do you know how to define FlashVars for Flash Movie inside ArborText? I assume it should be in the function of ControlName_OnInitialize. But what's the format? I couldn't find any information on embedding Flash inside ArborText in the help documents or online. Your help will be really valuable.

Generally I want to know how to define variables(ScaleMode, Height, Width, etc.) in embed/param tag that we usually do for a html page, is it something like,

/*
* Initialization
*/
function FlashTest_OnInitialize(ActiveNode) {
FlashTest.Movie = "C:/javadev/FlashTeam/QNATools/test.swf";
FlashTest.Loop = false;
FlashTest.Height = 500;
FlashTest.Width = 800;
FlashTest.ScaleMode= "ShowAll";
FlashTest.Play();
}

But it didn't seem to be working.



Thanks,

Jin

Highlighted

RE: Embedding Flash as an Embedded XUI Control in Arbortext

Thanks, the escape backslashes worked. Do you know how to define FlashVars for Flash Movie inside ArborText? I assume it should be in the function of ControlName_OnInitialize. But what's the format? I couldn't find any information on embedding Flash inside ArborText in the help documents or online. Your help will be really valuable.

Generally I want to know how to define variables(ScaleMode, Height, Width, etc.) in embed/param tag that we usually do for a html page, is it something like,

/*
* Initialization
*/
function FlashTest_OnInitialize(ActiveNode) {
FlashTest.Movie = "C:/javadev/FlashTeam/QNATools/test.swf";
FlashTest.Loop = false;
FlashTest.Height = 500;
FlashTest.Width = 800;
FlashTest.ScaleMode= "ShowAll";
FlashTest.Play();
}

But it didn't seem to be working.



Thanks,

Jin


Highlighted

RE: Embedding Flash as an Embedded XUI Control in Arbortext

Thanks, the escape backslashes worked. Do you know how to define FlashVars to Flash Movie inside ArborText? I assume it should be in the function of ControlName_OnInitialize. But what's the format? I couldn't find any information on embedding Flash inside ArborText on the help documents or online. Your help will be really valuable.

Generally I want to know how to define variables(ScaleMode, Height, Width, etc.) in embed/param tag that we usually do for a html page, is it something like,



/*
* Initialization
*/
function FlashTest_OnInitialize(ActiveNode) {
FlashTest.Movie = "C:/javadev/FlashTeam/QNATools/test.swf";
FlashTest.Loop = false;
FlashTest.Height = 500;
FlashTest.Width = 800;
FlashTest.ScaleMode= "ShowAll";
FlashTest.Play();
}

But it didn't seem to be working.



Thanks,

Jin

Highlighted

RE: Embedding Flash as an Embedded XUI Control in Arbortext

Sorry that I didn't see the second page for this thread. I was wondering what my post went, So I kept trying until I see there is another page. Sorry for the repeat posts.



Highlighted

Embedding Flash as an Embedded XUI Control in Arbortext

That's OK, I thought they were from PTC's "Department of Redundancy
Department".


Highlighted

RE: Embedding Flash as an Embedded XUI Control in Arbortext

Hi Samuel,

I was reading this thread and wonder if I can Integrate Flash with Java in Epic instead of ActiveX?

Thanks,

-David

Announcements