Help with action scripts

I have developed a website and I have problems with something that is probably very simple. I created several clips that expand and contract as you hover over them. I wanted to make a function/method when the user clicks, it leads to another scene from this movie. Here is the action script I use:

{We (Release)}
gotoAndPlay ("scene 9");
}

Unfortunately, this does not work. I thought that maybe the method one (release) would not work on these video clips based on the action script that I was already using to expand/collapse the boxes, but the following code works fine:

{We (Release)}
getURL ("home.html");
}

I'm puzzled. Can anyone offer a suggestion as to what I should do? Here is the web address of the page, I'm working, that's the movie I'm having a problem with. AndrewJW.com. the first picture on the left next to the photograph of Word links to another page in the site. The image of Pearl next to this ring is one who will not advance to the next scene in the film.

Thanks for any input.

Andrew

Jeckyl >

UH... Okay I admit my mistake in the 2nd script.
_root.gotoAndPlay () takes a single argument,
_root.gotoAndPlay ("scene 9", 1); doesn't work.
Thanks for reminding me

in fact this will make me confuse awhile,
indicator of code in flash.

for gotoAndPlay,.
gotoAndPlay ( frame);
gotoAndPlay ( scene, frame);

for MovieClip.gotoAndPlay,.
MovieClip.gotoAndPlay ( framework);

Thus, gotoAndPlay can accept 2 arguments only when use without 'something dot' forwards.

If Andrew script is attached to an instance of the button symbol, we use

{We (Release)}
gotoAndPlay ("scene 9", 1);
}

As Andrew attach the script to an instance of movieclip, it can use:

{We (Release)}
gotoAndPlay ("scene 9");
}

where the label to be the 1st image of 'Scene 9' even with the stage name.

I'm right Jeckyl?

I heard a lot of people said 'scene' + 'script '=' buggy', but some times that I get it 'works '. What is your opinion?

Tags: Adobe Animate

Similar Questions

  • Help with Action script 2.0 Please

    Hello
    I'm new to actionscript and I really could with little help please. I'm loading external movie clips in two different containers depending on which button is clicked. Sometimes, there may be two conatiners attached to a buuton click, while the other buttons may only need to download a video clip. Here is the action script, I've been using:

    Button1.onPress = function () {}
    _root.createEmptyMovieClip ("container", 1);
    _root.createEmptyMovieClip ("Container1", 2);
    unloadMovie ("container1");
    loadMovie ("scene2.swf", "container");
    loadMovie ("scene5.swf", "Container1");

    Container._x = 50;
    Container._y = 110;
    container1._x = 170;
    container1._y = 5;
    }
    Button2.onPress = function () {}
    loadMovie ("scene6.swf", "container");
    unloadMovie ("container1");
    Container._x = 50;
    Container._y = 110;
    }

    It is responsible for the movies, but I have to press first button both work. Ideally I need to be able to call a movieclip at any time. Can someone tell me where I'm wrong?

    Try to move these lines outside the function of the button:

    _root.createEmptyMovieClip ("container", 1);
    _root.createEmptyMovieClip ("Container1", 2);

    You can use 'this' instead of '_root'... that will save any problem if you never move it to some other films. In addition, move the x / y assignments right under these lines since they relate to them directly.

  • Transparency with action script

    I have a swf file and I want to give a transparent background on the stage. I understand that it is possible to give it transparency through the HTML publish setting using the ' transparent windowless "property.
    However, I wanted to know if there is an actionscript property to give the same effect of transparency to the scene. like the opactiy or something (sorry, that I may be wrong)

    The thing is I have an external preloader that loads the swf content and when it is loaded, the stadium loses its transparency.
    any help please with action script on transparency?

    As mentioned, that there is no bottom in a loaded SWF file. Unless you EXPLICITLY put a layer in your document with a background on the subject, it is transparent. You can load SWF 500 inside another, you will never get a background of any of them.

    The sole purpose of context is if the original HTML wrapper was not established transparent windowless.

    Your problem is elsewhere, trust us. Look for something, a background of drawing in one of your movies, because something is without doubt.

  • Need help with a script (o - o8) *, see the Virgin if there is no

    Hi all what I need help with a script I can't find an example.

    I'm trying to subtract 2 numbers and then multiply this product. (o o8) * one but I just want to do the calculations if all fields have the numbers IE field o, o8 of field and field one.

    Thank you in advance. I was stuck on this days searching the Internet.

    Assuming you want to affect the outcome of this calculation in another text field, use this code as a custom field calculation script:

    var o = this.getField("o").valueAsString;
    var o8 = this.getField("o8").valueAsString;
    var a = this.getField("a").valueAsString;
    if (o!="" && o8!="" && a!="") event.value = (Number(o)-Number(o8))*Number(a);
    else event.value = "";
    
  • Help: button action script 3

    IM new begineer, using flash cs4 with script action 3

    I have a button with action script code

    " submit_btn. addEventListener (MouseEvent.CLICK, btnDown); "

    but it gave me following warning msg...

    "WARNING: Actions on the button or MovieClip instances are not supported in ActionScript 3.0." All the scripts on the instances of the object will be ignored. »

    Please advise... Thank you

    "Click on" no longer works in the action script 3.0?

    You can not put the code on objects as you can do in AS1/AS2.  All code must be in the timeline or in separate .as files.  AS3 doesn't support not AS1/AS2 'on' code.

  • Interpolation with action script + / from a fixed location

    I know the basics of the interpolation with action script, but I have a picture located in the center of the stage at x = 50.  With a click, I, move this photo - 10 x from this position if it will end the interpolation at 40.  A different button, I would make the oppositie, + 10 x to its current position and if it was at 40 you come back at the beginning and if it was at the beginning, it would be at age 60.

    Thank you

    You can use:

    prevTX.onRelease = function () {}

    this.useHandCursor = false;

    nextTX._visible = true;
    prevTX.enabled = false;
    nextTX.enabled = false;

    addition of the var: number = 100 + thTX._x;
    var myTween1:Tween = new Tween (thTX, "_x", Strong.easeOut, thTX._x, addition, 3, true);
    myTween1.onMotionFinished = function() {}

    prevTX.useHandCursor = true;
    prevTX.enabled = true;
    nextTX.enabled = true;

    }

    }

  • Fill the stage with Action Script

    Hello

    I'm new to flash and Action script. I would like to know how I could fill (instead of copy and paste) the scene with a small button e.g. 10 x 10 px. Let me explain what I'm trying to do here. It's a simple game that includes 4000 buttons, 50 lines of 80 buttons. Each button has States, not available, available and in the process. Visitors come to the page and start clicking, wins the one who has the most clicks.

    So instead of doing this with the painful copy and paste, to give the button a unique id, I was wondering if there is a way to do this with action script, generating 50 lines, 80 buttons per line, and each of them giving an id with j ++ or something.

    Thank you very much and sorry for my English.

    Of course, no problem actually. I would use two pieces of code. The first would be a
    class, which extends MovieClip and attached to your button element in the library.
    Then a little to the loop on the main timeline to attach buttons to the
    step and you're all set.

    For the class:

    class com.yourdomain.Sample extends MovieClip
    {
    var myID:Number;

    function Sample() {}

    public function set id(newID:Number):Void
    {
    myID = newID;
    this.onRelease = function() {}
    trace (this.) MyID);
    }
    }

    }

    Of course, you will need to change the com.yourdomain to your own class path.
    Then just put your clip in the library to export for ActionScript and set
    class: com.yourdomain.Sample

    In the main timeline then write a function createGrid bit as follows:

    function buildGrid (tot, sx, sy, pc, cs, rs) {}
    var startX = sx;
    var currX = startX;
    var startY = sy;
    perCol var = pc;
    var colSpace = cs;
    var rowSpace = rs;
    Use tot + 1 because we are not going to go 1-0 in the loop below
    var total = tot + 1;

    for (var i = 1; i)< total;="">
    Clip var = this.attachMovie ("btn", "btn" I, I + 10, {_x:currX,)
    _y:startY});
    clip.ID = i;
    currX += colSpace;
    If (I % perCol == 0) {}
    startY += rowSpace;
    currX = startX;
    }
    }
    }

    And call it:

    buildGrid (100, 20, 20, 10, 12, 12);

    This will make a grid of 100 occurrences of the element named "btn" (one with)
    your attached class), from 20,20 with 10 per line and 12 pixels
    between the centers... When you click on one any of them they will trace their
    appropriate index 1-100

    HTH

    --
    Dave-
    Developer leader
    http://www.blurredistinction.com
    Adobe Community Expert
    http://www.Adobe.com/communities/experts/

  • Need help with a script customized for processing in Photoshop CS4 of images in batches. Really grateful for the help thereby.

    Hi people.

    So I have a boatload of pictures that I have to deal with as I'm moving off Ebay and open my own online store and the images that I have on Ebay, although excellent quality are not square, and unfortunately, the model that I use in Wordpress requires square photos.

    Basically, what I need is a script that I can use in batch mode, which will focus on the size of the image and change the canvas size to be square corresponding to the current long image side. Resize the image to 1600 square pixels and finally save for web in JPEG quality 60.

    Normally I would muddle my way through this trying to teach myself but I already do so much with this new project that I can't afford to pay developers for help that I would really appreciate if someone could help me with this script. I use Photoshop CS4 if it made a difference.

    Thanks much for any help you can offer.

    See you soon,.

    J

    A simple gesture can do that. What you need to do is that the action of lot.   With the help of Photoshop Image Processor script.  The Action is a two-step

    N ° 1). File menu > automate > fit Image.  In the dialog box Image Fit you assign Width and Height 1600 pixels.

    Step 2.) Menu Image > canvas size.  In the canvas size dialog box, you assign Width and Height 1600 Pixels.

    Record the action in some action with a name like 1600PxSquare

    Then use the file menu to Photoshop > Scripts > image processor. In the dialog to the Image Processor script. Select your image source folder. Set where you want your jpeg images. Set it to save jpeg files quality 6.  Set it to include your 1600PxSquare action.

    Step adjustment image resize your image to fit in a 1600 x 1600 pixels are while keeping image proportions of images. Portrait image will be high 1600px and landscape image will be 1600px wide.  The step size canvas will add the canvas to make the place of the image.  Portraits will have a border on the left and right images of landscape will be confined to the op and downs.

  • Need help with transformation Script

    Well I'm back for the 2nd time today. I would like to thank all those who helped me with my last issue. But now I have another question that I'm developing. Craig & Dan here me helped with 2 separate sending email responders based on questions in the form.

    You can view the form on this link:
    http://mswebsol.com/gaslockguarantee/creditapplication.cfm

    The problem I have right now, is that I don't get the results that I'm looking. Basically lets say you choose Yes to all 4 questions but on the 5th issue, you click on no. Well as it is now the script sends the answer by e-mail indicating your accepted. But what I'm trying to make, is that if you choose not to one of the questions you will automatically get an e-mail response that says you are not admitted.

    If I choose not to question, I'll get the answer correct email which is "your not accepted" to make it work for the first question. But if you choose Yes to the first question and no to the 2nd or any other question you will get the wrong answer that says "you are accepted."

    Here is the code

    < Cfif StructKeyExists(form,"Q1") >
    < cfif form. Q1 is 'Yes' >
    < intrusion via cfmail > accepting... < / intrusion via cfmail >
    < cfelse >
    < intrusion via cfmail > not accepting... < / intrusion via cfmail >
    < / cfif >

    < cfelseif StructKeyExists (form, "Q2") >
    < cfif form. Q2 eq 'Yes' >
    < intrusion via cfmail > accepting... < / intrusion via cfmail >
    < cfelse >
    < intrusion via cfmail > not accepting... < / intrusion via cfmail >
    < / cfif >

    < cfelseif StructKeyExists (form, "Q3") >
    < cfif form. Q3 eq 'Yes' >
    < intrusion via cfmail > accepting... < / intrusion via cfmail >
    < cfelse >
    < intrusion via cfmail > not accepting... < / intrusion via cfmail >
    < / cfif >

    < cfelseif StructKeyExists (form, "Q4") >
    < cfif form. Q4 eq 'Yes' >
    < intrusion via cfmail > accepting... < / intrusion via cfmail >
    < cfelse >
    < intrusion via cfmail > not accepting... < / intrusion via cfmail >
    < / cfif >

    < cfelseif StructKeyExists (form, "Q5") >
    < cfif form. Q5 eq 'Yes' >
    < intrusion via cfmail > accepting... < / intrusion via cfmail >
    < cfelse >
    < intrusion via cfmail > not accepting... < / intrusion via cfmail >
    < / cfif >
    < / cfif >

    Any help would be greatly appreciated!

    Thanks to you all

    Derek Bess
    @ Coldfusion newbie

    If I understand you well, all your if/else logic boils down to a simple:
    (1) one of the answers is "No" - send 'rejected' by email
    (2) all the answers are "Yes" - email "accepted."

    I suggest you cfparam all default = 'no' on your action and answers
    the page, so that you don't have to keep control of structkeyexists:


    ...

    After that, all you need is:


    .. .send 'rejected' code email here...

    .. .send 'admitted' code email here...

    HTH

    Azadi Saryev
    SABAI - Dee.com
    http://www.SABAI-Dee.com/

  • Problem of Windows with Action Scripts run from a Panel

    I created a panel that has shortcuts for Menu items and tools. I have also two buttons on my slab that run scripts that were created with Actions. I tested these two scripts with the ExtendScript Toolkit for both Mac and windows.

    Both scripts do not run on some computers in the window, but they do on others. It seems that the problem more with 7 of the window then in any other operating system, but it is not universal.

    I am at a loss on how to get hurt this problem. Machine window 7, I'm testing on runs the script without any problems, but some users of my panels have the problem above.

    Any ideas?

    Thanks in advance - Sam

    Action handler code looks like it's a step to play a shadow of action which lies in a defined action named SmileixPix.

    If you added that action shadow action value saved SmilePix the action defined and distributed the action defined in the package.

    If users have an action set SmilePix and you loaded the update action defined as a part of you install. Users can end up with two responsible actions named sets SmilePix one containing the action of the shadow and the other without the Sdade action.  I don't know what would happen if your panels has been used and there was a prior action set SmilePix which is not the action of the shadow.  Make sure that defective computers do not list Action Games named SmilePix twon

  • Help with a script

    Hi all

    I've been loving learning PowerCLI.

    I have problems, adding information to a script I had help with.  I have problems with the eastern line,

    Add-Member - InputObject $reportedvm - MemberType noteProperty-name GuestOs - value $VM. Guest.OSFullName

    I'll add the entire script bellows.  If someone could explain to me what I am doing wrong.  I get just white that colum in my CSV.  I guess that the $VM variable does not have property info I'm looking for.  I don't know if I have to do a join or something else to get this info.

    Here's the script as a whole.

    $reportedvms = New-Object System.Collections.ArrayList
    $vms = get-view - viewtype virtualmachine. Tri-objet-property {$_.} Config.Hardware.Device |  where {$_-is [VMware.Vim.VirtualEthernetCard]} |  Measure-object | {Select - ExpandProperty County}-descending
    {foreach ($vm to $vms)
    $reportedvm = new-Object PSObject
    Add-Member - Inputobject $reportedvm - MemberType noteProperty-Guest name-value $vm. Name
    Add-Member - InputObject $reportedvm - MemberType noteProperty-name-value of $($vm.) UUID Config.Uuid)
    Add-Member - InputObject $reportedvm - MemberType noteProperty-name GuestOs - value $VM. Guest.OSFullName
    Add-Member - InputObject $reportedvm - MemberType noteProperty-name ToolsVersion-value $VM. Config.Tools.ToolsVersion
    Add-Member - InputObject $reportedvm - MemberType noteProperty-name ToolsUpdate - value $VM. Guest.ToolsStatus
    $networkcards = $vm.guest.net
    $i = 0
    {foreach ($ntwkcard to $networkcards)
    Add-Member - InputObject $reportedvm - MemberType NoteProperty-Name "card$ {i}." Network"- value $ntwkcard.Network
    Add-Member - InputObject $reportedvm - MemberType NoteProperty-Name "card$ {i}." IpAddress"- value of $($ntwkcard.) IpAddress |? {$_ - like "*."} * »})
    $i ++
    }
    $reportedvms.add ($reportedvm) | Out-Null
    }
    $reportedvms | Export-Csv C:\temp\vm_nic_report.csv

    Try

    $VM. Guest.guestFullName

    instead.

    You're recovery VirtualMachine objects.

  • help with resizing script

    I found an online script that turns pictures into a square (by increasing the size of the canvas on the short side to match the length of the long side) which is awesome, but I would like to make an extra step and I have no experience with script so I hope someone can help.

    now that my images are square, I want to put a maximum of 2500 x 2500 px size, I found scripts to set a resolution of a specific size, but I want to make sure to avoid is upsampling, so I want just any image is greater than 2500 x 2500 px down sample to 2500 x 2500 px

    all information on the code for this would be much appreciated.

    When I'm at the machine with the script that I currently use will be to paste it here in the meantime if you know something about the scaling of the images down, but preventing their intensification I could probably chimpanzee with the code I have and make it work.

    Something like this might work, you can change the ResampleMethod, however:

    top-down images of squares more 2500px up to 2500px.

    2012, use it at your own risk.

    #target photoshop

    If (app.documents.length > 0) {}

    myDocument = app.activeDocument;

    value of pixels;

    var originalRulerUnits = app.preferences.rulerUnits;

    app.preferences.rulerUnits = Units.PIXELS;

    get the dimensions;

    var theWidth = myDocument.width;

    var theHeight = myDocument.height;

    If (theWidth == theHeight) {}

    If {(theWidth > 2500)

    myDocument.resizeImage (2500, 2500, myDocument.resolution, ResampleMethod.BICUBICSHARPER)

    };

    }

    else {alert ('not square')};

    reset;

    app.preferences.rulerUnits = originalRulerUnits;

    };

  • Can someone help with the scripts on this file?

    Hi, I hope someone with a bigger brain can help me here.

    I have an existing Flash CS3 file that makes up the result to http://www.infusion-set.com/Flash/eLearning/Inset30/inset30_eguide.html .

    The customer asked if I could add an extra tab at the top after that 'group' called 'Contact us' with link to an additional page. The design was done in ActionScript 2 with references to XML files for dynamic content because it has been done in other languages.

    I modified the XML file with the correct references to a new page and a .swf file that accompanies it to play in the field of animation.

    I tried a .fla version where I duplicated one of the existing tabs script, changed the XML references and changed the variables if necessary to "con or"Con"(which is to reach us). Unfortunately, he made the menu tab go completely off the page and was patently false in some way.

    Can someone give me a clue as to what to change here on the original file that I am a novice with ActionScripts, so ask me.

    For reference, I have attached the HTML files with scripts of original file and my incorrect version. The chronology is 103 images with the scripts placed in frame 1 and 102

    Thank you.

    Garry

    The buttons are all created using the same library object (but MC), except for the code you have in the revised file does not call on it for the con button.

    You calling on something with a name of 'con' link, which tells me that a quick check is not - then it is undefined in the code when you try to use it.  I found this by using trace (newConBut._x); After its _x value was assigned, as I said, you should try.   So the first thing you want to do is to change the following line from...

    var newConBut = _root.attachMovie ("con", "conbut", _root.getNextHighestDepth ());

    TO

    var newConBut = _root.attachMovie ("but", "conbut", _root.getNextHighestDepth ());

    so that it uses the but MC who is used to this end in the library.  So, you want to correct the assignment _x of the buttons and I think that you had previously...

    newConBut._x = 650 - newConBut._width;
    newRecBut._x = newConBut._x - newRecBut._width;

    Here is a picture of what these changes (note, without the XML file, I had to finagle things just to work, then the labels of biutton are not what they will be)...

  • Help with a Script to remove the additional paths and save

    Here are a few scripts that I have at the moment, but none work. With the first script, I get an error with the 'indexOf', and with the second script, it keeps only the second name listed in the string. How can I get either of these to work where I can remove all the paths, with the exception of multiple ones I want to keep?

    function deletepaths()
    {
      if (!documents.length) return false;
    
    
      var doc = activeDocument;
      var save = ["Ex1", "Ex2", "Ex3"];
    
    
      for (var x = 0; x < doc.pathItems.length; x++)
      {
        if (save.indexOf(doc.pathItems[x].name) == -1))
        {
          doc.pathItems[x].remove();
        }
      }
    }
    deletepaths();
    

    deletepaths();
    function deletepaths(){
    if(!documents.length) return;
    var doc = activeDocument;
    for(var a = doc.pathItems.length-1;a>-1;a--){
    if(doc.pathItems[a].name != ("ex1", "Ex2")) 
         doc.pathItems[a].remove();
      }
    }
    

    IndexOf does not work with extension script. Most likely, you would need a number if statement for many golds ' | ', or a loop in the loop goes well your path names.

  • Error message with Action Script 2.0 file

    Hello

    I'm trying to change an old flash file that uses the Action Script 2.0. I use CS6 and get the error after after publication:

    Scene 1, Layer 'AS', frame 1, line 5, column 291067: constraint implied a value of type int to type String unrelated.

    Can you suggest fixes or workarounds? I also have Flash 4.0. What can I downsave the file? If so, how?

    Thank you!

    TextField cannot accept than strings.  then, use:

    Set the ceiling on Transit here benefits:

    var transitBenefitLimit:Number = 130;

    var FICAPercent:Number = 0.0765;

    TransitExpensesTotal.text = '0 '.

    total.set_Text = '0 '.

    {this.onEnterFrame = function ()}

    BenefitLimit.text = "$" + transitBenefitLimit;

    TransitExpenses();

    SavingsTotal();

    }

    function SavingsTotal() {}

    var n1:Number = slider1.ratio;

    var n2:Number = slider2.ratio;

    "" total.set_Text = ' $' + Math.round ((n1*12) * (n2*.01)) + ' * ";

    }

    function TransitExpenses() {}

    var n1:Number = slider1.ratio;

    var n2:Number = slider2.ratio;

    TransitExpensesTotal.text = ' $' + Math.round (12 * n1);

    }

Maybe you are looking for

  • I can't have my admin since Firefox Panel

    http://www.easy2resolve.com/ , it comes to my web site, I can not connect to its Board of Directors of mozilla, when I enter my password and user name, show, as its not valid. But I can log in the Admin Panel with the same user name and password of c

  • Problems of micro satellite A50

    I got a Satellite A50. I had a problem with my microphone function because there is no possibility to select the microphone volume control icon. Can I get a driver to support for Sigmatel C-Major Soundcard? If I click on save, it has a sound after u

  • Cannot use webcam on my Satellite P200

    I recently bought a Satellite P200 with integrated webcam. When I try to turn on the webcam I sometimes the message "locked by another application" and the cam will not turn on. -What it means and how the problem can be solved?

  • Upgrade the RAM for HP ENVY dv7-7233nr

    How much could I add? I currently have 481 GB free of 569 GB. My computer will not slow down, but I use this laptop for games and I would like to have more space for custom content for the Sims 3 to download. It works not too badly, but there is a li

  • My sd card is not download on my computer, I have recently my system was working on, that they removed a program that I need to reinstall?

    My sd card is not download the pictures on my computer, I recently had my system worked and lost a lot of programs... I wonder if they have removed a program that I need to reinstall...