|
Go
![]() |
New
![]() |
Find
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Member |
Hi Admin,
Now, I can capture the vet scene and save the pic with a jpeg format via 'VMPCapture'instead of using Printscreen button. question 1: I create some text via 'Layer2D' such as 'save pic', and I want to apply the function shown above to that text,so when the user click the text, a window of saving pic will show. What code should I apply to the text MTSInstant ? ============================= question 2: If I want to apply this function to a button in Flash, what codes should I put in the actionscript window? many many thanks |
||
|
|
Member |
question 1:
place an interactor in your scene that handles the mouse events coming from the 2dlayer and then call your function like so: <!-- 2D LAYER --> <MTSInstance Name="my_2dlayer_master" > <MTSInstance Name="my_2dlayer_parent" > <LayerData Name="my_2dlayer" Text="Text Here!" Shadow="0" WidgetLine="0" AlwaysVisible="1" AnchorWidget="1" DstPin="30 30" WidgetClamp="0" /> </MTSInstance> </MTSInstance> <!-- INTERACTOR --> <MTSInteractor Name="my_interactor" > <Target Name="MTSInstance.my_2dlayer_parent" /> <MTSHandle Event="MouseLeftDown" Action="MTSJavaScript" Func="myJavaScriptFunc()" /> </MTSInteractor> ===================== question 2: the same way you apply the code to buttons in Flash as you say you do here: http://viewpoint.infopop.cc/eve/forums?a=tpc&f=64329280...441011892#3441011892 This message has been edited. Last edited by: Admin, |
|||
|
|
Member |
Hi Admin,
I add some codes shown below, <MTSInstance Name="text1" > <MTSInstance Name="textbut1" > <LayerData Name="my_2dlayer" Text="capture!" Shadow="0" WidgetLine="0" AlwaysVisible="1" AnchorWidget="1" DstPin="30 30" WidgetClamp="0" /> </MTSInstance> </MTSInstance> <MTSInstance Name="text2" > <MTSInstance Name="textbut2" > <LayerData Name="my_2dlayer" Text="save it!" Shadow="0" WidgetLine="0" AlwaysVisible="1" AnchorWidget="1" DstPin="190 30" WidgetClamp="0" /> </MTSInstance> </MTSInstance> <MTSInteractor Name="my_interactor1" > <Target Name="MTSInstance.textbut1" /> <MTSHandle Event="MouseLeftClick" Action="VETDispatchCall" Function="shot::VMPCapture()" /> </MTSInteractor> <MTSInteractor Name="my_interactor2" > <Target Name="MTSInstance.textbut2" /> <MTSHandle Event="MouseLeftClick" Action="VETDispatchCall" Function="shot::VMPLocalPersist()" /> </MTSInteractor> but it looks something wrong can u help me fix it? Thanks |
|||
|
|
Member |
Have you specified a VMPExtremeShot MTSTimeElem ?
Also, I noticed you forgot to rename one of your layers: <MTSInstance Name="text1" > <MTSInstance Name="textbut1" > <LayerData Name="my_2dlayer" Text="capture!" Shadow="0" WidgetLine="0" AlwaysVisible="1" AnchorWidget="1" DstPin="30 30" WidgetClamp="0" /> </MTSInstance> </MTSInstance> <MTSInstance Name="text2" > <MTSInstance Name="textbut2" > <LayerData Name="my_2dlayer" Text="save it!" Shadow="0" WidgetLine="0" AlwaysVisible="1" AnchorWidget="1" DstPin="190 30" WidgetClamp="0" /> </MTSInstance> </MTSInstance> |
|||
|
|
Member |
Hi Admin,
I didn't specify a VMPExtremeShot MTSTimeElem in my codes, can you give me an example about how to write it within <MTSTimeElem> ? Thanks -------------------------------- Another question is : Is it possible that create a flash file and when the image is saved the flash file will load that image immediately? Thanks for your help |
|||
|
| Powered by Eve Community |
| Please Wait. Your request is being processed... |
|

