Disable actionscript

Is there a way to disable actiosnript from a script oustide
of a movieclip that contains script.
I have lots of movieclips that contains script in the first
frame. Is there a way to disable or comment out that script with a
script oustide of the mc..?

I may be missing the purpose of what you want to do when, but
one option would be to have a conditional (if) that surrounds the
code in the movieclips that tests a variable that you set to true
or false via the _parent movieclip code.
You can only comment out code in the authoring mode, not
during run time.

Similar Messages

  • "-useLegacyAOT no" parameter disables ActionScript Sampler

    I'm trying to profile my app with Scout on iOS but having trouble getting the ActionScript Sampler enabled.
    If I use the legacy AOT to compile, the sampler is enabled, but if I want to compile faster, the sampler is disabled even if I have it set in the launch parameters.
    Am I doing something wrong, is this a bug or is this a known feature..?
    Thanks!

    HI Nimisha,
    I have build ipa for  my client mobile project code using using -useLegacyAOT yes , application works fine.
    When using  -useLegacyAOT no application crash runtime.
    when I debug the code  i got the root cause that the application crash when the following code execute
    var cmb:CommandGroupBuilder=commands.asSequence()
    Reference
    Spicelib-Commands/CommandGroupBuilder.as at master · spicefactory/Spicelib-Commands · GitHub
    org.spicefactory.lib.command.builder.CommandGroupBuilder
    IOS8.0.2
    AIRSDK 15.0.0.302
    -useLegacyAOT no(default)
    Let me know the workaround
    Thanks,
    Saravan

  • Enabling and disabling buttons in actionscript

    in flex i love using the enabled option for buttons (so when the user has not yet selected something in a datagrid or if a variable in the app is not properly set the button will not be enabled and will be grayed out... but once the condition is true the button automatically becomes enabled) like this:
    <mx:Button 
    label="Save Changes" icon="@Embed(source='images/disk.png')" click="saveData();"enabled="
    {firstID != 0 &amp;&amp; changesMade == true}"/>
    i have a control bar that has buttons but if the user is an Admin they have additional buttons (which i created using actionscript in an initApp() function once the app initializes like this):
     if (adminList.indexOf(Application.application.parameters.emplid) != -1){ 
    var but:Button = new Button();but.label =
    "Delete Account";but.addEventListener(
    "click",confirm);but.setStyle(
    "icon", deleteIcon);  
    this.toolbar.addChild(but);}
    how can i code the enabled function that i use i mxml in actionscript in the code above?

    oops i just realized i forgot the return type.
    this is helpful when the button is first created and the app is first initialized... but i need this button to automatically become enabled if the user does something (like click on a datagrid) and automatically disabled when the user clicks off of the datagrid (or some action that would enable/disable the button).
    public function loadAdmins(returnedEvent:ResultEvent):void {adminList = returnedEvent.result[0].DEPT_LIST;
    if (adminList.indexOf(Application.application.parameters.emplid) != -1){ 
    var delBtn:Button = new Button();delBtn.label =
    "Delete Account";delBtn.addEventListener(
    "click",confirm);delBtn.setStyle(
    "icon", deleteIcon);delBtn.enabled=delBtnEnabled();
    this.toolbar.addChild(delBtn);}
    public function delBtnEnabled():Boolean{ 
    var returnVal:Boolean; 
    if (firstID != 0){returnVal =
    true;}
    else{returnVal =
    false;}
    return returnVal;}

  • How to disable a swf file actionscripting?

    There's a swf movie which is loaded inside my main swf file.
    I want to disable whole actionscripts in that swf movie by a mouse
    event. is there any code that locks and disables a nested swf
    movie? and vice versa?

    You can control the code in the child.swf from the main.swf
    so you can delete event handlers, stop animations that are
    running... what exactly are you trying to achieve?

  • How to disable right-click in Flex app /w actionscript?

    Anyone know of actionscript code within Flex for disabling
    right-click. I've got an app that I don't want my users to have
    access to the right-click menu.

    "EvolvedDSM" <[email protected]> wrote in
    message
    news:gadm7g$fi6$[email protected]..
    > Thanks hanchan, I did just want to disable the zoom
    options and whatnot.
    > After
    > watching a few users, who have never worked with a flex
    app before,
    > accidentally right click here and there and zoom in or
    zoom out, I was
    > banging
    > my head on the wall thinking "this could happen ALL THE
    TIME with these
    > people".
    >
    > Ahhh, Amy. You need to feel the love of "No Script", a
    FireFox browser
    > extension. It is truly the best tool on the net imo. NO
    MORE ADS. You
    > have
    > to allow non-domain site ads to appear on the page, else
    they never load
    > and
    > you don't have to deal with the ads. If you use FireFox,
    get it!! And if
    > you
    > don't use FireFox, try it!!
    But even then, the player itself isn't providing you with any
    security.

  • Howto enable disable menubar items in actionscript

    Hello,
    My problem is that i want to enable/disable buttons in a
    menubar according to the loaded page.
    So what i did was when the user clicks on the menubar, it
    triggers a function. Inside that function there will become a check
    on which page is at front. According to that page i am gonna set
    menuitems on and off.
    Thats the idea i had, so now my problem.
    I first try to create a simple solution like my code beneath.

    I'd suggest changing things around a bit. See if the
    following works for you. The clickHandler() method has the syntax
    you're looking for.
    TS

  • Actionscript Disables Buttons!!!

    I have built a vertical thumbnail scroller, all of the
    thumbnails are buttons that are supposed to launch PDF's.
    I had an issue where the thumbnail scroller was just
    scrolling immediately, before you even moused over so I added the
    script below to the first frame.
    Now none of my buttons work. If I remove the script the
    buttons work fine, but the thing scrolls nonstop and I don't want
    that. Any help would be greatly appreciated. Thanks.
    Here is a link to the file in question:
    Thumbnail
    Scroller

    your attaching mouse handlers to a parent movieclip. that
    parent will intercept all mouse events so the child buttons cannot
    respond to mouse events.
    to remedy use handlers in the child generation only or use a
    hitTest and loop (onMouseMove) to start and stop scrolling.

  • Inconsistencies between an MXML tag instance's properties and an Actionscript instance's properties

    Hi everyone!  I've been using the SDK for several months, but I've only been using Flash Builder for a few weeks.  I finished the Flex In a Week videos and exercises a few days ago, and since then I've been playing around with the accompanying exercises.
    My question specifically refers to the PanelSkin.mxml file from 'Exercise 5.6: Creating custom skin properties'.  In this example, the function initTitleSkin() sets the 'headerSkinColor.color' property to a value passed from the main application:
    <?xml version="1.0" encoding="utf-8"?>
    <s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:mx="library://ns.adobe.com/flex/mx"
        xmlns:s="library://ns.adobe.com/flex/spark"
        creationComplete="initTitleSkin()">
        <s:states>
            <s:State name="normal" />
            <s:State name="disabled" />
        </s:states>   
        <fx:Metadata>
                   [HostComponent("components.EmployeePortalPanel")]
       </fx:Metadata>
        <fx:Script>
            <![CDATA[
                private function initTitleSkin():void
                    headerSkinColor.color = hostComponent.panelTitleColor;
            ]]>
        </fx:Script>
    <s:Rect radiusX="4" radiusY="4" height="100%" width="100%" >
         <s:fill>
              <mx:SolidColor id="panelSkin" color="#E8E8E8"/>
          </s:fill>
    </s:Rect>
    <s:Path winding="nonZero" data="M 0.016 0.012 L 0.016 23.354 L 287.419 23.354 L 287.408 12.012 C 287.408 5.385 282.035 0.012 275.408 0.012 L 0.016 0.012 Z">
         <s:fill>
              <s:SolidColor id="headerSkinColor"/>
         </s:fill>
    </s:Path>
    <s:Label id="titleDisplay" lineBreak="explicit" left="10" right="4" top="2" height="30" verticalAlign="middle" fontWeight="bold"/>
    <s:Group id="contentGroup" top="23">
    </s:Group>
    </s:SparkSkin>
    This code works just fine.  I tried extending this example by setting the 'titleDisplay.color' property in the same way.  The 'titleDisplay' is an instance of the Label class.
         private function initTitleSkin():void
                    headerSkinColor.color = hostComponent.panelTitleColor;
                    titleDisplay.color = hostComponent.panelLabelColor;
    The above code results in the error 'Access of possibly undefined property color through a reference with static type spark.components:Label'.
    I set up the custom 'panelLabelColor' property and confirmed the 'hostComponent.panelLabelColor' property is being passed to the custom skin class correctly.  My question is, Why can I set the 'color' property in the MXML Label block, but not from the ActionScript instance.  The Language Reference shows the spark Label has a 'color' property.  Code Assist shows the 'color' property in the MXML block, but not in the ActionScript instance.  Am I missing something simple that's staring me right in the face?  I'm usually pretty good at that.  I'd appreciate any thoughts on this inconsistency.

    it's not likely.

  • Actionscript error message

    Using Captivate 6. When trying to publish a file for proofing, with eLearning output disabled, I receive this error message: Swf compilation failed. Note: Please verify if any of the actionscript keywords is used as user variable name. Where should I look to try to solve this issue?

    Some info copied and pasted from my e-book on Troubleshooting Captivate 6:
    Reserved keyword error
    Solution 1: Try hiding slides and republishing
    I struck this error once after adding a Certificate widget at the end of a Captivate 6 project.  Thinking that the issue was the widget, I hid the widget slide and republished the project successfully.  Then I unhid the widget slide and published again successfully.  So whatever caused the glitch during the first publish had resolved itself just by hiding the last slide added.  Perhaps you will be so lucky.  As stated in our section about troubleshooting tips, always try the easy solutions first.
    Solution 2: Avoid using punctuation in fields
    This error can result if you have inadvertently added punctuation marks in object Item Names, slide labels, project information fields, etc. Certain characters (such as [ ] / “ ‘ # : ; etc) are also used in programming languages and Captivate may mistake these characters for executable code.  If you experience this error, the solution requires searching through all data fields in your project file to remove any punctuation characters you find in the following field areas:
    Project information
    Slide labels
    LMS settings
    Quizzing labels
    Closed captioning text
    Slide notes text
    Solution 3: Copy/paste objects to reset object identifiers
    Another possible reason for this error can be that you’ve been copying and pasting content objects or slides from one project to another and this has somehow created a conflict because two objects ended up with the same unique identifier in the project file.  They start fighting over who gets the honor of keeping the name and Captivate falls over as a casualty of war.  Fortunately, this issue is now quite rare because Adobe has progressively built more safeguards into Captivate to prevent these conflicts.
    Paradoxically, the solution is to do yet another copy / paste run, but this time paste into a new blank project of the same size with no other slides or objects.  The reason this method works is that when Captivate objects are copied and pasted they are always assigned new unique IDs, even when you copy and paste into another slide of the same project.  So if the issue is due to a conflict between items with the same identifier, copying all slides and objects into a new project file forces Captivate to reassign new IDs, which then ensures they are all unique again.
    The downside of this particular method is that copying and pasting to another project will NOT retain any Advanced Actions or Variables that you had set up in the original project.  So you may need to set those up again.

  • Runnng external swf Actionscript while in fullscreen mode

    I am using Flash 9.0 (CS3 Pro). I am coding in Actionscript
    3.0
    I have two swf files, both interactive. During playback of
    the, a mouse event launches the second. I also want the mouse event
    to trigger a switch to fullscreen mode. The second swf is
    non-linear and requires user input to jump to the appropriate frame
    of the timeline. Everything tests and runs perfectly during
    standard screen mode but whenever I try to load and play the
    external swf file in fullscreen mode, Flash recognizes the
    actionscript built into the original SWF but ignores all of the
    Actionscript (this.stop(), this.gotoAndPlay(), etc.) embedded in
    the second (external) swf file.
    How can I get external swf files to load with their scripted
    functionality in fullscreen mode?
    Thanks for the help.
    Aaron
    The code I am using is:
    // --- this is the code contained in the first swf file
    // function to launch second SWF file
    function movieLaunch(event:MouseEvent):void
    // Sets display mode to fullscreen. With this line present,
    Flash does not look at any Actionscript in ip.swf
    // If I comment the below line out, the second SWF plays
    correctly and has full functionality
    stage.displayState = "fullScreen";
    // load and launch second movie (ip.swf) which is located in
    the same directory
    var request:URLRequest = new URLRequest("ip.swf");
    var loader:Loader = new Loader();
    loader.load(request);
    addChild(loader);
    // Sets the listener for the button that will launch the
    second movie.
    launchMovieButton.addEventListener(MouseEvent.CLICK,
    movieLaunch);
    Text

    The keyboard is disabled in fullscreen mode. This may be
    causing the problem?

  • Disable button

    as my previous post
    Loading
    external movie on top of all layers
    i am facing a problem now that all the buttons are still
    working when the external movie loads on top.
    I want all the menu buttons to be disabled when the external
    movie loads and there is a CLOSE Button in the external movie. i
    tried to search for how to disable the buttons. i found some, but
    couldnt understand what to do.
    So any help will be appreciated here plz.
    Thnx in advance.
    Regards

    hi,
    i did tried to put in the button code of my previous issue
    on (release) {
    // this.swapDepths(1);
    _root.createEmptyMovieClip("target_mc1",_root.getNextHighestDepth());
    _root.target_mc1._x = -600;
    _root.target_mc1._y = -150;
    _root.target_mc1.loadMovie("1.swf");
    security.enabled=false;
    i can't add any more buttons to disable them
    like after
    security btn
    if i add
    development btn
    only
    security btn
    will be disabled... all other btnz will be working.
    i want like, on click all the buttons gets disabled and in
    the external movie clip, when i click the CLOSE btn, all buttons
    gets enabled.
    i found the following code.
    for (var name in this) {
    if (typeof (this[name]) == "movieclip") {
    for (var name1 in this[name]) {
    if (typeof (this[name][name1]) == "object") {
    this[name][name1].enabled = false;
    but i don't know the right place to add this code. though it
    works fine.
    disables all the btns with the name. again i wud like to put
    the structure of my file:
    1. main container of left and rite menu, single layer
    2. 2 layers. down layer -> right menu. up layer ->
    left.
    Now if we enter in right menu mc....
    3. animation of right menu
    4. in animation mc there are 4 buttons animation tweening
    5. button container with actionScript on button
    6. Button
    any ideas plz?

  • Why are certain keys disabled when I run Flash Player?

    I am building a resource for my students which allows text entry into a text input text field. When I try to type the answer a number of keys are disabled. I have tried disabling keyboard shortcuts in the Flash editor. I have then tried closing the program and just running it in the stand alone Flash Player. The list of keys that do not work are given below.
    The keys that do not work are 5,6,8,9,0,P,J,K,B, and X. I have not tested other alphanumeric characters.
    the Flash Player version is version 9.
    I am using Adobe Flash 5 at home but save as version 4 for use in school. I am running ActionScript 2. 
      Regards
      teacheRuss

    Kglad
    I am not detecting any keys. My Flash file is the start of a simple quiz. ans1 (in the code below) is a text box instance. The actionscript compares what is typed in with a number of given answers. The trouble is if I make questions that need any of the keyboard keys that do not work then the anser cannot be inputted. Thsiis my problem.
    Code given below:
    Q1.onRelease = function() {//Q1 carries out this function when
                                //the mouse is released Q1 is hte button named and is assigned this script
        trace(ans1.text); //ans1 is the variable name for the data entry box. The trace
                            //method traces ans1 text entered in the output window
        if(ans1.text == "-1" || ans1.text == "minus 1" ||
           ans1.text == "Minus 1" || ans1.text == "Minus one" ||
           ans1.text == "minus one") //checks the data entered into the box where ==
                                     //is equal to and || means OR
             _root.gotoAndStop(3) // if ans1 is equal to any ofthe above the playhead jumps to frame 3
                                   // for the welcome message then closes correct condition
          } else  {                  // else allows the playhead to jump to frame 4 with the
                                    // incorrect answer
             _root.gotoAndStop(4)
          }                        // closes the incorrect condition
    }                            // closes the script

  • Can't get Memory allocation, FPS, ActionScript, ...

    Hello,
    I'm using Flash Develop 4.4.2 with Flash Player content debugger 11.7
    I enabled avanced telemetry with a pluging but in Adobe Scout I didn't get Memory allocating, actionscript, etc.
    I also enabled Memory allocating, actionscript and the Advanced telemetry is enabled in Adobe Scout session.
    I succeed to get the memory allocating just 1 time at the first session but now I got nothing.

    Thanks for the response Michael.
    Hmmmm, weeeeird, just tried it again and it works! Notice in the previous screenshot that "Memory Allocation Tracking" was checked but yet "Disabled" on the Session Info panel.
    The thing that got it to work was checking the "Stage 3D Recording" setting and then turning it off. However, notice in the following screenshot that although unchecked, the Session Info panel still has Stage 3D Recording as "Enabled".
    I dunno, it works now.
    Thanks again for the help/knowledge.

  • Disable Specific Event in Datagrid

    Hi everybody,
    I'm searching a way to disable native event (CTRL+B keyPress
    in a datagrid) but I couldn't find anything in the actionscript
    reference.
    Is there somebody who manage to do something like this on a
    component???
    Thanks

    Hi Moorthi,
    Found Alex Harui’s excellent entry on 'Disabling List Selection' - http://blogs.adobe.com/aharui/2007/06/disabling_list_selection.html.
    Same concept could be applied for datagrid selection.
    Thanks and Regards,
    Pooja Kuber | [email protected] |http://www.infocepts.com

  • Actionscript for download time

    Hello,
    I would apreciate some help in creating action script version
    2.0 for an information site, that would hold hundreds of sfw files
    with expanding topics each using a diferent graphic picture.
    I would like to give visitor a check box choice before
    entering my site that would disable downloading the background
    pictures for external sfw files, so that users with slower
    connection, wouldn't have to wait a lot. At the same time, user
    with good i-net connection would get valuable information and at
    the same time enjoy wonderful collection of pictures, that would
    enchance remembering of presented information.
    As far as I see it, i should use an IF statement checking
    weather checkbox is clicked, and if picture mode is on, external
    sfw file checks that by evaluating _global variable, but if not,
    external sfw file use no background but main swf loads an 70%
    transperent white rectangle symbol, over main sfw background, so
    there still would be good visual aperance.
    I can't get 2 things at the moment
    1 actionscript for Loading of rectangle if box is unchecked
    2 actionscript for placing background in external sfw is
    checked.
    Could u please help me?
    Thank you,
    Hekaya

    1. if the rectangle symbol is an external swf, use loadMovie,
    loadMovieNum or loadClip. if it's a library symbol, use
    attachMovie.
    2. same as above.

Maybe you are looking for