Action Script Help Please

I am trying to figure out the proper verbage for this. If I
want to have a button gotoAndPlay "home" but then immediately
after, without stopping, gotoAndPlay something else, What is the
code for that?
I.E.:
on (press) {
gotoAndPlay ("home");
[what do I put in next to make it go play something else
without pausing?]
Text
Text

You need to see that task with different eyes, as soon as the
script reaches the gotoandplay line, the playhead will jump
instantly to that location and you need to write the next jump on
that home frame.
Why don't you rather set a variable saying where it should go
after home like:
on(press){
gotoAndPlay("home");
var nextGoTo = xxx;
and on your home frame you have an case statement runnning
checking which variable you activated so it will jump directly to
it.
If you don't undestand what I mean with it, you can send me
the fla file and I will show you how to create it.

Similar Messages

  • Parent/Action Script advise, please

    Hello
    I am posting to ask for some advice. I have Flash MX 2004.
    I have a series of thumbnails (Movie Clips) which seem to be
    arranged over two layers (layers 1 and 2). Layer 1 holds each
    individual thumbnail (movie clip) in several keyframes, so that
    with Layer 1 highlighted, when I click on frame 1 I can see
    thumbnail no. 1 on the stage, when I click on frame 2 I see only
    thumbnail 2 on the stage, when I click on frame 3 I see only
    thumbnail 3 on the stage, etc.
    I see no Action Script when I click through the frames:
    Layer 2, however, does appear to hold Action Script. Please
    see here:
    http://www11.brinkster.com/stevehigham/parent.html
    When I click on Layer 2 frame 1 I can see Action Script for
    the first thumnail:
    gotoAndStop(_parent._name);
    When I click on frame 2 I can see my second thumbnail, but
    the same script:
    gotoAndStop(_parent._name);
    When I click on frame 3 I can see my third thumbnail, but
    again the same script:
    gotoAndStop(_parent._name);
    I am trying to get my limited cognitive ability to grasp how
    the file works (I bought it as a template) so that I can change it.
    I wish to ask two questions. Does the gotoAndStop(_parent._name);
    mean that every time I click on thumbnail 1 I go to this file:
    --> _parent._name?
    And does it mean that every time I click on thumbnail 2 I
    also go to this file: --> _parent._name? Does it also mean that
    every time I click on thumbnail 3 I go to the same file: -->
    _parent._name?
    When I go to Ctrl + Enter and click on the thumnails
    (regardless of which one it is), I am always taken to the same
    place. Is it this script, the _parent._name that takes me there? If
    so, my second question concerns how can I change it - what is it in
    the script that I need to change - so that each thumbnail takes me
    to a different place?
    Many thanks for reading such a long message!
    Steve

    Hello kglad
    Thank you for your message.
    In relation to your comment:
    'you need to label your frame and you probably are supposed
    to load that swf into another swf'.
    How do I do that? If I create something new on my stage in a
    new layer in the first frame how to I change the Action Script so
    that when the thumbnail is clicked, I go to that particular frame
    in that particular layer?
    Thank you for your help.
    Steve
    Text

  • Gallery script help, please

    Gallery script help, please
    Hello,
    I'm new to actionscript in general, I do know a little...
    I foung a gallery script, modified many things, the images
    open fine, everything is working, but here's the thing:
    the gallery is in 3 sections, red, blue and yellow.
    I would like to know how, what, and where to put a script so
    that if a "the small red image #1" is clicked, I can load any sort
    of a movie on top of the "the BIG red image #1" or #2 or 3 and so
    on...same goes for the blue and yellow...
    If I figured things correctly on my own...the small thumbnail
    images of the gallery are not buttons, that's why I can't attach a
    movie (let's say) to them...but it is all written in script, using
    the horizontal and vertical position of the mouse to open the large
    images of the gallery...
    So, I don't know how to figure things out, to attach a
    specific movie to a specific thumbnail...
    p.s.: I think the script that controls the gallery is in
    symbol 120
    I really would appreciate the help
    Merry Christmas in advance to everyone
    Sandra
    here are all the files...
    http://www.gentro.ca/sandra_test.zip

    There's a great tutorial on kirupa...
    click
    here for link

  • Flv xml Stream Playlist action script help

    So if you go to this site:
    click here
    you will see a FLV player that has a list of videos that are
    pulled from a .xml file...
    The action script for this player is as such:
    var nc:NetConnection = new NetConnection();
    nc.connect(null);
    var ns:NetStream = new NetStream(nc);
    theVideo.attachVideo(ns);
    rewindButton.onRelease = function() {
    ns.seek(0);
    playButton.onRelease = function() {
    ns.pause();
    var videoInterval = setInterval(videoStatus,100);
    var amountLoaded:Number;
    var duration:Number;
    ns["onMetaData"] = function(obj) {
    duration = obj.duration;
    function videoStatus() {
    amountLoaded = ns.bytesLoaded / ns.bytesTotal;
    loader.loadBar._width = amountLoaded * 194.5;
    loader.scrub._x = ns.time / duration * 194.5;
    var vlist:XML = new XML();
    vlist.ignoreWhite = true;
    vlist.onLoad = function() {
    var videos:Array = this.firstChild.childNodes;
    for(i=0;i<videos.length;i++) {
    videoList.addItem(videos
    .attributes.desc,videos.attributes.url);
    ns.play(videoList.getItemAt(0).data);
    videoList.selectedIndex = 0;
    var vidList:Object = new Object();
    vidList.change = function() {
    ns.play(videoList.getItemAt(videoList.selectedIndex).data);
    videoList.addEventListener("change",vidList);
    vlist.load("videos.xml");
    I want to action script something that will make the videos
    play one after the other, get rid of the list on the right and have
    buttons on player that allow you to go to the next/previous video
    listed in the .xml file
    Its sort of like the player at
    click
    here
    I know this is a lot to ask, but I am currently in a jam and
    any help would be greatly appreciated...
    Thanks
    Matthelm88

    gotoAndLearn is a fantastic base to build off of.
    but
    i'm looking for the same thing... how do you get the files
    to play one after another?
    i've looked for everyhting ns. related and i can find any
    doc's on this one.
    i 've found the
    function complete_listener(eventObject:VideoEvent):void {
    if (my_FLVPlybk.source == "rentv1.flv") {
    my_FLVPlybk.play("rentv2.flv");
    else if (my_FLVPlybk.source == "rentv2.flv") {
    my_FLVPlybk.play("rentv3.flv");
    on the flash video live docs.. but i can't find anything on
    how to tie it into the XML.
    anything anyone can offer would be a huge help ...

  • Action Script Help (Flash 8 ONLY)

    My department currently has a host of training videos we use
    for online courses. Of course, these are all being delivered as
    FLVs. Through the Developer's communities, I found a script that
    allowed me to add a caption file to the video (XML).
    Now I'd like to take it to another level. I'd like to be able
    to have my one SWF player play a series of FLVs AND include the
    caption file. I began to look at using an Array, but have not been
    successful in making it work. I'm not too sure, but I think the way
    I coded it started to affect the video - started getting "stuck" at
    times. Another attempt caused the caption file from the previous to
    be seen in the current video.
    I have attached my script and would appreciate any
    assistance.
    Finally, I need to stick to a Flash 8 and Action Script 2.0
    solution. I realize that Flash 9 and Action Script 3.0 would be
    helpful, but our district PCs are all imaged with a Flash 8 player.
    Sorry.
    Thank you for your help.
    Frank Erazo ([email protected])

    Whatever approach you take will depend heavily on the document(s) you have for the bible element of the design.  You somehow need to be able to seek within it and determine where matched elements can be found and how to extract the information you intend to present.
    I don't think your issue currently lies with how to do this in Flash as much as first coming up with a gameplan that identifies the players and how you can interact with and within them.

  • XML Action Script Help

    Im taking over a job and I was given the original flash file
    that doesnt seem to be working properly.
    It a thumbnail menu that loads through xml...the images work
    fine but the Links & Titles do not load.
    Nor does the rollover effect. Here what I have.
    Action Script:
    Stage.align = "TL";
    Stage.scaleMode = "noscale";
    preloader._visible = true;
    thumbs_line._visible = false;
    import mx.transitions.Tween;
    import mx.transitions.easing.*;
    my_xml = new XML();
    my_xml.ignoreWhite = true;
    if (_parent.xml_file == undefined) {
    my_xml.load((String(_url.slice(0, (_url.length-3))))+"xml");
    } else {
    my_xml.load(_parent.xml_file);
    my_xml.onLoad = function(ok) {
    if (ok) {
    process_xml();
    } else {
    trace("XML not loaded");
    function process_xml() {
    total_images = my_xml.childNodes[1].childNodes.length-1;
    gallery_width =
    Number(my_xml.childNodes[0].childNodes[0].attributes.gallery_width);
    gallery_height =
    Number(my_xml.childNodes[0].childNodes[0].attributes.gallery_height);
    max_thumb_height =
    Number(my_xml.childNodes[0].childNodes[0].attributes.max_thumb_height);
    thumbs_space =
    Number(my_xml.childNodes[0].childNodes[1].attributes.thumbs_space);
    thumb_border =
    Number(my_xml.childNodes[0].childNodes[1].attributes.thumb_border);
    image_border =
    Number(my_xml.childNodes[0].childNodes[1].attributes.image_border);
    fade_in_seconds =
    Number(my_xml.childNodes[0].childNodes[2].attributes.fade_in_seconds);
    fade_out_seconds =
    Number(my_xml.childNodes[0].childNodes[2].attributes.fade_out_seconds);
    thumb_fade_seconds =
    Number(my_xml.childNodes[0].childNodes[2].attributes.thumb_fade_seconds);
    fade_in_seconds += 0.01;
    fade_out_seconds += 0.01;
    thumb_fade_seconds += 0.01;
    thumbs_line._y =
    gallery_height-max_thumb_height-(4*thumbs_space);
    thumbs_line.thumbs_bg._width = gallery_width;
    thumbs_line.thumbs_mask._width = gallery_width;
    thumbs_line.thumbs_bg._height =
    max_thumb_height+thumbs_space*2+thumb_border*2;
    thumbs_line.thumbs_mask._height =
    max_thumb_height+thumbs_space*2+thumb_border*2;
    thumbs_line._visible = true;
    load_thumb(0);
    preloader._x = int((gallery_width-preloader._width)/2);
    preloader._y = int(thumbs_line._y/2-preloader._height/2);
    max_image_height =
    gallery_height-max_thumb_height-thumbs_space*6;
    load_image(0);
    this["link"+t] =
    my_xml.childNodes[1].childNodes[t].attributes.link;
    function load_thumb(t) {
    thumbs_line.thumbs.createEmptyMovieClip('thumb'+t,
    thumbs_line.thumbs.getNextHighestDepth());
    thumbs_line.thumbs['thumb'+t]._y =
    thumbs_space+thumb_border;
    thumbs_line.thumbs['thumb'+t]._x =
    thumbs_space+thumb_border;
    if (t>0) {
    thumbs_line.thumbs['thumb'+t]._x =
    thumbs_line.thumbs['thumb'+(t-1)]._x+thumbs_line.thumbs['thumb'+(t-1)]._width+thumbs_spac e;
    thumbs_line.thumbs['thumb'+t].image_number = t;
    thumbs_line.thumbs['thumb'+t].onRollOver =
    thumbs_line.thumbs['thumb'+t].attachMovie("thumbov_mc",
    "thumbov_mc", 10);
    thumbs_line.thumbs['thumb'+t].onRelease = function() {
    tellTarget (thumbs_line.thumbs['thumb'+t]) {
    var loadListener:Object = new Object();
    loadListener.onLoadInit = function(target_mc:MovieClip) {
    preloader.visible = false;
    thumbs_line.thumbs['thumb'+t].attachMovie("border_grey",
    "border_grey", 10);
    thumbs_line.thumbs['thumb'+t].border_grey._x -=
    thumb_border;
    thumbs_line.thumbs['thumb'+t].border_grey._y -=
    thumb_border;
    thumbs_line.thumbs['thumb'+t].attachMovie("border_white",
    "border_white", 20);
    thumbs_line.thumbs['thumb'+t].border_white._x -=
    thumb_border-1;
    thumbs_line.thumbs['thumb'+t].border_white._y -=
    thumb_border-1;
    if (target_mc._height>max_thumb_height) {
    ratio = target_mc._width/target_mc._height;
    target_mc._height = max_thumb_height;
    target_mc._width = int(target_mc._height*ratio);
    thumbs_line.thumbs['thumb'+t].border_grey._width =
    target_mc._width+thumb_border*2;
    thumbs_line.thumbs['thumb'+t].border_grey._height =
    target_mc._height+thumb_border*2;
    thumbs_line.thumbs['thumb'+t].border_white._width =
    target_mc._width+thumb_border*2-2;
    thumbs_line.thumbs['thumb'+t].border_white._height =
    target_mc._height+thumb_border*2-2;
    if (t<total_images) {
    t++;
    load_thumb(t);
    thumbs_width = thumbs_line.thumbs._width;
    thumbs_right_limit = 0;
    thumbs_left_limit =
    0-thumbs_width+int(gallery_width-thumbs_space-thumbs_space);
    var thumb_fade_in:Tween = new Tween(target_mc, "_alpha",
    none.easeIn, 0, 100, thumb_fade_seconds, true);
    var thumb_loader:MovieClipLoader = new MovieClipLoader();
    thumb_loader.addListener(loadListener);
    createEmptyMovieClip("img", 30);
    thumb_loader.loadClip(this.my_xml.childNodes[1].childNodes[t].attributes.small,
    img);
    thumbs_line.onMouseMove = function() {
    if (_xmouse>=thumbs_line.thumbs_bg._x and
    _xmouse<=thumbs_line.thumbs_bg._width and
    _ymouse>=thumbs_line._y and
    _ymouse<=thumbs_line._y+thumbs_line._height) {
    onRollOver =
    thumbs_line.thumbs['thumb'+t].attachMovie("thumbov_mc",
    "thumbov_mc", 10);
    onEnterFrame = function () {
    if (_xmouse<(gallery_width/2)-10 and
    thumbs_line.thumbs._x<thumbs_right_limit) {
    thumbs_line.thumbs._x -=
    int((_xmouse-thumbs_line.thumbs_bg._width/2)/(100-scroll_speed));
    if (thumbs_line.thumbs._x>thumbs_right_limit) {
    thumbs_line.thumbs._x = thumbs_right_limit;
    if (_xmouse>gallery_width/2+10 and
    thumbs_line.thumbs._x>thumbs_left_limit) {
    thumbs_line.thumbs._x -=
    int((_xmouse-thumbs_line.thumbs_bg._width/2)/(100-scroll_speed));
    if (thumbs_line.thumbs._x<thumbs_left_limit) {
    thumbs_line.thumbs._x = thumbs_left_limit;
    } else {
    onEnterFrame = undefined;
    this["link"+t] =
    my_xml.childNodes[1].childNodes[t].attributes.link;
    this["the_target"+t] =
    my_xml.childNodes[1].childNodes[t].attributes.target;
    XML File
    <?xml version="1.0" encoding= "UTF-8" ?>
    <options>
    <option gallery_width="730" gallery_height="450"
    max_thumb_height="96"/>
    <option scroll_speed="75" thumbs_space="0"
    thumb_border="1" image_border="2"/>
    <option fade_in_seconds="1.5"
    thumb_fade_seconds="1.5"/>
    </options>
    <gallery>
    <img small="../flash/hosts/images/pic7.jpg" title="Name
    1" link="hosts.asp"/>
    <img small="../flash/hosts/images/pic1.jpg" title="Name
    2" link="bio1.asp"/>
    <img small="../flash/hosts/images/pic2.jpg" title="Name
    3" link="bio2.asp"/>
    <img small="../flash/hosts/images/pic3.jpg" title="Name
    4" link="bio3.asp"/>
    <img small="../flash/hosts/images/pic5.jpg" title="Name
    5" link="bio4.asp"/>
    <img small="../flash/hosts/images/pic6.jpg" title="Name
    6" link="bio5.asp"/>
    <img small="../flash/hosts/images/pic8.jpg" title="Name
    7" link="bio6.asp"/>
    <img small="../flash/hosts/images/pic9.jpg" title="Name
    8" link="bio7.asp"/>
    </gallery>
    Thier is a dynamic Text field in the roll over effect that
    should contain the "title"
    the rollover MC name is: thumbov_mc
    the dynamic text field is labeled: title
    And the links are not working either?
    Does anyone see the problem?
    Thank You So Much for you help in Advance

    If you think you can help just let me now and ill email you
    the link to where this menu is...i dont want to post it for
    everyone to see..thanks

  • Firefox not responding, freezes, sometimes responds after a few minutes, other times a pop-up appears asking if I want to stop script - help please

    firefox not responding, freezes, sometimes responds after a few minutes, other times a pop-up appears asking if I want to stop script - help please

    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]
    * [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    * Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    * Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")

  • Action script..PLEASE HELP..

    ...hello guys...i really dont know what to do...i have a drop
    down menu here..it is an xml driven menus...and i want to put a
    scroll bar in the submenus....so even if the submenus will be to
    many..it will not go across the movie....PLEASE HELP.. i am really
    new in actionscripting and i dont have any programming
    backgrown...hope for your response...this a vertical dropdown
    menus....

    The link in your message is also broken.

  • Auto refresh with apple script- help please

    can any one help me please
    i use multiple windows in safari at one time and can any one help me to refresh these pages (two windows) automatically using apple script.
    also if I click manually to refresh these pages i get the following note"
    "To open this page again, Safari must resend the form you completed to open the page the first time. This may cause the website to repeat actions it took the first time you sent the form."
    and i have click send for this to happen
    any help from you all will be appreciated as this will help me a lot with the present work that i am doing

    Not sure about the "automatic" reload - Opera allows you to set a refresh time interval for each tab, but not Safari. Also, Safari Extender gives you a single click contextual menu option to "reload all tabs".
    here is an AppleScript for a one-page auto reload. You might be able to alter the script to auto reload all open tabs.
    Not sure about the "warning" message. Can you post a URL so I can have a look?

  • Wmii/dash scripting help please

    So heres the thing, I pretty much suck at scripting .
    I get by in tiling wm's simply by observing, modifying, and eventually learning through trial and error.
    So Ive been playing around with wmii lately and Ive hacked up my wmiirc to do what I want as best I can with what limited knowledge I have, but I need more.
    First problem, Im trying to make wmii have custom tag titles while still using alt + 0-9 instead of using alt + t and typing the title every time.
    heres what I did to achieve this
    # for i in 0 1 2 3 4 5 6 7 8 9; do
    # cat <<!
    #Key $MODKEY-$i # Move to the numbered view
    # wmiir xwrite /ctl view "$i"
    #Key $MODKEY-Shift-$i # Retag selected client with the numbered tag
    # wmiir xwrite /client/sel/tags "$i"
    # done
    Key $MODKEY-1
    wmiir xwrite /ctl view "web"
    Key $MODKEY-Shift-1
    wmiir xwrite /client/sel/tags "web"
    Key $MODKEY-2
    wmiir xwrite /ctl view "ctrl"
    Key $MODKEY-Shift-2
    wmiir xwrite /client/sel/tags "ctrl"
    Key $MODKEY-3
    wmiir xwrite /ctl view "stat"
    Key $MODKEY-Shift-3
    wmiir xwrite /client/sel/tags "stat"
    Key $MODKEY-4
    wmiir xwrite /ctl view "msg"
    Key $MODKEY-Shift-4
    wmiir xwrite /client/sel/tags "msg"
    Key $MODKEY-5
    wmiir xwrite /ctl view "img"
    Key $MODKEY-Shift-5
    wmiir xwrite /client/sel/tags "img"
    Key $MODKEY-6
    wmiir xwrite /ctl view "vid"
    Key $MODKEY-Shift-6
    wmiir xwrite /client/sel/tags "vid"
    Key $MODKEY-7
    wmiir xwrite /ctl view "misc"
    Key $MODKEY-Shift-7
    wmiir xwrite /client/sel/tags "misc"
    Key $MODKEY-8
    wmiir xwrite /ctl view "misc1"
    Key $MODKEY-Shift-8
    wmiir xwrite /client/sel/tags "misc1"
    Key $MODKEY-9
    wmiir xwrite /ctl view "misc2"
    Key $MODKEY-Shift-9
    wmiir xwrite /client/sel/tags "misc2"
    Key $MODKEY-0
    wmiir xwrite /ctl view "misc3"
    Key $MODKEY-Shift-0
    wmiir xwrite /client/sel/tags "misc3"
    Now this does work, but the problem is that now tags are listed on the tag bar alphabetically rather then numerically like I intended. Example alt + 1 (which is now web) actually ends up being the last tag in the list rather then the first because web starts with w.
    I.E [crtl][msg][stat][web] instead of [web][ctrl][stat][msg] like I intended.
    So I guess the question is how can I fix this so theyre listed in accordance with the key thats pressed rather then alphabetically? Is this possible in wmii?
    Also I dont want to change the keys (i.e. make web 9 instead of 1 so its last on the keyboard too). I like the web=1,ctr=2l,stat=3,msg=4 layout that I chose in my config, I just dont like how theyre out of order on the bar.
    Next problem, I want to autostart specific applications on specific tags and in a specific arrangement.
    heres what I did to achieve this
    # Autostart (this is ghetto, I know)
    echo -n view ctrl | wmiir write /ctl;urxvtc -e ssh 192.168.1.55 -p 228 &
    urxvtc -e ssh [email protected] -p 228 &
    sleep 1.5 && urxvtc &
    sleep 2 && wmiir xwrite /tag/sel/ctl send sel right &
    sleep 2.5 && echo -n view stat | wmiir write /ctl;urxvtc -e vifm &
    sleep 2.5 && urxvtc -e alsamixer &
    sleep 3 && urxvtc -e htop &
    sleep 3.5 && wmiir xwrite /tag/sel/ctl send sel left &
    sleep 4 && echo -n view msg | wmiir write /ctl;pidgin &
    sleep 3.5 && echo -n view web | wmiir write /ctl;wmiir xwrite /tag/sel/ctl colmode sel stack;uzbl-browser &
    This also works, but it seems a bit too hackish if you ask me. It also takes a while to go through the tags and open things one at a time like this. Surely there must be a way to achieve the same results without all the sleep and manual client placement commands. Im looking for a way to open everything simultaneously and have it go directly where its supposed to.
    So what would be the better way to do this?
    And lastly heres the complete wmiirc for reference. If anybody has any tips or suggestions about anything please share.
    #!/bin/dash -f
    # Configure wmii
    wmiiscript=wmiirc # For wmii.sh
    . wmii.sh
    # Configuration Variables
    MODKEY=Mod1
    UP=k
    DOWN=j
    LEFT=h
    RIGHT=l
    # Bars
    noticetimeout=5
    noticebar=/rbar/!notice
    # Colors tuples: "<text> <background> <border>"
    export WMII_NORMCOLORS='#a7a15e #262626 #3e3e3e'
    export WMII_FOCUSCOLORS='#262626 #a7a15e #3e3e3e'
    export WMII_BACKGROUND='#262626'
    set -- $(echo $WMII_NORMCOLORS $WMII_FOCUSCOLORS)
    # Font
    export WMII_FONT='xft:Terminus-8'
    #export WMII_FONT='-dec-terminal-bold-*-*-*-*-*-*-*-*-*-*-*'
    # Terminal
    export WMII_TERM="urxvtc"
    # Menu history
    hist="${WMII_CONFPATH%%:*}/history"
    histnum=5000
    # Column Rules
    wmiir write /colrules <<!
    /.*/ -> 58+42
    # /.*/ -> 62+38 # Golden Ratio
    # Tagging Rules
    wmiir write /rules <<!
    # Apps with system tray icons like to their main windows
    # Give them permission.
    #/^Pidgin:/ allow=+activate
    # Float Apps
    /MPlayer/ floating=on
    /feh/ floating=on
    /gimp/ floating=on
    /^Pidgin:/ floating=on
    # ROX puts all of its windows in the same group, so they open
    # with the same tags. Disable grouping for ROX Filer.
    #/^ROX-Filer:/ group=0
    # Status Bar Info
    status() {
    echo -n $(uptime | sed 's/.*://; s/,//g') '|' $(date +%a' '%b' '%d' '%r)
    # Generic overridable startup details
    startup() { witray & }
    local_events() { true;}
    wi_runconf -s wmiirc_local
    startup
    echo $WMII_NORMCOLORS | wmiir create $noticebar
    # Event processing
    events() {
    cat <<'!'
    # Events
    Event CreateTag
    echo "$WMII_NORMCOLORS" "$@" | wmiir create "/lbar/$@"
    Event DestroyTag
    wmiir remove "/lbar/$@"
    Event FocusTag
    wmiir xwrite "/lbar/$@" "$WMII_FOCUSCOLORS" "$@"
    Event UnfocusTag
    wmiir xwrite "/lbar/$@" "$WMII_NORMCOLORS" "$@"
    Event UrgentTag
    shift
    wmiir xwrite "/lbar/$@" "*$@"
    Event NotUrgentTag
    shift
    wmiir xwrite "/lbar/$@" "$@"
    Event LeftBarClick LeftBarDND
    shift
    wmiir xwrite /ctl view "$@"
    Event Unresponsive
    client=$1; shift
    msg="The following client is not responding. What would you like to do?$wi_newline"
    resp=$(wihack -transient $client \
    xmessage -nearmouse -buttons Kill,Wait -print \
    -fn "${WMII_FONT%%,*}" "$msg $(wmiir read /client/sel/label)")
    if [ "$resp" = Kill ]; then
    wmiir xwrite /client/$client/ctl slay &
    fi
    Event Notice
    wmiir xwrite $noticebar $wi_arg
    kill $xpid 2>/dev/null # Let's hope this isn't reused...
    { sleep $noticetimeout; wmiir xwrite $noticebar ' '; }&
    xpid = $!
    # Menus
    Menu Client-3-Delete
    wmiir xwrite /client/$1/ctl kill
    Menu Client-3-Kill
    wmiir xwrite /client/$1/ctl slay
    Menu Client-3-Fullscreen
    wmiir xwrite /client/$1/ctl Fullscreen on
    Event ClientMouseDown
    wi_fnmenu Client $2 $1 &
    Menu LBar-3-Delete
    tag=$1; clients=$(wmiir read "/tag/$tag/index" | awk '/[^#]/{print $2}')
    for c in $clients; do
    if [ "$tag" = "$(wmiir read /client/$c/tags)" ]; then
    wmiir xwrite /client/$c/ctl kill
    else
    wmiir xwrite /client/$c/tags -$tag
    fi
    if [ "$tag" = "$(wi_seltag)" ]; then
    newtag=$(wi_tags | awk -v't='$tag '
    $1 == t { if(!l) getline l
    print l
    exit }
    { l = $0 }')
    wmiir xwrite /ctl view $newtag
    fi
    done
    Event LeftBarMouseDown
    wi_fnmenu LBar "$@" &
    # Actions
    Action showkeys
    echo "$KeysHelp" | xmessage -file - -fn ${WMII_FONT%%,*}
    Action quit
    wmiir xwrite /ctl quit
    Action exec
    wmiir xwrite /ctl exec "$@"
    Action rehash
    wi_proglist $PATH >$progsfile
    Action status
    set +xv
    if wmiir remove /rbar/status 2>/dev/null; then
    sleep 2
    fi
    echo "$WMII_NORMCOLORS" | wmiir create /rbar/status
    while status | wmiir write /rbar/status; do
    sleep 1
    done
    # Key Bindings
    KeyGroup Moving around
    Key $MODKEY-$LEFT # Select the client to the left
    wmiir xwrite /tag/sel/ctl select left
    Key $MODKEY-$RIGHT # Select the client to the right
    wmiir xwrite /tag/sel/ctl select right
    Key $MODKEY-$UP # Select the client above
    wmiir xwrite /tag/sel/ctl select up
    Key $MODKEY-$DOWN # Select the client below
    wmiir xwrite /tag/sel/ctl select down
    Key $MODKEY-space # Toggle between floating and managed layers
    wmiir xwrite /tag/sel/ctl select toggle
    KeyGroup Moving through stacks
    Key $MODKEY-Control-$UP # Select the stack above
    wmiir xwrite /tag/sel/ctl select up stack
    Key $MODKEY-Control-$DOWN # Select the stack below
    wmiir xwrite /tag/sel/ctl select down stack
    KeyGroup Moving clients around
    Key $MODKEY-Shift-$LEFT # Move selected client to the left
    wmiir xwrite /tag/sel/ctl send sel left
    Key $MODKEY-Shift-$RIGHT # Move selected client to the right
    wmiir xwrite /tag/sel/ctl send sel right
    Key $MODKEY-Shift-$UP # Move selected client up
    wmiir xwrite /tag/sel/ctl send sel up
    Key $MODKEY-Shift-$DOWN # Move selected client down
    wmiir xwrite /tag/sel/ctl send sel down
    Key $MODKEY-Shift-space # Toggle selected client between floating and managed layers
    wmiir xwrite /tag/sel/ctl send sel toggle
    KeyGroup Client actions
    Key $MODKEY-f # Toggle selected client's fullsceen state
    wmiir xwrite /client/sel/ctl Fullscreen toggle
    Key $MODKEY-Shift-c # Close client
    wmiir xwrite /client/sel/ctl kill
    KeyGroup Changing column modes
    Key $MODKEY-d # Set column to default mode
    wmiir xwrite /tag/sel/ctl colmode sel default-max
    Key $MODKEY-s # Set column to stack mode
    wmiir xwrite /tag/sel/ctl colmode sel stack-max
    Key $MODKEY-m # Set column to max mode
    wmiir xwrite /tag/sel/ctl colmode sel stack+max
    KeyGroup Running programs
    Key $MODKEY-a # Open wmii actions menu
    action $(wi_actions | wimenu -h "${hist}.actions" -n $histnum) &
    Key $MODKEY-p # Open program menu
    eval wmiir setsid "$(wimenu -h "${hist}.progs" -n $histnum <$progsfile)" &
    Key $MODKEY-Return # Launch a terminal
    eval wmiir setsid $WMII_TERM &
    KeyGroup Other
    Key $MODKEY-Control-t # Toggle all other key bindings
    case $(wmiir read /keys | wc -l | tr -d ' \t\n') in
    0|1)
    echo -n "$Keys" | wmiir write /keys
    wmiir xwrite /ctl grabmod $MODKEY;;
    wmiir xwrite /keys $MODKEY-Control-t
    wmiir xwrite /ctl grabmod Mod3;;
    esac
    KeyGroup Tag actions
    Key $MODKEY-t # Change to another tag
    wmiir xwrite /ctl view $(wi_tags | wimenu -h "${hist}.tags" -n 50) &
    Key $MODKEY-Shift-t # Retag the selected client
    # Assumes left-to-right order of evaluation
    wmiir xwrite /client/$(wi_selclient)/tags $(wi_tags | wimenu -h "${hist}.tags" -n 50) &
    # for i in 0 1 2 3 4 5 6 7 8 9; do
    # cat <<!
    #Key $MODKEY-$i # Move to the numbered view
    # wmiir xwrite /ctl view "$i"
    #Key $MODKEY-Shift-$i # Retag selected client with the numbered tag
    # wmiir xwrite /client/sel/tags "$i"
    # done
    Key $MODKEY-1
    wmiir xwrite /ctl view "web"
    Key $MODKEY-Shift-1
    wmiir xwrite /client/sel/tags "web"
    Key $MODKEY-2
    wmiir xwrite /ctl view "ctrl"
    Key $MODKEY-Shift-2
    wmiir xwrite /client/sel/tags "ctrl"
    Key $MODKEY-3
    wmiir xwrite /ctl view "stat"
    Key $MODKEY-Shift-3
    wmiir xwrite /client/sel/tags "stat"
    Key $MODKEY-4
    wmiir xwrite /ctl view "msg"
    Key $MODKEY-Shift-4
    wmiir xwrite /client/sel/tags "msg"
    Key $MODKEY-5
    wmiir xwrite /ctl view "img"
    Key $MODKEY-Shift-5
    wmiir xwrite /client/sel/tags "img"
    Key $MODKEY-6
    wmiir xwrite /ctl view "vid"
    Key $MODKEY-Shift-6
    wmiir xwrite /client/sel/tags "vid"
    Key $MODKEY-7
    wmiir xwrite /ctl view "misc"
    Key $MODKEY-Shift-7
    wmiir xwrite /client/sel/tags "misc"
    Key $MODKEY-8
    wmiir xwrite /ctl view "misc1"
    Key $MODKEY-Shift-8
    wmiir xwrite /client/sel/tags "misc1"
    Key $MODKEY-9
    wmiir xwrite /ctl view "misc2"
    Key $MODKEY-Shift-9
    wmiir xwrite /client/sel/tags "misc2"
    Key $MODKEY-0
    wmiir xwrite /ctl view "misc3"
    Key $MODKEY-Shift-0
    wmiir xwrite /client/sel/tags "misc3"
    wi_events events local_events
    # WM Configuration
    wmiir write /ctl <<!
    font $WMII_FONT
    focuscolors $WMII_FOCUSCOLORS
    normcolors $WMII_NORMCOLORS
    grabmod $MODKEY
    border 1
    # Misc
    progsfile="$(wmiir namespace)/.proglist"
    action status &
    wi_proglist $PATH >$progsfile &
    wmiir xwrite /ctl "colmode default"
    xsetroot -solid "$WMII_BACKGROUND" &
    # Autostart (this is ghetto, i know)
    echo -n view ctrl | wmiir write /ctl;urxvtc -e ssh 192.168.1.55 -p 228 &
    urxvtc -e ssh [email protected] -p 228 &
    sleep 1.5 && urxvtc &
    sleep 2 && wmiir xwrite /tag/sel/ctl send sel right &
    sleep 2.5 && echo -n view stat | wmiir write /ctl;urxvtc -e vifm &
    sleep 2.5 && urxvtc -e alsamixer &
    sleep 3 && urxvtc -e htop &
    sleep 3.5 && wmiir xwrite /tag/sel/ctl send sel left &
    sleep 4 && echo -n view msg | wmiir write /ctl;pidgin &
    sleep 3.5 && echo -n view web | wmiir write /ctl;wmiir xwrite /tag/sel/ctl colmode sel stack;uzbl-browser &
    # Setup Tag Bar
    IFS="$wi_newline"
    wmiir rm $(wmiir ls -p /lbar) >/dev/null
    seltag=$(wmiir read /tag/sel/ctl | sed 1q)
    unset IFS
    wi_tags | while read tag
    do
    if [ "$tag" = "$seltag" ]; then
    echo "$WMII_FOCUSCOLORS" "$tag"
    else
    echo "$WMII_NORMCOLORS" "$tag"
    fi | wmiir create "/lbar/$tag"
    done
    wi_eventloop
    Also I should mention this is wmii-hg. I like hg better then 3.9 because in 3.9 the columns are all screwed up.
    I.E I like fixed column sizes where the right column is always smaller then the left no matter which side you move the client to. (difficult to explain)
    Last edited by tjwoosta (2010-07-01 03:23:06)

    Mike,
    You were close. Split returns an array, not a string.
    // form1.page1.subform1.foo::exit - (JavaScript, client)
    var wordCnt = new Array();
    var str = this.rawValue;
    wordCnt = str.split(" ");
    xfa.host.messageBox("There are " + wordCnt.length + " words.");
    Steve

  • Simple focus magic script help please

    Dipping my toes for the first time - more code to learn - brain hurting.
    I've recorded a very simple script to run a basic sharpening step in focus magic before creating web galleries.   It works except it asks for a decision in focus magic which is a pain running 40-70 pictures through (200 in show jump season).
    the desired aim is each photo to be "out of focus" sharpening at 1 pixel @ 100% and what I have is as follows.  I think there may be a yes/no return step I want rid of and I'm hoping sorting this out will be a good first step in learning.  Thanks for any help
    REM =======================================================
    DIM objApp
    SET objApp = CreateObject("Photoshop.Application")
    REM Use dialog mode 3 for show no dialogs
    DIM dialogMode
    dialogMode = 3
    DIM idOpn
    idOpn = objApp.CharIDToTypeID( "Opn " )
        DIM desc1
        SET desc1 = CreateObject( "Photoshop.ActionDescriptor" )
        DIM idnull
        idnull = objApp.CharIDToTypeID( "null" )
        Call desc1.PutPath( idnull, "C:\\APRESSbox\\ExRaw2process\\0812GlensEX\\MagstoGO\\0812GlentoranWEB\\WK08008DS Glentoran.JPG" )
    Call objApp.ExecuteAction( idOpn, desc1, dialogMode )
    REM =======================================================
    DIM objApp
    SET objApp = CreateObject("Photoshop.Application")
    REM Use dialog mode 3 for show no dialogs
    DIM dialogMode
    dialogMode = 3
    DIM idFltr
    idFltr = objApp.CharIDToTypeID( "Fltr" )
        DIM desc2
        SET desc2 = CreateObject( "Photoshop.ActionDescriptor" )
        DIM idUsng
        idUsng = objApp.CharIDToTypeID( "Usng" )
        Call desc2.PutString( idUsng, "Fix Out-of-focus Blur" )
    Call objApp.ExecuteAction( idFltr, desc2, dialogMode )
    REM =======================================================
    DIM objApp
    SET objApp = CreateObject("Photoshop.Application")
    REM Use dialog mode 3 for show no dialogs
    DIM dialogMode
    dialogMode = 3
    DIM idCls
    idCls = objApp.CharIDToTypeID( "Cls " )
        DIM desc3
        SET desc3 = CreateObject( "Photoshop.ActionDescriptor" )
        DIM idSvng
        idSvng = objApp.CharIDToTypeID( "Svng" )
        DIM idYsN
        idYsN = objApp.CharIDToTypeID( "YsN " )
        DIM idN
        idN = objApp.CharIDToTypeID( "N   " )
        Call desc3.PutEnumerated( idSvng, idYsN, idN )
    Call objApp.ExecuteAction( idCls, desc3, dialogMode )

    The open and close steps you should be able to do using the DOM and not have to use scriptlistener.
    For the filter You might want to see if it can be recorded and played back as an action. If so then just calling that action would be an easy way to run the filter. If it can be recorded you may be able ( at least with javascript ) to make the executeAction call with dialogMode set to all and assign the results to a variable. That variable with contain an Action Descriptor. With most filters the setting you used in the filter dialog will be in that descriptor. You just need to pull the descriptor apart to find what the setting are. Or( again using javascript ) xtools has a script that will convert an action into javascript. It is mostly action manager( scriptlistener ) so you should be able to translate the output to VBS.

  • Enabling rights is canceling scripting - help please!

    After some frustrating time I finally was able to get scripting to work on this last part of my form. I wanted a radio button (stand alone) and a text box. If the radio button was clicked, then the text box was no longer required. If the radio button was not clicked then the text box was required in order to submit.
    Here is the coding I am using (all java script):
    In the exit line of the PhotoOnlyEngraving field is:
    Engraving.validate.nullTest = "disabled";
    In the presubmit line of the Engraving field is:
    if (PhotoOnlyEngraving.rawValue == null || PhotoOnlyEngraving.rawValue == "")
    {Engraving.validate.nullTest = "disabled";
    else
    (Engraving.rawValue == null || Engraving.rawValue == "") { {
    app.alert("Please include details required for Engraving");
    xfa.host.setFocus("Engraving");
    Works great (accept the alert message) until you enable rights with the form. Then it ignores the script and forces you to add text in the engraving field when you have already clicked the PhotoOnly field. This is the only item that seems to be disabled in all the java script.
    Any help with this would be great! I'm really stuck trying to finish a form that is now 4 days past due.
    Thanks!
    Lezli

    thx

  • Document Class / Action Script Help

    Dear all,
    From a tutorial page, i manage to built this flash page with
    xml capabilities. but when i add more scene to the flash page, i
    have errors like this.
    TypeError: Error #1009: Cannot access a property or method of
    a null object reference.
    at MyContent/init()
    at MyContent()
    TypeError: Error #1009: Cannot access a property or method of
    a null object reference.
    at MyContent/onComplete()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()
    How do i edit the "MyContent.as" file so that i can add more
    scene to the flash.
    I understand that, once i put the "MyContent.as" in the
    document class, it will load immediately, is there any way to tell
    it to load only in scene 2 (which is where the xml is needed).
    Thanks. Any help will be very grateful.
    Attach is the actionscript

    other then defining the document class, can i "call up" the
    MyContent.as (external script) when needed?
    If this can be done, what must i do to add into the .fla file
    and the .as file..
    Sorry, i'm very new to AS3.
    Thanks!!!

  • Action Script Help

    Hi to all,
    This is vertical xml gallery code, where the mouse will move
    up, then the scoller will move up and vice versa. now i want the
    reverse . if it move up , then the scoller come down and if it move
    down , then the scoller move up.
    Can anyone please help me.
    Thanks
    Krishna
    quote:
    this.onEnterFrame = function()
    mask_y = _root.main.verti.mask._y;
    mask_h = _root.main.verti.mask._height;
    mask_middle = (mask_y + mask_h) / 2; // take middle of mask
    as reference
    roller_y = _root.main.verti.roller._y;
    roller_h = _root.main.verti.roller._height;
    ymouse = _root.main.verti.mask._ymouse;
    // if mous out of range
    if (ymouse < mask_y || ymouse> mask_y + mask_h)
    speed = 0;
    else
    speed = (ymouse - mask_middle)/ 10;
    // calculate speed -> the closer to middle-> slower,
    closer to edges-> faster
    // if roller bottom reaches mask bottom and scroll up, stop
    if ((roller_y+roller_h)<(mask_y+mask_h) && speed
    < 0)
    speed = 0;
    // if roller top reaches mask top and scroll down, stop
    if (roller_y > mask_y && speed > 0)
    speed = 0;
    _root.main.verti.roller._y += speed;
    stop();

    try:

  • Flash Professional Action Script help?

    I am try to create a website where people can view an online bible and search for within it for certain passages using a search box, but I don't know how to begin to make that happen, in flash professional. Please help.

    Whatever approach you take will depend heavily on the document(s) you have for the bible element of the design.  You somehow need to be able to seek within it and determine where matched elements can be found and how to extract the information you intend to present.
    I don't think your issue currently lies with how to do this in Flash as much as first coming up with a gameplan that identifies the players and how you can interact with and within them.

Maybe you are looking for