Action script for sound
ok here is my goal.
When a frame is loaded I want an mp3 to play but I only want
it to play once. and NEVER again. Even if the frame is loaded
again.
What is the best way to achieve this?
Thanks
use:
//if loading a streaming mp3 file from a directory
var mySound = new Sound();
mySound.loadSound('theFileName', true);
//if loading a sound file from the Library with a linkage ID
var mySound = new Sound();
mySound.attachSound('sound_id');
BUT, use a boolean conditional statement to limit the playing
of the sound once, as in something like:
if(!open) {
var mySound = new Sound();
mySound.loadSound('theFileName', true);
open=true;
the first time the file is instatiated, 'open' will be
undefined therefore satisfying the condition, but from that point
forward while the file is running 'open' will become true, and will
not load the sound again.
Similar Messages
-
After action script for Solaris
Hi,
I'm having trouble with an after action script for the solaris box.
my script reads..
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE Waveset PUBLIC 'waveset.dtd' 'waveset.dtd'>
<Waveset>
<ResourceAction name='after-create'>
<ResTypeAction restype='Solaris' timeout='60000'>
<act>
#!/bin/ksh
echo "$WSUSER_accountId says Hello World!"
PATH=/usr/lib/nis:$PATH; export PATH
nisaddcred -p [email protected] -P keerthi2.example.com. des
exit 0
</act>
</ResTypeAction>
</ResourceAction>
</Waveset>
I have edited the tabbed user form to include the following field:
<Field name='global.create after action'>
<Expansion>
<s>after-create</s>
</Expansion>
</Field>
Now when i am trying to create a user in my IDM n assigning the Solaris resource i'm getting the following error..
com.waveset.util.WavesetException: An error occurred adding user 'client1' to resource 'Solaris Client'. com.waveset.util.WavesetException: Script failed waiting for "_,)#+(:" in response "" com.waveset.util.WavesetException: Script processor timed out with nothing to read and the following unprocessed text: "".
the account is created in IDM.
please help me out!
Regards
SanjeevHi-
Did you ever get a resolution to this issue? I am seeing the exact same error in IDM 8.0 patch 3
Error
com.waveset.util.WavesetException: An error occurred adding user 'testusr15' to resource 'idm_client'. com.waveset.util.WavesetException: Script failed waiting for "$" in response "_,)#+(:" com.waveset.util.WavesetException: Script processor timed out with nothing to read and the following unprocessed text: "_,)#+(:".
My action script looks like this:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE Waveset PUBLIC 'waveset.dtd' 'waveset.dtd'>
<Waveset>
<ResourceAction name='after-create-nppasswd'>
<ResTypeAction restype='Solaris'>
<act>
#!/bin/sh
touch /tmp/idmtest
release=`uname -r`
if [ $release != "5.10" ]; then
passwd -l $WSUSER_accountId
sed "s/$WSUSER_accountId:\*LK\*/$WSUSER_accountId:NP/" /etc/shadow > /etc/shadow.new
mv /etc/shadow.new /etc/shadow
else
passwd -N $WSUSER_accountId
fi
exit 0
</act>
</ResTypeAction>
</ResourceAction>
</Waveset> -
Hi.
I am using NetConnection and NetStream to play back flv in Flash Pro CS5.5, and trying to add cue point to trigger events using Action Script, and to automatically rewind to the start at the end. There is no problem to trigger events via AS when the cue points are embedded, but i am unable to add cue points using AS.
When i use an FLVPlayback component, there is no problem to add cue points (http://help.adobe.com/en_US/ActionScript/3.0_UsingComponentsAS3/WS5b3ccc516d4fbf351e63e3d1 18a9c65586-7feb.html) and to loop the playback using autoRewind (and fl.video.VideoEvent.AUTO_REWOUND which i got from Nafem at http://forums.adobe.com/thread/857036).
However, i am failing to use this same code w/a netConnection and netStream, and would appreciate any help.
thanks.Hello,
Well, I've got some help from another helpful fellow at macscripter.net and I have a working script - albeit a bit more specific (ie, hardcoded extensions to look for) and a different approach.
Here's the script:
on adding folder items to thisFolder after receiving addedItems
repeat with movieFile in addedItems
set {Nm, Ex} to getName_andExtension(movieFile)
set movieFilePath to (thisFolder as text) & Nm & ".avi"
set subtitleFile to (thisFolder as text) & Nm & ".srt"
if Ex is ".srt" then
try
tell application "iFlicks"
import (movieFilePath as alias) with gui
end tell
end try
else if Ex is ".avi" then
if my FinderItemExists(subtitleFile) then
try
tell application "iFlicks"
import (movieFilePath as alias) with gui
end tell
end try
end if
end if
end repeat
end adding folder items to
on getName_andExtension(F)
set F to F as Unicode text
set {name:Nm, name extension:Ex} to info for file F without size
if Ex is missing value then set Ex to ""
if Ex is not "" then
set Nm to text 1 thru ((count Nm) - (count Ex) - 1) of Nm
set Ex to "." & Ex
end if
return {Nm, Ex}
end getName_andExtension
on FinderItemExists(thePath)
try
set thePath to thePath as alias
on error
return false
end try
return true
end FinderItemExists -
I need an action/script for image resizing with a "special" attribute
Having a headache, nothing work so far the way I want it...
So here's the deal: I have a bunch of psd files and I need them saved as jpegs in a fixed size - 450x590px.
The filename of the jpeg should be the same as each psd and the images should be resized proportionate.
The psds have irregular sizes, some are tall, some are square, some are wide, etc.
I tried using the place function on a template, but that requires my input - choose what to place, then type the filename.
Any ideas?
Thank you for your input!elmoldovano wrote:
So here's the deal: I have a bunch of psd files and I need them saved as jpegs in a fixed size - 450x590px.
The filename of the jpeg should be the same as each psd and the images should be resized proportionate.
The psds have irregular sizes, some are tall, some are square, some are wide, etc.
I tried using the place function on a template, but that requires my input - choose what to place, then type the filename.
So have both Portrait and Landscape images with varying size. and want to create jpeg from them that are 450x590 pixels in size. Can the have Portrait and Landscape orientations. If they all must be Portraits 450px wide by 590px high your landscape images composition will not fair well. For cropping landscape image to portraits image normally crops away to much image content. Content aware scale may work somewhat better then cropping to portrait the introduced distortion may be acceptable.
If Portrait 450x590px and Landscape 590x450px is an acceptable solution. I would go with a cropping solution for there will be no distortion and centered crop composition are usually acceptable. It can also be done with a two step action used by an image processor script. If you download my crafting action package. It has a plug-in script that can be recorded in an action to set a 45:59 centered aspect ratio selection which you follow with an Image Crop step. You run the Image Processor script have the action make the crop and the Image processor to resize the crop to fit into a 590x590px area.
Crafting Actions Package UPDATED Aug 14, 2012 Changed AspectRatioSelection Plug-in script added Path support.
Contains
Action Actions Palette Tips.txt
Action Creation Guidelines.txt
Action Dealing with Image Size.txt
Action Enhanced via Scripted Photoshop Functions.txt
CraftedActions.atn Sample Action set includes an example Watermarking action
Sample Actions.txt Photoshop CraftedActions set saved as a text file.
12 Scripts for actions
Example
Download -
Conditional Actions Script for PS CS2
This script from Sivaratnam Gunaratnam will perform actions on Photoshop files and can change depending on certain definable conditions encountered in each file.
From his Blog entry:
"This is a tool I scripted for myself that I would like to share with all fellow Photoshopers. It allows you to execute your Actions based on Conditions. No programming needed. Just click and define your conditions.. Some examples of conditions are as follows:
If the image height is greater than its width, do Action X, or else do else Y
If the image format is JPG / PSD / BMP do action...
If the image file size is bigger than 300KB, do action....
if the image IS/IS NOT of RGB, CMYK... etc
if image author is Siva, do action...
if image exif contains Nikon D70s, do action ....
if image name contains "paris", do action...
etc
etc
Please note thatas of this writinghe has only tested it on Windows and PSCS2. However, someone posted a comment to his blog entry stating that it "Seems to work perfectly on a Mac too."
caveat downloador :)
Visit Siva's blog to read more and get the script at the following link:
http://actionlogic.blogspot.com/2006/03/sivas-photoshop-conditional-action.htmlThis script from Sivaratnam Gunaratnam will perform actions on Photoshop files and can change depending on certain definable conditions encountered in each file.
From his Blog entry:
"This is a tool I scripted for myself that I would like to share with all fellow Photoshopers. It allows you to execute your Actions based on Conditions. No programming needed. Just click and define your conditions.. Some examples of conditions are as follows:
If the image height is greater than its width, do Action X, or else do else Y
If the image format is JPG / PSD / BMP do action...
If the image file size is bigger than 300KB, do action....
if the image IS/IS NOT of RGB, CMYK... etc
if image author is Siva, do action...
if image exif contains Nikon D70s, do action ....
if image name contains "paris", do action...
etc
etc
Please note thatas of this writinghe has only tested it on Windows and PSCS2. However, someone posted a comment to his blog entry stating that it "Seems to work perfectly on a Mac too."
caveat downloador :)
Visit Siva's blog to read more and get the script at the following link:
http://actionlogic.blogspot.com/2006/03/sivas-photoshop-conditional-action.html -
What is the action script for "go to next page"?
I'm new to flash and need help with action scripts. What is the code for "go to next page" I'll be using a mouse event.
Thanks!It depends on where the next page is.
-
I created a little 'movie clip' of a continuous animation and
want to make it a button that can be used in dreamweaver. I was
told I would have to link it from flash (as dreamweave can not link
a swf file to a webpage). I was having a problem trying to action
script the movie clip - when I selected the 'movie clip' graphic it
said: Current selection can not have actions applied to it. How
should this be done?
Thanksyou're right - that should work. my first thing that i test
when something like that happens is that every keyframe in the
tween contains exactly the same instance. A common problem is that
the instance name of the clip may be slightly different(eg a space
somewhere) in different keyframes.
Rather than looking for the problem, I usually just clear the
keyframes in the tween and then put them back in. In your case I
cleared the keyframe on frame 12 on layer "see more" and then
inserted keyframe(returning it to color: None) and tested the
movie. The button works fine!
So then i went back to your original movie to try to find
what was inconsistent between the two keyframes in 'see more' and
couldn't find the problem... so anyway, this looks like a situation
where we may not know the reason for the problem but at least we've
found the solution... -
Action script for batch-opening psd layer files flat? (alt+shift?)
hi
i am daily batch processing with an action script to make flat tiffs from psd layer files, like 10-100 files every couple of days in my workflow.
until now i could not fine a solution to begin the batch processing-action with opening layer files FLAT.
the reason is: i am working with huge files, 5-20GB .psb files, (16bit, ECI-RGB, 50x100cm, 300dpi) and it takes a couple of seconds to open with my pcie-SSD.
that multiplies the time it takes to open 50 of such files. i would gain a lot of time, if photoshop cs6 would not open it with layers, but flat.
there is a workaround i am using daily: (osx) hold alt+shift, then click on the layer file in the finder and cs6 opens it flat.
but that did not work in the action script. it doesnt store the keyboard command alt+shift.
any idea how i could save time and use the alt+shift command in the action script or any other solution please?
thanks
peterI just tried to record this using ScriptListener, and it didn't record it either. No indo in the ExtendScript SDK on this either. I don't think that this is possible at this time. Maybe someone who know more than I do can find a way.
-
Projector's "Full Screen" viewing action script for Flash Cs5.5
How do I set a Projector to "Full Screen" viewing on Flash Cs5.5
Knowing that it already has action script.
I have tried to add FSCommands on top, to no avail.stage.displayState="fullScreen";
-
Create an automatic action script for 3d rotate effect
Is it possible to create an action script that automatically applyes the 3d rotate effect with specific settings?
An example would be when I press F2 it rotates the object instantly with my specific settings without ever having to press anything else.ok.
draw yourself a shape, whatever you like. Go to Effect > 3D > Rotate and apply the settings you want.
with your object selected, go to the Graphic Styles palette (Window > Graphic styles) and create new graphic style (either in the palette menu or the little button). Call it something memorable.
draw a new object, again whatever you like. open the Actions palette (Window > Actions). Create new action. Give it a name and assign it to a Function key, then click OK (The action will start recording).
Select your new object, then pick your new Graphic Style from the graphic styles palette. it should apply your 3D settings to the new object.
click on the stop button at the bottom of the Actions palette.
create new object, select it, hit your chosen function key. enjoy. -
Specific action script for url retrieval
I use Clickabilty's cmPublish for ad serving. When creating Flash ads, it requests the following action scipt for clickthrough info:
on (release) {
if (clickTAG.substring(0, 4) == "http") {
getURL (clickTAG, "_blank");
Do I need to replace the clickTag info with the url? What about the substring. (I am new at Flash Ad creation). Any help would be appreciated.Hi there,
the clicktag is made so that publisers don't need to change the fla file all the time. The clicktag is a variable and can be given to the swf by doing example.swf?clicktag=http://www.grafia.fr for example. Normally it should be enough to put the actionscript you mentioned on a big button in the flash ad. The Clickabilty's cmPublish probably uses the example.swf?clicktag=http://www.grafia.fr for serving the ad.
Greetings,
Guido Braak
My Websites: Agence web Bordeaux | La Roue Tourne | TV Soiree -
Action script for making symbol hyperlink to open I'm same window?
on (rollOver) {
getURL("http://www.google.com");
Ok so i have this and it seems to be the consensus on how to do it...
Just open actionscript
and type this
unfortunately
when i click on the symbol (was a jpg that i converted to a button)
and open action window
and try to type that, it tells me i can't do anything to the selection...
Basically I want these moving symbols and symbols that fade in to be mapped to open up to (graphic design, retouching etc... pages of my site)
This is all for a spash page i'm attempting to make -
Hi,
I'm making an interactive world map.
The idea is that the mouse rolls over a country which makes
the country goes red and the countries name appears. I have got
this to work fine, but I am trying to use some script so that when
the mouse clicks down and releases on the country, another screen
appears which is a screen with information about the country (the
original screen needs to disappear - it's not a box of text which
will appear but a whole new screen)
Can anyone advise? I have tried to use a basic 'on release go
to' script but it doesn't work.
Thanks very much.Thanks, I've got this to work now, but when it advances to
the next frame it keeps looping back to the first frame. I've tried
using stop() on the frame I am advancing to, gotoandStop(2) in the
first frame and a few other things I have found in the looping
problem threads on this forum. I'm publishing as a flash movie not
HTML.
Any thoughts? -
Setting timeout settings for Action Scripts
We are using OIM 11gR1 along with the AD and Domino connectors. We are also using Action Scripts to perform some post create actions on the AD and Domino resources that get created by OIM. The action scripts are being invoked with the correct set of parameters and they do their job. However for both connectors, the connector server (Java connector server for Domino, .NET connector server for AD) times out when waiting for the script to complete. Our scripts are expected to take a long time (30+ seconds).
Based on our testing, the AD connector times out in 30 seconds, and the Domino connector times out in 20 seconds. You would get the below exception in your Java Connector Server log file:
Dec 4, 2013 2:36:41 PM org.identityconnectors.framework.api.operations.ScriptOnConnectorApiOp runScriptOnConnector
FINE: Exception:
java.lang.RuntimeException: Timeout waiting for action, process was terminated
at org.identityconnectors.domino.WinJni._executeWinCommand(Native Method)
at org.identityconnectors.domino.WinJni.executeWinCommand(WinJni.java:31)
at org.identityconnectors.domino.ScriptOnConnector.executeCmdScript(ScriptOnConnector.java:143)
at org.identityconnectors.domino.ScriptOnConnector.runScriptOnConnector(ScriptOnConnector.java:88)
at org.identityconnectors.domino.DominoConnector.runScriptOnConnector(DominoConnector.java:316)
Is there any way to configure OIM so that it waits longer for the action script to complete. The real problem over here is that if 2 users are being provisioned to AD and/or Domino simultaneously (we use access policies to trigger provisioning rules), then the connector (Java or .NET) does NOT invoke the action script for the second user if the action script for the first user times out. It does however create AD/Domino resources for all applicable users. This in itself is a defect - but I need a workaround.
Looking at some old Sun Identity Manager documentation (which became Oracle Waveset), it seems that the entire OIM concept of action scripts has its origins in Sun Identity Manager/Oracle Waveset. And these products did support the notion of timeouts. Have a look at :
http://docs.oracle.com/cd/E19225-01/821-0092/bzbuc/index.html
Does anyone familiar with Oracle OIM code know if custom timeouts are supported by AD and Domino connectors?
Thanks
Aspi EngineerChange the time for the below under 'Web Intelligence Processing Server'
Idle Document Timeout (seconds):
Idle Connection Timeout (minutes):
If you still have problem then try changing the web.xml under the following war files,
AdminTools
PartnerPlatformService
PerformanceManagement
PlatformServices -
Help Scripting for PDF Form List Box
I am attempting to write JavaScript for an Adobe Acrobat X Pro form. I would like to set an action script for a List Box titled "customer_name" so that when a specific customer name is selected, a corresponding text box titled "cutomer_number" will automatically fill with the correct number. I am not very familiar with JavaScript so any help would be greatly appreciated.
The easiest way to do this is to set the export value of each list box item to the corresponding customer number. The script for the custom number field could then simply be:
// Set this field's value to the export value of the selected item in the list box
event.value = getField("customer_name").valueAsString;
Post again if you don't want to set up the list box that way for some reason since there are other ways to deal with this.
Maybe you are looking for
-
Problems installing Bootcamp on my Macbook Pro i7
Hi, I ran the Bootcamp installation program, and then restarted my Macbook Pro Core i7, and was presented with three choices - 1. Mac OS X, 2. Windows, 3. EFI Bios. Choice 2 crashes, choice 3 runs the Windows installer, shows the progress bar, goes u
-
Bex selection screen does not appear when running workbook via RRMX.
Hi Experts, I have following problem: When I run a BEx workbook from a user menu (trans. RRMX), I get no selection screen, but just the workbook with text: "no data found". When I press the refresh button (variable change button), the selection scree
-
Get column names into a VB program, for an SQL query that joins tables
use [mydatabase] select * from InvNum inum left join _btblInvoiceLines ilin on inum.autoindex = ilin.iinvoiceid left join stkitem s on ilin.istockcodeid = s.stocklink where InvNumber = 'IVQ0834' or InvNumber = 'IVQ0835' I need to get out the column n
-
Stuck Dell PowerEdge 2550 not REALLY supported?
Hi all, I've been trying to get Solaris 8 installed on a Dell PowerEdge 2550 I just got in, and I'm not having any luck. This is unfortunate, as its my one sole server for a small biz I'm trying to get going. Sigh. Anyway, the problem is that after b
-
CUPC 7.1 crashes when user tries to IM
This client has been up and working fine for weeks and suddenly today this problem popped up. She can receive IM's all day long, but if she replies to even one of them it crashes. The logs dont seem to indicate anything, at least that I see. Here is