Help on a basic script
How to use gotoAndPlay comand with multipal buttons.
ŒUVRES:
AA.addEventListener (MouseEvent.CLICK, release);
function release(evt:MouseEvent):void {}
gotoAndPlay (5);
}
DOES NOT WORK:
AA.addEventListener (MouseEvent.CLICK, release);
function release(evt:MouseEvent):void {}
gotoAndPlay (5);
}
BB.addEventListener (MouseEvent.CLICK, release);
function release(evt:MouseEvent):void {}
gotoAndPlay (10);
}
Thank you!
You can't duplicate the names of functions, would be one solution...
AA.addEventListener (MouseEvent.CLICK, releaseAA);
function releaseAA(evt:MouseEvent):void {}
gotoAndPlay (5);
}
BB.addEventListener (MouseEvent.CLICK, releaseBB);
function releaseBB(evt:MouseEvent):void {}
gotoAndPlay (10);
}
Tags: Adobe Animate
Similar Questions
-
Please help improve the JavaScript script
Please help improve the JavaScript script
Hello
to increase or decrease the height of a subform, you use the following syntax in the click of + and - button
cmdAdd::JavaScript
_Row1.addInstance (1);
var b is parseFloat (Subform3.h) - 6.5;.
If (b<>
b = 0;
}
Subform3.h = b + "mm";
cmdRemove::JavaScript
If (_Row1.count > 1) {}
var b is parseFloat (Subform3.h) + 6.5.;
Subform3.h = b + "mm";
_Row1.removeInstance (this.parent.index);
}
This should do the trick, I hope this will help you
-
Can any body help to get a script that can generate the sequence (length 3) with a combination of numbers and characters example: T11... TA1... TZ9... then on
With the help of the clause type
Select sqnc
from (select sqnc
from (select 'T00"sqnc, '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' ordr
of the double
)
model
size of (0 I)
measures (sqnc, ordr, length (ordr) len)
rules iterate (1300) until (instr(sqnc[iteration_number],'~')! = 0)
(sqnc [iteration_number] = case when sqnc [cv (i) - 1] is null
then sqnc [0]
of another substr (sqnc [iteration_number - 1], 1, 1) |
-case when substr (sqnc [iteration_number - 1], 2, 1)<=>=>
so when business substr (sqnc [iteration_number - 1], 3, 1)<>
then substr (ordr [0], instr (ordr [0], substr (sqnc [iteration_number - 1], 2, 1)), 1)
of another nvl (substr (ordr [0], instr (ordr [0], substr (sqnc [iteration_number - 1], 2, 1)) + 1.1),'~ ')
end
end |
-case when substr (sqnc [iteration_number - 1], 3, 1)<>
then substr (ordr [0], instr (ordr [0], substr (sqnc [iteration_number - 1], 3, 1)) + 1.1)
else ' 0'
end
end
)
)
where instr(sqnc,'~') = 0
Concerning
Etbin
-
Can someone help me create a script to repeat to simply open the dialog box to create a link?
Can someone help me create a script to repeat to simply open the dialog box to create a link?
the "Connect" command uses the same dialog box as the command to "Place", except for the option "Replace" verified... so, use Ctrl + Shift + P to bring up the place dialog box, select your new image and select the checkbox "replace".
If check 'Replace' with the mouse slow you down, after you have selected your image, the tab key 'press' 3 times to change the focus, and then press the SPACEBAR to check it out, then ok to place.
-
Need help to modify the Script to find the number of vCPU and reservation of memory in VC
Hello
Need help to modify the script so that his can person report to the vc all focus level instead of each level of the Cluster.
Thank you
KR
Try this instead:
$vmsInfo = Get-VM #Creating array to place new object $reportdata = @() Foreach ($vm in $vmsInfo) { #Creating new object $vmInfo = "" | Select Name, CPUReservationMHz, MemoryReservationGB $vmInfo.Name = $vm.Name $vmInfo.CPUReservationMHz = $vm.ExtensionData.ResourceConfig.CpuAllocation.Reservation $vmInfo.MemoryReservationGB = $vm.ExtensionData.ResourceConfig.MemoryAllocation.Reservation / 1024; #Inserting data into new object. $reportdata += $vminfo } $reportdata
-
I try to write a script by my slef but not work
app.findGrepPreferencest = firstLineIndent:8, leftIndent:8;
app.changeGrepPreferences = firstLineIndent:8, leftIndent:16;
app.changeGrep ();
app.findGrepPreferences = app.changeGrepPreferences = null;
Can someone please help me fix the script, please.
Hello
Try this.
app.findGrepPreferences = app.changeGrepPreferences = null;
app.findGrepPreferences.firstLineIndent = '8 ';
app.findGrepPreferences.leftIndent = '8 ';
app.changeGrepPreferences.firstLineIndent = '8 ';
app.changeGrepPreferences.leftIndent = "16pt;
app.changeGrep ();
app.findGrepPreferences = app.changeGrepPreferences = null;
Kind regards
Cognet
-
Please help me fix my script!
Please help me fix my script
I use this script that copy from the adobe forum:
app.findGrepPreferences.findWhat = "\\r";
app.changeGrepPreferences.changeTo = "\\r\\r";
app.changeGrep ();
app.findGrepPreferences = app.changeGrepPreferences = null;
to change my back one or two, but it will always change all my documents.
How can I tell the script that I only want to change the selection?
Hello
Note the syntax ==> target changeGrep()
If the target is app ==> it runs through the entire application of the ways each open document
If the target is doc ==> it runs through all doc
It can be called for textFrame, story, paragraph..., any text object.
In your use case
App.Selection [0] .changeGrep ();
or browse the selection and appeal
App.Selection [i] .changeGrep ();
Jarek
-
I need help to write a script that detects the first instance of a paragraph style and then change
I need help to write a script that detects the first instance of a paragraph style and then he goes to a different paragraph style. I don't necessarily need someone to write all this, by the biggest problem is to find how to find just the first instance of the paragraph style. Any help would be greatly appreciated, thank you!
Hello
then try this with your active doc:
....................
myDoc var = app.activeDocument;
mStyle var = myDoc.paragraphStyles.item ("PS_NameToFind"); change the name to paraStyle
var mStyle_1 = myDoc.paragraphStyles.item ("PS_NameToChange"); change the name to paraStyle
var mFrames = myDoc.pages.everyItem ().textFrames.everyItem () .getElements ();
app.findTextPreferences = null;
app.findTextPreferences.appliedParagraphStyle = mStyle;
for (var k = 0; k)< mframes.length;="">
{
currFound = mFrames [k] .findText ();
If (currFound.length > 0)
currFound [0] .paragraphs [0] .appliedParagraphStyle = mStyle_1;
}
app.findTextPreferences = null;
................
Rgds
-
Need help with a basic host script?
You can limit the virtual machines, you receive chaining cmdlets Get-VmHost and Get - Vm together like this
$hostlist = (get-vmhost -Name (get-content c:\hosts.txt) | select Name) #Get VMs for each host foreach ($esx in $hostlist) { $VMs = Get-VMHost $esx | Get-VM foreach ($vm in $VMs) { Write-host $vm.Name Write-host $vm.MemoryMB Write-host $vm.numcpu Write-host $vm.Guest } }
-
Hello world
I haven't used PowerCLi before (but know previous script).
I need to write a script that will tell me that VM have discs that are thin provisioned. Can anyone help?
Thank you.
David
Try this
It shows what vm and what the VM vmdk is thin
http://www.vcritical.com/2009/01/finding-thin-provisioned-virtual-disks-with-PowerShell/
$vmtp = Get-VM $vmtp += Get-Template foreach($vm in $vmtp | Get-View){ foreach($dev in $vm.Config.Hardware.Device){ if(($dev.GetType()).Name -eq "VirtualDisk"){ if($dev.Backing.ThinProvisioned -eq $true) { $vm.Name + "`t" + $dev.Backing.FileName } } } }
-
Need help to write a script that opens files, removes layers and sous-calques
Hey all,.
I'm a noob to the community of script, and what I try to do is file edit commands that share the same names of layers and sublayers. I have a few questions that would be incredibly useful if I could have answered.
I'm not sure how to define a script too call out of the layers that have been created without script. I need to create a variable for the existing layers and leave the script to know what their names are in the files?
For example, I have three files which have each layer named 'cutlayer', 'trimlayer', 'fold' and 'work '. I need to write a script that opens three files, deletes the layer 'fold' of each file, and then move the layer "trimlayer" in his own sublayer in 'work' (the base layer can be on the top so reorganization sublayers is not necessary to worry about something). I do not understand how to write the script because I couldn't find examples in the documentation for the script provided on the adobe website which has worked with existing files.
It's my shot at what I'm trying to do, with English fill in the blanks of what I do not know how to script. If anyone can help me understand this point, I would really appreciate it!
app.documents.openDlg (prompt, filter, MultiSelect); the user opens the associated files
If (documents.length > 0) //run the script through each document individually
{
sourceDoc = activeDocument;
delete the "fold" sourceDoc layer
move the "trimlayer" in the layer "work."
remove the underlayment 'path' of layer "work."
Run the script through each document
Save the new file name folder in the new parallel to the current folder on the hard disk
Go out and spend in each document until there is no more
}
create new document
Place documents published in different layers in the new document, with a distance between them, optimize the space on a 51 "x 51" work plan, using as little of the artboard as possible. "
All comments are things basically, I do not know how and am trying to figure out how to do, so if anyone has a second to explain some of these things, I would really appreciate it!
Thanks again!
I know it of very frustrating when his apprenticeship and things don't go as planned, but understand that it is quite confusing as it is and do not add more confusion to the mix by using other tools than those provided. I mean JSLint, it might be useful with GENERAL javascript syntax, but Adobe's Javascript implementation is another animal, or another language, always JavaScript, but intended to be run by its own engine. JSLint has no idea what "layers", or "pathItems" are, it will trigger errors when he sees the objects, it does not recognize.
.. .in learning... not to take baby, write a single line of code and run... If it works, write another line of code
Try this version (always in the ESTK),'re missing you a few "++", and you do not change "documents" with "docs" in a certain place
var docs = File.openDialog("Select Files to Open", "*.ai", true); var idx = 0; for (idx = 0; idx < docs.length; ++idx) { var doc = app.open(docs[idx]); var myCounter = 0; for (myCounter = 0; myCounter < doc.layers.length; myCounter++) { doc.layers[myCounter].locked = false; } doc.layers.getByName('Crease').remove(); doc.layers.getByName('Regmark').remove(); doc.layers.getByName('Artwork').pathItems[0].remove(); doc.layers.getByName('Through Cut').hasSelectedArtwork = true; doc.layers.getByName('Through Cut').pathItems[0].strokeColor = doc.swatches.getByName("Black").color; doc.layers.getByName('Through Cut').move(doc.layers.getByName('Artwork'), ElementPlacement.INSIDE); }
-
Help needed - debug the script.
Hi Experts,
Can someone help me to debug the script below.
Basically, I'm just checking the dates of a column DATE_NAME and if its between the selected range, I'm assiging a number.
Select DATE_NAME, CASE
WHEN
Trim (to_char(DATE_NAME,'DD-MON')) BETWEEN the TRIM (TO_CHAR (to_DATE (15 - DEC ',' DD - MY '), "JJ - LUN")) AND TRIM (TO_CHAR (to_DATE (10-JAN ',' DD - MY '), "JJ - LUN")) THEN 1
WHEN
Trim (to_char(DATE_NAME,'DD-MON')) BETWEEN the TRIM (TO_CHAR (to_DATE (11-JAN ',' DD - MY '), "JJ - LUN")) AND TRIM (TO_CHAR (to_DATE ('07 - FEB ',' DD - MY '), "JJ - LUN")) THEN 2
WHEN
Trim (to_char(DATE_NAME,'DD-MON')) BETWEEN the TRIM (TO_CHAR (to_DATE ('08 - FEB ',' DD - MY '), "JJ - LUN")) AND TRIM (TO_CHAR (to_DATE ('07 - MAR ',' DD - MY '), "JJ - LUN")) THEN 3
WHEN
Trim (to_char(DATE_NAME,'DD-MON')) BETWEEN the TRIM (TO_CHAR (to_DATE ('08 - MAR ',' DD - MY '), "JJ - LUN")) AND TRIM (TO_CHAR (to_DATE ('04 - APR ',' DD - MY '), "JJ - LUN")) THEN 4
WHEN
Trim (to_char(DATE_NAME,'DD-MON')) BETWEEN the TRIM (TO_CHAR (to_DATE ('05 - APR ',' DD - MY '), "JJ - LUN")) AND TRIM (TO_CHAR (to_DATE ('02-MAY ',' DD - MY '), "JJ - LUN")) THEN 5
WHEN
Trim (to_char(DATE_NAME,'DD-MON')) BETWEEN the TRIM (TO_CHAR (to_DATE ('03-MAY ',' DD - MY '), "JJ - LUN")) AND TRIM (TO_CHAR (to_DATE (MAY 30 ',' DD - MY '), "JJ - LUN")) THEN 6
WHEN
Trim (to_char(DATE_NAME,'DD-MON')) BETWEEN the TRIM (TO_CHAR (to_DATE (MAY 31 ',' DD - MY '), "JJ - LUN")) AND TRIM (TO_CHAR (to_DATE (27 - JUN ',' DD - MY '), "JJ - LUN")) THEN 7
WHEN
Trim (to_char(DATE_NAME,'DD-MON')) BETWEEN the TRIM (TO_CHAR (to_DATE (28 - JUN ',' DD - MY '), "JJ - LUN")) AND TRIM (TO_CHAR (to_DATE (25 - JUL ',' DD - MY '), "JJ - LUN")) THEN 8
WHEN
Trim (to_char(DATE_NAME,'DD-MON')) BETWEEN the TRIM (TO_CHAR (to_DATE (26 - JUL ',' DD - MY '), "JJ - LUN")) AND TRIM (TO_CHAR (to_DATE (22 - AUG ',' DD - MY '), "JJ - LUN")) THEN 9
WHEN
Trim (to_char(DATE_NAME,'DD-MON')) BETWEEN the TRIM (TO_CHAR (to_DATE (23 - AUG ',' DD - MY '), "JJ - LUN")) AND TRIM (TO_CHAR (to_DATE (19-SEP ',' DD - MY '), "JJ - LUN")) THEN 10
WHEN
Trim (to_char(DATE_NAME,'DD-MON')) BETWEEN the TRIM (TO_CHAR (to_DATE (20-SEP ',' DD - MY '), "JJ - LUN")) AND TRIM (TO_CHAR (to_DATE (17 - OCT ',' DD - MY '), "JJ - LUN")) THEN 11
WHEN
Trim (to_char(DATE_NAME,'DD-MON')) BETWEEN the TRIM (TO_CHAR (to_DATE (18 - OCT ',' DD - MY '), "JJ - LUN")) AND TRIM (TO_CHAR (to_DATE (14 - NOV ',' DD - MY '), "JJ - LUN")) THEN 12
WHEN
Trim (to_char(DATE_NAME,'DD-MON')) BETWEEN the TRIM (TO_CHAR (to_DATE (15 - NOV ',' DD - MY '), "JJ - LUN")) AND TRIM (TO_CHAR (to_DATE (12 - DEC ',' DD - MY '), "JJ - LUN")) THEN 13
0 OTHERWISE
END AS D_TIME PERIOD;
Any help will be appreciated.
PS: DATE_NAME is of DATE data type.
Thank you
G
Published by: Gurusank on June 24, 2009 15:53Do not convert the date to a string for comparison. For example your following code snippet:
TRIM(TO_CHAR(DATE_NAME,'DD-MON')) BETWEEN TRIM(TO_CHAR(to_DATE('15-DEC', 'DD-MON'),'DD-MON') ) AND TRIM(TO_CHAR(to_DATE('10-JAN', 'DD-MON'),'DD-MON'))
should be written as
DATE_NAME BETWEEN to_DATE('15-DEC', 'DD-MON') and to_DATE('10-JAN', 'DD-MON')
Are you sure avoiding the year (YYYY) in your format to to_date mask. This will affect current year to date
In this case, something likeTO_DATE(TO_CHAR(DATE_NAME,'DD-MON')), 'DD-MON') BETWEEN to_DATE('15-DEC', 'DD-MON') AND to_DATE('10-JAN', 'DD-MON')
(It could be an effective way to make this part. Nothing is striking for me from now on.)
I hope this helps.
Kind regards
JO -
Help with the Powershell script to collect logs from all domain controllers
I am writing a script to retrieve the last 5 days of application, security and log files from all domain controllers. The script runs, but fire the logs from the local server only. The variable $Computer has all of my DC so it's the fine mark. I guess it's a problem with my line ForEach-Object, but is not error. See the below script.
$log = 'application '.
$date = get-date-format MM-DD-YYYY
$now = get-date
$subtractDays = new-object System.TimeSpan 5,0,0,0,0
$then = $Now.Subtract ($subtractDays)
$Computers = get-ADDomainController-filter *.
ForEach-Object - InputObject $Computers - process {Get-EventLog - LogName $log - after $then - before $now - EntryType error | select EventID, MachineName, Message, Source, TimeGenerated |} ConvertTo-html | {Out-file $env:TEMP\Applicationlog.htm}
Invoke-Expression $env:TEMP\Applicationlog.htmThank you
Rich
Hello
To help with the repost the question script to the script Center Forum
http://social.technet.Microsoft.com/forums/scriptcenter/en-us/home
-
Hello everyone.
Can sb help me create the following script, based on three tables:
ID col1 314 value2 ID ID1 col2 314 1 somevalue4 314 2 somevalue5 314 3 somevalue6 ID ID1 ID2 COD Qty. 314 1 1 LTR 10 314 1 2 KG 20 314 2 1 LTR 40 The result should be like this:
id id1 ID2 cod_1 qty_1 COD2 qty_2 col1 col2 314 1 1 LTR 10 KG 20 value2 somevalue4 314 2 1 LTR 40 value2 somevalue5 Post edited by: 933651
Hello
Here is my view on this problem. May need some adjustments in the join conditions when the data model and the data is more clear
create table t1 ( id number, col1 varchar2(10) ); insert into t1 values (314, 'somevalue2'); create table t2 ( id number, id1 number, col2 varchar2(10) ); insert into t2 values (314, 1, 'somevalue4'); insert into t2 values (314, 2, 'somevalue5'); insert into t2 values (314, 3, 'somevalue6'); create table t3( id number, id1 number, id2 number, cod varchar2(3), qty number ); insert into t3 values (314, 1, 1, 'LTR', 10); insert into t3 values (314, 1, 2, 'KG', 20); insert into t3 values (314, 2, 1, 'LTR', 40); with ltr as ( select id, id1, id2, cod, qty from ( select id, id1, id2, cod as code, cod, qty from t3 ) pivot ( sum(qty) for code in ('LTR' as qty) ) where qty is not null ), kg as ( select id, id1, id2, cod, qty from ( select id, id1, id2, cod as code, cod, qty from t3 ) pivot ( sum(qty) for code in ('KG' as qty) ) where qty is not null ) select t2.id, t2.id1, ltr.id2, ltr.cod, ltr.qty, kg.cod, kg.qty, t1.col1, t2.col2 from t2 join ltr on ( t2.id = ltr.id and t2.id1 = ltr.id1 ) full join kg on ( t2.id = kg.id and t2.id1 = kg.id1 ) left join t1 on ( t1.id = t2.id ) order by id, id1 ; drop table t1 purge; drop table t2 purge; drop table t3 purge; table T1 created. 1 rows inserted. table T2 created. 1 rows inserted. 1 rows inserted. 1 rows inserted. table T3 created. 1 rows inserted. 1 rows inserted. 1 rows inserted. ID ID1 ID2 COD QTY COD QTY COL1 COL2 ---------- ---------- ---------- --- ---------- --- ---------- ---------- ---------- 314 1 1 LTR 10 KG 20 somevalue2 somevalue4 314 2 1 LTR 40 somevalue2 somevalue5 table T1 dropped. table T2 dropped. table T3 dropped.
-
Need help with understanding PowerCli scripting by LucD
Hello
I'll give you the standard statement that I am a noob powercli and don't really know what I'm doing here. Here's a script that works because it runs without error and gives a report but I need help to understand this under his weight.
Connect-VIServer '< our vcenter >' - user < user > admin-password < admin-user-pwd >
$allvms = @)
$vms = get - Vm | where {$_.} PowerState - eq "Receptor"}
$start = (get-Date). AddDays(-1)
$metrics = "mem.usage.average".
$stats = get-Stat-entity $vms - start $start - Stat $metrics
$stats | Group-object - property {$_.} Timestamp.Day}, {$_.} @entity.name} | %{
$vmstat = "" | Select the day, MemAlloc, MemMin, MemMax, MemAvg, VmName
$vmstat. VmName = $_. Values [1]
$vmstat. Day = $_. Group [0]. Timestamp.Date
$mem = $_. Group | where {$_.} MetricId - eq "mem.usage.average"} | Measure-object-property value - average - Maximum - Minimum
$vmstat. MemMax = [int] $mem. Maximum ##dfsdf
$vmstat. MemAvg = [int] $mem. Average
$vmstat. MemMin = [int] $mem. Minimum
$vmstat. MemAlloc = $_. Group [0]. Entity.MemoryMB
$allvms += $vmstat
}
$allvms |
Export-Csv "c:\ < folder > \ <>.csv file Destination"-noTypeInformation
It connects to our server vcenter server and offers two days of data. Today and yesterday, all with a timestamp of 0:00. See below for an example of a virtual machine.
VmName Day MemAlloc MemMax MemAvg MemMin < name VM1 > 07/05/2016 0:00 4096 18 18 18 < name VM1 > 06/05/2016 0:00 4096 36 12 8
The MemMax, the MemAvg and the MemMin are for this day? Just the max of this period of sampling time 0:00?
What I'm looking for, it is to find that the use of the maximum memory of virtual machines are for the whole day. So I hope that I can remove memory of VMs that do not use it. I was listed on the change $start = (Get-Date). The value of AddDays(-1) to $start = (Get-Date). AddDays(-30) and see what things alike. I want to be sure however that the value for MemMax is the highest value for a period of 24 hours. That is to say for the 07/05/2016 the given virtual machine never used a maximum of 18% of his memory attributed the 06/05/2016 the maximum amount of memory used was 36%, and so on that I extend on the date range.
Kind regards
Michael
It then becomes a rather simple Get-Stat script.
$vms = get - Vm | where {$_.} PowerState - eq "Receptor"}
$start = (get-Date). AddDays(-1)
$metrics = "mem.usage.average".
Get-Stat - entity $vms - start $start - Stat $metrics |
Select Timestamp,@{N='VM'; E={$_. @entity.name}}, Value |
Tri-objet-VM property |
Export-Csv "c:\
------ .csv '-noTypeInformation
Maybe you are looking for
-
The upgrade of memory in my Equium M50-164
I have this laptop and tells me that it can take up to 2 GB of memory. I bought the two 1 GB PC2700 sodimm but cannot find a single port memory. Can anyone help? Port memory I found is on the underside of the machine and remove the access screw accor
-
Change the structure of program based on the input file
I have a program that takes parameters of an input file and then executes a Visual acquisition, using IMAQ, controlling some other hardware at the same time. The duration of the various stages of this process control settings. There is a sequence st
-
Get ink system failure-code-Oxc18a0201 error message when you try to print from C7180 printer
Original title: C7180 printer all in one I'm unable to print I receive ink system failure-code-Oxc18a0201. HELP IF YOU CAN THANK YOU FOR YOUR TIME.
-
M175nw three groups of dots of color in all pages
Hi today I installed a new HP LaserJet M175nw, all was fine until shows a user a line of four points in black, cyan, magenta and yellow a color after the other. the line is vertical. This group of points appears three times on the page. I had al of t
-
Presario SR1110NX new compatible video card?
Hi, this is a rather old model 2002, but I was wondering if an NVIDIA geforce GTS 250 video card would work with it? And if not, any information on other compatible video cards would be much apreciated