Action script 2 not working

New to Flash CS4, but could do basic button stuff like this in Flash MX 2004. (Haven't been doing anything with Flash in the meantime, but now have CS4 and am determined to get back into it.)
I chose Action script 2 when starting, and in the publish settings. Made some very simple buttons and used the action script assistant but cannot figure out why they are not working. i keep going around and around and getting nowhere.
would someone please take a look and advise? I am STUCK.
Please?
the file is too big to attach, but if anybody is willing to help, i'll share the file via my iDisk. Thanks so much.

I have a few suggestions for you -- not that you asked, but hey it is a free forum with volunteers, so you get what you get!
First if you really don't know AS2 all that well, but you want to get into coding I would suggest starting with AS3. It is the future and if you have to learn new stuff it might as well be the newest, new stuff. AS3 is the future of Actionscript and Flash. It is a little more complex in some respects, but in many others it isn't that much more difficult and it really helps if you haven't learned all kinds of "bad" ideas from how AS2 was....
Next, if you decide to stick with AS2, I would suggest learning the latest ways of doing stuff in AS2. Using the on(event) type of coding is really old and it won't serve you well if you want to advance very far with your coding.Here is a great article on the transition to the newer style and why it is a good idea:
http://www.quip.net/blog/2006/flash/museum-pieces-on-and-onclipevent
After that, consider ditching buttons all together. They are really twitchy and strange and most people I know gave them up when movieclips could have button events attached to them.
Finally on the issue of Scenes, they are a great way for timeline animators to organize their content. And they are great when everything is just played back to back. In fact that is what happens to scenes, when you publish the timelines are strung together in sequence and then the "scenes" are deleted. The whole thing becomes just one big long timeline. The problems come in when you start using code to move the playhead around. The documentation seems pretty straight forward and it should work, but there are just several little tricky things where it doesn't work. Sounds can cause problems too. So if you plan to use code I always recommend that you use movieclips to organize your "scenes" and not the actual scenes....

Similar Messages

  • The "portable document format" icon is a Word 2010 icon, so selecting Adobe Reader as action does not work to display the PDF.

    In the Applications tab -- Content Type -- the "portable document format" icon is a Word 2010 icon (not Adobe), so selecting Adobe Reader or preview in Firefox as action does not work to display the PDF. I can see this Applications difference because my other Firefox laptop has the Adobe icon, and I can view PDFs. Essentially, a PDF is coming in as a Word document -- and the computer tries to open it up as a Word file.
    How do I get the correct PDF icon in the Applications list -- the same way it displays (and works) on my other laptop.

    Adobe PDF Plug-In For Firefox and Netscape 10.1.7 ?
    I think you need to add this to the list of applications and the action to take on the type of content. This can also be managed in the about:permissions page. [[Permissions Manager - Give certain websites the ability to store passwords, set cookies and more]]

  • Re: Action Buttons not working Peoplesoft HR9.1/PT8.52

    Hi All,
    I've seen lots of threads regarding Action Buttons not working Peoplesoft HR9.1/PT8.52.
    May I know which patch to download?
    Thanks

    Hi,
    Log on to Oracle Support and go to tab Patches & Updates, Choose PeopleTools and version 8.52. From the search results choose the highest tool patch, at the moment.
    Updateid: 14285861 / PT 8.52.10 PRODUCT PATCH

  • Assigned F key to play an action does not work. Why? Using cs6  iMac and wireless key board

    Assigned F key to play an action does not work to play the action on an image. When the F key is selected it seams to control computer attributes rather than the play action assigned in photoshop. Why? Using cs6  iMac and wireless key board.
    Is this a possible preference setting in mac or is it a setting in cs6 photoshop ? Help and knowledge will be appreciated.

    *** Moderator Action ***
    This networking question has been moved from the Solaris 10 discussion space,
    to the Solaris Networking discussion space, for closer topic alignment.
    Whereas there may be IPV6 nuances specific to your Solaris 10 environment and to the hardware, this appears to be a discussion that may be more global in effect.

  • SSRS - Action: MailTo not working in Excel Export

    Hello:
    In my reports, I have a link that enables users to send me an email if they want to provide feedback.  This is done by using a "mailto:" expression in Action.
    If the user clicks on the link in IE, the link functions correctly and Outlook will open up with my email address, the Subject I've specified, etc.
    However, if the user exports the report to Excel and then clicks on thel link, a "Reference is not valid" error message gets thrown.  This is because the link automatically have
    file:///tempFileLocation/fileName -  appended to the beginning of the link.  Therefore it becomes something like "file:///tempFileLocation/fileName - mailto:emailAddress?subject=subjectName"
    etc.  
    Why is the file location automatically appended to the beginning when the url is "mailto:"?  The other links will export and function correctly when exported to Excel.  However, any link with "mailto:" Action
    will not work when the report is exported to Excel.  What is the fix for this?
    Thank you in advance!

    Hi yosedesh,
    According to your description, you create an action to open Outlook email. The action works fine in IE, but after exporting the report to an Excel file, the action can’t work correctly.
    In Reporting Services, when we create an expression and concatenate the ‘MailTo:’ to the beginning of the field for the “Go to URL” option, the hyperlink will be changed after Excel render automatically. The hyperlink will add the name of exported Excel
    file at the beginning of the hyperlink like you mentioned. This is a by-design behavior. So in your scenario, if you want users to open outlook email via the hyperlink, you have to modify the hyperlink within the Excel file manually.
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

  • Simple button scripts not working in AS2

    Hi there,
    I am at my wits end. I've tried about 2 dozen tutorials word for word and they don't work and I just keep getting lots of strange errors.
    I have a very simple 4 frame scent with a forward and backward arrow on each frame to link them together. I have an artwork layer, a button layer and an action script layer. The action script layer contains stop(); and the following script in the buttons layer. I adjusted the gotoAndStop frame number accordingly for each frame. Below is an example of one frame. I ran them from frame 5 to 9 as the stop feature wouldn't work on the first keyframe.
    leftButton.onRelease=function(){
    trace("gotoAndStop(9)");
    rightButton.onRelease=function(){
    trace("gotoAndStop(6)");
    When I test the movie (publish it) the buttons don't work at all. I've tried many times to no avail. It just remains frozen on frame 5 and the arrows do nothing.
    Here is a screen shot of my file.
    http://marthalodge.com/Picture2.png
    Thanks for any help.

    Regarding the numbers, I was referring to instance/variable names, not frame labels.
    As far as errors go, the following is errant in that it is missing a closing parenthesis, but it also doesn't make much sense.  What are you expecting it to trace?
    trace(gotoAndStop("eight");

  • Folder Actions will not work - tried everything

    Recently Folder Actions simply stopped working on 10.6.4. They worked fine before then recently just stopped working.
    I've tried everything I can think of, including:
    1. completely removing enabling & disabling & enabling folder actions through the setup app.
    2. trashing folder actions plist files in user domain and relaunching
    3. disabling related launchd processes with lingon
    4. trashing launch agents in user domain and also trying to unload them in terminal
    5. trying to kill the folder actions dispatcher process in activity monitor (just relaunches, as it should)
    6. emptying system caches including dyld shared cache using cocktail
    7. doing most of the above and restarting
    It's driving me nuts. Any other ideas?
    here's some entries from syslog:
    8/2/10 9:31:37 AM com.apple.launchd.peruser.501[269] (com.apple.FolderActions.folders) Throttling respawn: Will start in 6 seconds
    8/2/10 9:37:29 AM Folder Actions Setup[4403] * WARNING: Method selectedRowEnumerator in class NSTableView is deprecated. It will be removed in a future release and should no longer be used.
    8/2/10 9:43:37 AM com.apple.launchd.peruser.501[269] (com.apple.FolderActions.enabled[309]) Exited: Killed
    8/2/10 9:46:23 AM [0x0-0x3a03a].com.apple.systemevents[360] com.apple.FolderActions.enabled: Already loaded
    8/2/10 9:52:07 AM Folder Actions Setup[1083] * WARNING: Method selectedRowEnumerator in class NSTableView is deprecated. It will be removed in a future release and should no longer be used.
    8/2/10 9:52:16 AM com.apple.launchd.peruser.501[269] (com.apple.FolderActions.folders) Throttling respawn: Will start in 7 seconds
    8/2/10 9:53:02 AM com.apple.launchd.peruser.501[269] (com.apple.FolderActions.folders) Throttling respawn: Will start in 1 seconds
    8/2/10 9:56:18 AM com.apple.launchd.peruser.501[269] (com.apple.FolderActions.folders) Throttling respawn: Will start in 10 seconds
    8/2/10 10:00:58 AM Folder Actions Setup[2190] * WARNING: Method selectedRowEnumerator in class NSTableView is deprecated. It will be removed in a future release and should no longer be used.
    8/2/10 10:01:01 AM com.apple.FolderActions.enabled[2236] launchctl: Error unloading: com.apple.FolderActions.folders
    8/2/10 10:01:30 AM com.apple.launchd.peruser.501[269] (com.apple.FolderActions.folders) Throttling respawn: Will start in 10 seconds
    8/2/10 10:01:42 AM com.apple.launchd.peruser.501[269] (com.apple.FolderActions.folders) Throttling respawn: Will start in 9 seconds
    8/2/10 10:05:03 AM sudo[2622] lryter : TTY=ttys000 ; PWD=/Users/lryter ; USER=root ; COMMAND=/bin/launchctl unload -w /Users/lryter/Library/LaunchAgents/com.apple.FolderActions.enabled.plist
    8/2/10 10:10:25 AM Folder Actions Setup[676] * WARNING: Method selectedRowEnumerator in class NSTableView is deprecated. It will be removed in a future release and should no longer be used.
    8/2/10 10:10:27 AM com.apple.FolderActions.enabled[680] launchctl: Couldn't stat("/Users/lryter/Library/LaunchAgents/com.apple.FolderActions.folders.plist"): No such file or directory
    8/2/10 10:10:27 AM com.apple.FolderActions.enabled[680] nothing found to unload
    8/2/10 10:10:38 AM com.apple.launchd.peruser.501[268] (com.apple.FolderActions.folders) Throttling respawn: Will start in 8 seconds
    8/2/10 10:13:17 AM sudo[943] lryter : TTY=ttys000 ; PWD=/Users/lryter ; USER=root ; COMMAND=/bin/launchctl unload -w /Users/lryter/Library/LaunchAgents/com.apple.FolderActions.enabled.plist
    8/2/10 10:14:01 AM com.apple.launchd.peruser.501[268] (com.apple.FolderActions.folders) Throttling respawn: Will start in 4 seconds
    8/2/10 10:14:14 AM com.apple.launchd.peruser.501[268] (com.apple.FolderActions.folders) Throttling respawn: Will start in 1 seconds

    I finally go Folders Action to work, after being unable to use it even for a simple beep for years now.
    Here is what I did:
    1. Changed permissions to 755 for the following folder and two contained files (note that 775 didn't work for me)
    ~/Library/LaunchAgents/
    ~/Library/LaunchAgents/com.apple.FolderActions.enabled.plist
    ~/Library/LaunchAgents/com.apple.FolderActions.folders.plist
    2. Changed the following lines within ~/Library/LaunchAgents/com.apple.FolderActions.enabled.plist (using TextWrangler)
    from:
    <key>OnDemand</key>
    <false/>
    to:
    <key>OnDemand</key>
    <true/>
    Prior to the permissions changes within #1 above, the value of <true/> kept getting changed back to <false/> by something in the system... and though
    there was improvement by the permissions changes, the following console message appeared until false was changed to true.
    com.apple.FolderActions.enabled[4127] launchctl: Error unloading: com.apple.FolderActions.folders
    At this point true is staying true, and not being changed by unknown forces to false, and the above message is not appearing.
    3. The only other thing I did prior to #1 and #2 above, was to run the script (unsaved),
    tell application "/System/Library/CoreServices/Folder Actions Dispatcher.app" to tick
    This little tell line caused something to occur where my Folder Action surprised me and worked for the first time though it took about 30 seconds and was erratic,
    sometimes performing, sometimes not, though if I would do move something into the folder to trigger the action that should occur, and did not occur, then at the point
    running the above tell line or script would cause the action to occur.
    4. At this point I don't fool with the tell line or script from #3, and it seems that systemevents has gotten involved, as well as launchd, and with my simple Folder Action script
    I'm getting the folder action within 10 seconds compared to 30 to 45 if ever seconds.
    5. This is still too early to tell if this is the wonder pill I've needed since Leopard, and now Snow Leopard (and maybe Tiger as well: I forget when I even tried Folder Actions).
    There was a time when I moved things around, so that the items normally found in the former AppleScript folder, were placed elsewhere in subfolders, so I don't know if that lead to this...
    because I could get Folder Actions to work on Macs in the Applestore, but not my own Mac. Watching the console messages was helpful. I don't think it's a big concern that
    deprecated messages are found sometimes. That's a just a normal part of the constantly rebuilding of things that goes on. It's more like a reminder that we've got an upgraded
    OEM part were going to start using, and the older part won't be available after such and such date, so program accordingly, and in the meantime drive.

  • ACCEPT in SQL script not working

    G'day
    Why does the following use of the 'accept' keyword not work?
    I want a user to be prompted to either commit or rollback but it does not work in the following 'experiment'
    set echo on
    set termout on
    set feedback on
    update emp set sal = sal*2 where ename = 'SCOTT';
    accept action char prompt 'rollback or commit >'
    &action
    the following is what happens when i run the script:
    SQL> @temp02.sql
    SQL> set echo on
    SQL> set termout on
    SQL> set feedback on
    SQL> update emp set sal = sal*2 where ename = 'SCOTT';
    1 row updated.
    SQL> accept action char prompt 'rollback or commit >'
    rollback or commit >rollback
    SQL> &action
    SP2-0042: unknown command "&action" - rest of line ignored.
    Any suggestions appreciated.
    Tony

    Hi, Tony,
    Welcome to the forum!
    SQL*Plus looks at the first word of a statement before resolving substitution variables. (I don't know why; it resolves them regardless of what the command is.) At any rate, the first word of a command that SQL*Plus interprets has to be spelled out.
    "BEGIN" that starts an anonymous block counts as the first word, so you can take Andy's suggestion much further by simply saying:
    BEGIN
        &action;
    END;
    /@ also counts as the first word, so you could also have one-line scripts called commit.sql
    COMMIT;and rollback.sql,
    ROLLBACK;and then say
    @&action

  • Event manager script not working as expected

    On a Cisco 4900M running Version 12.2(53)SG1, trying to capture certain information requested by Cisco TAC to troubleshoot periodic high cpu usage on the device causing it to momentarily not respond to HSRP packets from the HSRP partner.
    This is the script in place today:
    event manager applet capture_cpu_spike
    event snmp oid 1.3.6.1.4.1.9.2.1.56 get-type next entry-op ge entry-val "80" exit-time 10 poll-interval 1
    action 1.0 syslog msg "CPU Utilization is high"
    action 2.0 cli command "en"
    action 3.0 cli command "show proc cpu sort | redirect bootflash:cpuinfo1.txt"
    action 3.1 cli command "show int summ | redirect bootflash:cpuinfo2.txt"
    action 3.2 cli command "show proc cpu sort | redirect bootflash:cpuinfo3.txt"
    action 3.3 cli command "show int summ | redirect bootflash:cpuinfo4.txt"
    action 3.4 cli command "show platform cpu packet statistics | redirect bootflash:cpuinfo5.txt"
    action 3.5 cli command "show platform health | redirect bootflash:cpuinfo6.txt"
    action 4.0 cli command "end"
    Problem is, when the cpu does spike, only action 3.1 is executed.
    How do I modify this script to run all the commands listed?
    TIA
    dom

    Let me first explain why your script is not working for you.
    Basically, the problem you encounter is a result of a common misconception about copyin(). It is intended to be used to copy content of userspace memory into a scratch buffer so that it can be accessed directly from within kernel space (where the DTrace core executes). That said, it is often interpreted as somehow being equivalent to malloc() whereas in reality it actually works like alloca() instead. So, what you are seeing is basically the artefact of the scratch buffer being overwritten with other data. And unfortunately, that is perfectly legal.
    The content of the scratch buffer pointed to by self->addr in your script is only valid for as long as the specific probe enabling is executing (it is clause-local). So, your clauses to print out the actual bytes in the buffer are looking at a buffer that is for all intends and purposes no longer reserved, and therefore you are looking at it after other data was written to the scratch space.
    So... in order for this to work, you should do things a bit different. Rather than trying to get a copy of the buffer in one clause, and then read from it in following clauses, you can simply collect the buffer address in the entry read:entry clause, get the number of bytes read in the first read:return clause, and then for every clause in which you print 4 bytes do the following (example for bytes 4-7):
    syscall::read:return
    /execname == "foobar" && self->nbytes > 4/
    this->addr = (char *)copyin((uintptr_t)self->bufferaddr + 4, 4);
    printf(" 4- 7: %02x %02x %02x %02x\n", this->addr[0], this->addr[1], this->addr[2], this->addr[3]);
    So basically, for every clause that print 4 bytes you copyin those bytes, and then print them out.

  • Flash 6 vs Flash 8, Script not working, Fla attached

    Can some please help me and tell me why the action script
    which makes the pictures enlarge on mouseover works with flash 6
    publish settings but not flash 8.
    ...nevermind, figured it out, thanks....
    Thanks a million!
    Rich

    unless you uncheck "autokerning" in property inspector, your
    textfields
    auto-activate html mode, so your number is wrapped in html
    tags.
    really weird!
    jaya_r schrieb:
    > Hi
    >
    > I tried this simple script in the trial version of Flash
    8 which does not
    > seem to be working. Can anyone please let me know what
    could possibly be the
    > problem. When i used the same script in Flash MX 2004,it
    worked. However even
    > after re-installing the trial version of Flash 8,it does
    not work. Basically
    > this is what i made:
    >
    > 1) input text field with a variable name of :inputNum
    > 2)dynamic text field with a variable name of :outputBool
    > 3)made a button with an instance name : enter_btn
    > 4)put this code in the actions layer:
    >
    > enter_btn.onRelease=function(){
    > outputBool=(inputNum<100);
    > };
    > var inputNum:Number=0;
    > var outputBool:Boolean=true;
    >
    > At the outset, it shows 0 in the 'inputNum' and the true
    in the
    > 'outputBool'.However when i enter any number in the
    inputNum it shows
    > 'undefined' in the outputBool. Why is that so? Would
    really appreciate an
    > answer.
    >
    > Thanks
    > Jayashree
    >

  • Conditional action script not executing

    I have four buttons, Q1, Q2,Q3,Q4.  the script for each works fine:  the variable (ex. Q1) is set equal to 1 and the other functions perform as scripted.  When all four buttons are clicked on and equal to 1, another script (Slide_End) is supposed to work--hiding a box on the screen and showing the Next button.  This Slide_End script is not working.  I have the slide properties On Enter assigned to Advanced Actions>Slide_End.  The Slide_End script has been labelled as All Clicked within the script itself.  I just can't understand what I am missing.  I have the exact same settings on another slide and it works fine.

    Never had a formal training neither, but have been blogging about advanced actions and solving use cases for many users. And wrote some articles long time ago, here you can find the link with those:
    https://workspaces.acrobat.com/?d=tGgSjfVqRtEgI6fORG-zbw
    Normally for a standard action, you choose 'Standard action', not a 'Conditional action'. Have a look at this old presentation, maybe it will clarify something:
    http://blog.lilybiri.com/presentation-devlearn-2011
    Double click on the second 'Untitled' and you have a second possibility to check something. The first condition will always be fulfilled  (IF 1 is equal to 1) so that is really a standard action. The second Untitled will be your real condition where you check all the variables and have two different sets of statement/commands depending on the answer Yes or No for that condition.
    Lilybiri

  • Basic scripts not working

    I'm trying to learn actionscript and doing the most basic scripts is not working.
    I followed the steps in the video (make a pink circle, F8, Name = mcCircle, Instance = circle1_mc). Next I create a new layer named actions, click on the frame, open the actions window, type in "circle1_mc.alpha = 0;". Save and Ctrl-Enter. I've tried various (aka - every) locations for the action script, various alpha values, checked spelling, and recreated it several times in several files; the circle is *still* there. I don't know what I'm doing wrong or what step I'm missing. I also own a Flash book and followed their steps -- same as above using trace(circle1.x, circle1.y) and it also doesn't work.
    Any clues what I'm doing wrong?
    Additional Info:
    Windows XP
    Adobe Flash CS4 Professional
    Knowledge of Flash: Beginner
    Knowledge of other Adobe Products: Beginner-Intermediate (Photoshop and Acrobat)
    Knowledge of Scripting: Intermediate (Perl and Windows Batch)

    Hi Lady,
    You are selecting file type as Flash File(Actionscript 2.0) and trying to implement 3.0 feature(alpha not _alpha).
    just select Actionscript 3.0 fille type and do the same. You will get the result. just try out.

  • OS 10.3.9 - Finder Scripts Not Working

    Greetings,
    Finder scripts on my work machine (specifically, Add to File Names and Add to Folder Names) are not working. I have the Script icon in the toolbar, activate the drop-down menu, go to Finder Scripts, and click on the one I want to use, and fill out the info, but none of the highlighted file/folder names are changed when the script finishes. For what it's worth, Folder Actions are turned "On" across the system (not sure this affects Finder Scripts like these).
    Also, my User Account is on the server, if that makes a difference. When I select the "Open Scripts Folder," it takes me to: Administrator's Computer/Macintosh HD/Domain/<Server Name>/Users/<User Name>/Library/Scripts. The folder at this location is empty. Turns out the scripts are actually stored at: Macintosh HD/Library/Scripts, which is the location from where the toolbar's drop-down menu appears to be accessing. Is this difference the culprit? Any solutions?
    Thanks kindly for any help.

    Hi,
    I had a similar problem with Logic 7.0. The MT4 seemed to be ok if I reinstalled the old mt4 drivers from the emagic website and then reset the mac, but in the end, I had to do this everytime I booted up the computer.
    It maybe a software related. The situation became so drastic that I ended up reinstalling panther on my mac and it all worked fine from then on. I haven't a clue why.
    I've not had ever had a repeat of these issues.
    Thanks,
    Andy

  • Script not working in SharePoint content editor webpart

    Hi All,
    <html>
    <head>
    <script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script language="javascript" type="text/javascript">
    $(document).ready(function () {
    //Call your function here like
    //retrieveListItems();
    ExecuteOrDelayUntilScriptLoaded(retrieveListItems, "SP.js");
    var siteUrl = '/vceo/PMO/EPMO/';
    var close1 = ''; var close2 = ''; var high = ''; var low = ''; var medium = ''; var lowMedium = ''; var mediumHigh = '';
    var open1 = ''; var open2 = ''; var high1 = ''; var low1 = ''; var medium1 = ''; var lowMedium1 = ''; var mediumHigh1 = '';
    var count = 0; var count1 = 0;
    var initiate = 0; var planning = 0; var execution = 0; var closing = 0;
    var sumMinimal = 0; var sumModerate = 0; var sumCritical = 0; var sumSevere = 0;
    var sumHighlyLikely = 0; var sumLikely = 0; var sumSomewhat = 0; var sumUnlikely = 0;
    var sumBudget = 0; var sumCommitted = 0; var sumConsumption = 0;
    function retrieveListItems() {
    alert("Welcome to Dashboard");
    var clientContext = new SP.ClientContext(siteUrl); alert("site url");
    var oList = clientContext.get_web().get_lists().getByTitle('Project Issues and Risks');
    var oList1 = clientContext.get_web().get_lists().getByTitle('Project');
    var oList2 = clientContext.get_web().get_lists().getByTitle('Risk Impact');
    var oList3 = clientContext.get_web().get_lists().getByTitle('Risk Probability'); alert("get by title");
    var camlQuery = new SP.CamlQuery(); var camlQuery1 = new SP.CamlQuery(); var camlQuery2 = new SP.CamlQuery(); var camlQuery3 = new SP.CamlQuery(); var camlQuery4 = new SP.CamlQuery(); var camlQuery5 = new SP.CamlQuery(); var camlQuery6 = new SP.CamlQuery();
    camlQuery.set_viewXml('<View><Query><Where><Eq><FieldRef Name="Project_x0020_Issue_x0020_Status" /><Value Type="Choice">Issue</Value></Eq></Where></Query></View>');
    camlQuery1.set_viewXml('<View><Query><Where><Eq><FieldRef Name="Project_x0020_Issue_x0020_Status" /><Value Type="Choice">Risk</Value></Eq></Where></Query></View>');
    camlQuery2.set_viewXml('<View><Query><Where><Eq><FieldRef Name="Overall_x0020_Status" /><Value Type="Choice">Open</Value></Eq></Where></Query></View>');
    camlQuery3.set_viewXml('<View><Query><Where><Eq><FieldRef Name="Overall_x0020_Status" /><Value Type="Choice">Closed</Value></Eq></Where></Query></View>');
    camlQuery4.set_viewXml('<View><Query><Where><IsNotNull><FieldRef Name="Project_x0020_Code" /></IsNotNull></Where></Query></View>');
    camlQuery5.set_viewXml('<View><Query><Where><IsNotNull><FieldRef Name="Project_x0020_Code" /></IsNotNull></Where></Query></View>');
    camlQuery6.set_viewXml('<View><Query><Where><IsNotNull><FieldRef Name="Project_x0020_Code" /></IsNotNull></Where></Query></View>');
    this.collListItem = oList.getItems(camlQuery); this.collListItem1 = oList.getItems(camlQuery1); this.collListItem2 = oList1.getItems(camlQuery2); this.collListItem3 = oList1.getItems(camlQuery3);
    this.collListItem4 = oList2.getItems(camlQuery4); this.collListItem5 = oList3.getItems(camlQuery5); this.collListItem6 = oList1.getItems(camlQuery6);
    clientContext.load(collListItem); clientContext.load(collListItem1); clientContext.load(collListItem2); clientContext.load(collListItem3); clientContext.load(collListItem4); clientContext.load(collListItem5); clientContext.load(collListItem6);
    clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));
    alert("retrieve list");
    function onQuerySucceeded(sender, args) {
    alert("succeed");
    var listItemEnumerator = collListItem.getEnumerator(); var listItemEnumerator1 = collListItem1.getEnumerator(); var listItemEnumerator2 = collListItem2.getEnumerator();
    var listItemEnumerator3 = collListItem3.getEnumerator(); var listItemEnumerator4 = collListItem4.getEnumerator(); var listItemEnumerator5 = collListItem5.getEnumerator(); var listItemEnumerator6 = collListItem6.getEnumerator();
    var sumClose = 0; var sumClose1 = 0; var sumHigh = 0; var sumMedium = 0; var sumLow = 0; var sumLowMedium = 0; var sumMediumHigh = 0;
    var sumOpen = 0; var sumOpen1 = 0; var sumHigh1 = 0; var sumMedium1 = 0; var sumLow1 = 0; var sumLowMedium1 = 0; var sumMediumHigh1 = 0;
    while (listItemEnumerator.moveNext()) { var oListItem = listItemEnumerator.get_current(); sumClose += oListItem.get_item('Close'); sumOpen += oListItem.get_item('Open'); sumHigh += oListItem.get_item('High'); sumMedium += oListItem.get_item('Medium'); sumLow += oListItem.get_item('Low'); sumLowMedium += oListItem.get_item('LowMedium'); sumMediumHigh += oListItem.get_item('MediumHigh'); }
    while (listItemEnumerator1.moveNext()) { var oListItem1 = listItemEnumerator1.get_current(); sumClose1 += oListItem1.get_item('Close'); sumOpen1 += oListItem1.get_item('Open'); sumHigh1 += oListItem1.get_item('High'); sumMedium1 += oListItem1.get_item('Medium'); sumLow1 += oListItem1.get_item('Low'); sumLowMedium1 += oListItem1.get_item('LowMedium'); sumMediumHigh1 += oListItem1.get_item('MediumHigh'); }
    while (listItemEnumerator4.moveNext()) { var oListItem4 = listItemEnumerator4.get_current(); sumMinimal += oListItem4.get_item('Minimal'); sumModerate += oListItem4.get_item('Moderate'); sumSevere += oListItem4.get_item('Severe'); sumCritical += oListItem4.get_item('Critical'); }
    while (listItemEnumerator5.moveNext()) { var oListItem5 = listItemEnumerator5.get_current(); sumUnlikely += oListItem5.get_item('Unlikely'); sumSomewhat += oListItem5.get_item('Somewhat'); sumLikely += oListItem5.get_item('Likely'); sumHighlyLikely += oListItem5.get_item('HighlyLikely'); }
    while (listItemEnumerator6.moveNext()) { var oListItem6 = listItemEnumerator6.get_current(); sumBudget += oListItem6.get_item('Project_x0020_Budget_x0020_Amoun'); sumCommitted += oListItem6.get_item('Committed_x0020_Budget'); }
    count = this.collListItem2.get_count();
    count1 = this.collListItem3.get_count();
    while (listItemEnumerator2.moveNext()) {
    var oListItem2 = listItemEnumerator2.get_current();
    var stat = oListItem2.get_item('Project_x0020_Status');
    if (stat == "Intiation") {
    initiate = initiate + 1
    if (stat == "Planning") {
    planning = planning + 1
    if (stat == "Execution") {
    execution = execution + 1
    if (stat == "Closing") {
    closing = closing + 1
    //alert("initiate" + initiate); alert("planning" + planning); alert("execution" + execution); alert("closing" + closing);
    //alert("countOpen" + count); alert("closed:" + count1);
    window.close1 = sumClose; window.close2 = sumClose1; window.high = sumHigh; window.low = sumLow; window.medium = sumMedium; window.mediumHigh = sumMediumHigh; window.lowMedium = sumLowMedium;
    window.open1 = sumOpen; window.open2 = sumOpen1; window.high1 = sumHigh1; window.low1 = sumLow1; window.medium1 = sumMedium1; window.mediumHigh1 = sumMediumHigh1; window.lowMedium1 = sumLowMedium1;
    drawChart();
    function onQueryFailed(sender, args) { alert('Request failed.. ' + args.get_message() + '\n' + args.get_stackTrace()); }
    google.load("visualization", "1", { packages: ["corechart"] });
    function drawChart() {
    var data = google.visualization.arrayToDataTable([['Task', 'Issues'], ['Close', window.close1], ['Open', window.open1]]);
    var data1 = google.visualization.arrayToDataTable([['Task', 'Risks'], ['Close', window.close2], ['Open', window.open2]]);
    var data2 = google.visualization.arrayToDataTable([['Program', 'High', 'Medium-High', 'Medium', 'Low-Medium', 'Low'], ['Category', window.high, window.mediumHigh, window.medium, window.lowMedium, window.low]]);
    var data3 = google.visualization.arrayToDataTable([['Program', 'High', 'Medium-High', 'Medium', 'Low-Medium', 'Low'], ['Category', window.high1, window.mediumHigh1, window.medium1, window.lowMedium1, window.low1]]);
    var data4 = google.visualization.arrayToDataTable([['Project', 'Status'], ['Closed', count1], ['Open', count]]);
    var data5 = google.visualization.arrayToDataTable([['Project', 'Status'], ['Initiation', initiate], ['Planning', planning], ['Execution', execution], ['Closing', closing]]);
    var data6 = google.visualization.arrayToDataTable([['Program', 'Impact'], ['Minimal', sumMinimal], ['Moderate', sumModerate], ['Severe', sumSevere], ['Critical', sumCritical]]);
    var data7 = google.visualization.arrayToDataTable([['Program', 'Probability'], ['Highly Likely/Probable(76%-100%)', sumHighlyLikely], ['Likely(51%-76%)', sumLikely], ['Somewhat Likely(26%-50%)', sumSomewhat], ['Unlikely/Improbable(0%-25%)', sumUnlikely]]);
    var data8 = google.visualization.arrayToDataTable([['Project', 'Budget'], ['Approved', sumBudget], ['Committed', sumCommitted]]);
    var options = { title: 'Program Issues', width: 200, height: 300, legend: 'bottom', pieSliceText: 'value', pieStartAngle: 180, };
    var options1 = { title: 'Program Risks', width: 200, height: 300, legend: 'bottom', pieSliceText: 'value', pieStartAngle: 180, };
    var options2 = { width: 200, height: 200, legend: { position: 'top', maxLines: 3 }, bar: { groupWidth: '25%' }, isStacked: true, vAxis: { title: 'Open', titleTextStyle: { color: 'red' } } };
    var options3 = { width: 200, height: 200, legend: { position: 'top', maxLines: 3 }, bar: { groupWidth: '25%' }, isStacked: true, vAxis: { title: 'Open', titleTextStyle: { color: 'red' } } };
    var options4 = { title: 'Project Status', width: 225, height: 300, legend: 'bottom', pieSliceText: 'value', pieStartAngle: 180, };
    var options5 = { width: 175, height: 200, legend: { position: 'top', maxLines: 10 }, pieSliceText: 'value', };
    var options6 = { title: 'Program Risk Impact', width: 300, height: 300, legend: 'right', pieSliceText: 'value', };
    var options7 = { title: 'Program Risk Probable', width: 300, height: 300, legend: 'right', pieSliceText: 'value', };
    var options8 = { title: 'Project Budget', width: 300, height: 300, legend: 'bottom', pieSliceText: 'value', };
    var chart = new google.visualization.PieChart(document.getElementById('chart_div3'));
    chart.draw(data, options);
    var chart1 = new google.visualization.PieChart(document.getElementById('chart_div'));
    chart1.draw(data1, options1);
    var chart2 = new google.visualization.ColumnChart(document.getElementById('chart_div1'));
    chart2.draw(data2, options2);
    var chart3 = new google.visualization.ColumnChart(document.getElementById('chart_div2'));
    chart3.draw(data3, options3);
    var chart4 = new google.visualization.PieChart(document.getElementById('chart_div4'));
    chart4.draw(data4, options4);
    var chart5 = new google.visualization.PieChart(document.getElementById('chart_div5'));
    chart5.draw(data5, options5);
    var chart6 = new google.visualization.PieChart(document.getElementById('chart_div6'));
    chart6.draw(data6, options6);
    var chart7 = new google.visualization.PieChart(document.getElementById('chart_div7'));
    chart7.draw(data7, options7);
    var chart8 = new google.visualization.ColumnChart(document.getElementById('chart_div8'));
    chart8.draw(data8, options8);
    </script>
    </head>
    <body>
    <table >
    <tbody>
    <tr>
    <td id="chart_div8" colspan="2" style="border-bottom:ridge;border-left:ridge;border-top:ridge"></td>
    <td id="chart_div4" style="border-bottom:ridge;border-left:ridge;border-top:ridge"></td>
    <td id="chart_div5" style="border-bottom:ridge;border-right:ridge;border-top:ridge"></td>
    </tr>
    <tr>
    <td id="chart_div" style="border-bottom:ridge;border-left:ridge;"></td>
    <td id="chart_div2" style="border-bottom:ridge;"></td>
    <td id="chart_div3" style="border-bottom:ridge;border-left:ridge;"></td>
    <td id="chart_div1" style="border-bottom:ridge;border-right:ridge""></td>
    </tr>
    <tr>
    <td id="chart_div6" colspan="2" style="border-bottom:ridge;border-left:ridge;"></td>
    <td id="chart_div7" colspan="2" style="border-bottom:ridge;border-left:ridge;border-right:ridge"></td>
    </tr>
    </tbody>
    </table>
    </body>
    </html>
    This content editor webpart not working in sharepoint page. Once I checked out to the page then chart is working. When i checkedin function not get called. How to fix this?
    THanks in advance!

    In SharePoint 2013, sp.js and sp.runtime.js does not load on the page in published mode. You need to explicitly load these files. You can check using IE developer tools in the Script section that in published mode these files are missing.
    In order to fix this issue explictly refer these two js files on your page.
    <script type="text/javascript" src="_layouts/15/sp.runtime.js"></script>
    <script type="text/javascript" src="_layouts/15/sp.js"></script>
    Geetanjali Arora | My blogs |

  • The Create List Item workflow action does not work in document library with document template

    My end goal is more complex but below is a basic example of the issue I’m having that just simply does not work.
    I'm trying to use a site workflow to create an item in a document library that has a document template applied to it but the file that gets created by the workflow is corrupt and cannot be opened.
    I created a document library and edited the document template by adding some text to the header and changing it to a Word docx file instead of a Word dotx file. I tested the document template by clicking the files tab in the ribbon and then clicking new
    document which opens the document template in Word and allows me to edit and save the document back to SharePoint. Then I created a SharePoint 2013 site workflow in SharePoint Designer that contains a single Create List Item action, and that action creates
    an item in the document library with the name field statically defined. I published the workflow and then manually start it on the site. The workflow completes successfully and when I navigate to the document library the document has been created by the workflow.
    When I click on the document to open it in the Word Web App it throws the error pictured below and if I open it in the Word client application it just opens a blank document and not the correct document template.
    I also tried using a SharePoint 2010 workflow with pretty much the same results. Opening the document in Word Web App gives the same error as above and opening the document in the Word client application gives the error pictured below.
    Come on Microsoft creating a Word Document in a SharePoint Document Library from a SharePoint Workflow should just work! Is this a bug or does anyone have any ideas on what is causing the this issue?

    I had the same problem with corrupted document - this worked for me:
    1. Create a 2010 Workflow which creates the list element in a document library
    (you may start this workflow from your 2013 workflow if applicable)
    2. In the Create New List Item properties - make sure to set ContentTypeId to your content type
    ("Id for indholdstype" is Danish for "Contenttype ID")
    3. Your Content Type template should be a ".docx" file - NOT a ".dotx" file...!
    (I have always created my templates for content types as .dotx files - seems Microsoft wants us to use ordinary .docx files as template files for content types)
    Hope this helps you!

  • Simple button script not working

    I am using AS2 and need help figuring out why this simple button script is not working:
    stop();
    buttonWS1.onRelease = function(){
                        gotoAndStop("Stage1and2_Boss",4);
    buttonWS2.onRelease = function(){
                        nextFrame();
    //end
    My buttons are the square letter-puzzles below. They are images that I converted to "symbols" (specifically, buttons). I put their names as above (buttonWS1, buttonWS2, etc.) in the "instance names" boxes.
    I have no idea what is going on. Please help!

    Hi -
    1. Yes, buttonWS2 is the instance name
    2. The only code attached to it is the code I pasted above.
    3. onRelease does not execute because my trace statement does not appear in the output
    Here is the modified code for buttonWS2:
    buttonWS2.onRelease = function(){
                        trace("clicked!");
                        nextFrame();
    Question: It shouldn't matter if I have commented-out code within that set of codes should it?:
    buttonWS2.onRelease = function(){
              //if (puzzleschosenarray[0] == 2 || puzzleschosenarray[1] == 2) {
              // cannot be chosen -- make button non-functional
              //else{
                        //puzzleschosenarray[roundnumber-1] = 2;
                        trace("clicked!");
                        nextFrame();

Maybe you are looking for

  • Create Sales order with reference to purchase order - Help needed

    Hi Gurus Purchase order is being created in Oracle system. SAP system will receive the purchase order and creates the sales order for the corresponding purchase order. Hoe to create sales order, Through BAPI or through IDOC. Please suggest and give s

  • PSE 6

    I'm unable to install PSE 6 in my G5, MAC OS 10.5.8. ADOBE has told me that it was my computer, which after talking to APPLE there is no problems. What I get is the ICON, when clicked I get a folder with "bootstrapper.dmg"  When clicked I get a pictu

  • InDesign: Interactive PDF, can I make a scrollbar?

    Hello. I'm making a scrolling web page design on InDesign. This is just for the appearance and layout, it is not becoming a actual website. Is it possible to make a interactive pdf have a part that always stays on top when scrolling? like this websit

  • Why the filters aren't working?

    I have created several filters for my two joined Inbox accounts, my filters have been established from the "create filter from..." option but they don't execute at all?? any clues on why this is happening? I tried all possible methods of creating fil

  • Iphone video sent to email...can't open...help

    I took a video with my iphone 3gs and I can't open it in my email.  What is the problem?  How can I fix this? Thanks for any help.