URGENT! Helping to create more of a linked button

Hello!

Could someone help a beginner trying to understand this.

I work in Flash CS3, AS3.

I created a button that links to another Web page using this code (the code is added to a separate layer):

----------------------

import flash.events.MouseEvent;

steud.addEventListener (MouseEvent.CLICK, onMouseClick);

function onMouseClick(e:MouseEvent):void

{

var request: URLRequest = new URLRequest ("http://www.xx.html");

navigateToURL (request, "_blank");

}

----------------------

It works fine, but the problem is I want to add more buttons (and links) to it, and that's where I'm stuck. When I try just to add a new layer and adding the code here, everything stops working. I also tried copy and paste the code under the first, with no result.

Anyone know?

PER DAY

As I mentioned earlier, you cannot use the same name of function for different functions (that you choose your buttons?).  A way around the problem is therefore to use the names of different function to each button function... instead of using onMouseClick as name for each, change it for each... onMOuseClick1, onMouseClick2, etc...

As much as having the code on different layers going, that won't matter if I think your reason for doing it is what it is.  Layers do not code regardless of any other code, so if it makes sense, you should keep all your code on the same layer.  I often have two layers.  One for the shared code (variables and functions) where all the code is in box 1 and it extends the length of the timeline and a layer of the framework-specific code (stops, function calls, assignments, etc.).

Tags: Adobe Animate

Similar Questions

  • I need urgent help!  How do you get a button to open a menu or something that has more buttons on it.

    I need to know how to create a button that, when you press to display a menu with the other buttons on the subject. I am doing this for a school assignment. Basically, I select "Shoes" and that brings up a menu where I can choose from a lot of different shoes. Help, please!

    create a submenu movieclip containing the extra buttons.

    then you can add a listener for your hand touch the causes as movieclip to be added to the stage (for example, using addChild).

  • How can I create more than one CSS style for the text links?

    Hello

    Just like the title says, I need help to create more than one CSS text link style in Dreamweaver CS4. For example, I want that navigation on the site that I am building to have a style of link different text as a link in a certain part of the body copy. I played with Dreamweaver for awhile and can't find a way to do this. If it is still possible to do so, I'd appreciate any help.

    It is a common requirement in most Web sites.

    It's faster and easier to implement directly in Code view

    Good tutorial here

    http://www.Projectseven.com/Tutorials/CSS/Pseudoclasses/page3.htm

  • Need examples and a reference link of combat in the setting of the project, videos and tutorials did not help me much more information

    Need examples and a reference link of combat in the setting of the project, videos and tutorials did not help me much more information.

    Can you tell me or explain myself better. I'm new to using this new trial of DPS

    Thank you

    The option "Link reference" in the project settings can possibly be used for a link to an application from outside of the app, but it is currently not supported. You can learn more about this option and other parameters of the project here: Digital Publishing Solution help | Create projects

    If you are looking for ways to create links to other articles, see the following: hyperlinks in 2015 of DPS.

    Let us know if you have any other questions.

    -Bob

  • Helps to create a more driven by police.

    Untitled-1.png

    Got me on this one and could use assistance or a link to some help to create an effect that I want to do. Have two letters, a D & G. What I would do is put the top or bottom of the G under the D to give it a more and effect. As a figure 8 If you understand what I mean. Any help would be greatly appreciated. Thanks in advance and I'm using CS6 perfectly up-to-date.

    I look in a layer mask and paint (or back on) the section of G, you want to appear 'behind' the D. You probably want to manipulate the shadow of D, so that it appears on the g at this time.

    Good luck and hope that helps.

    Hunt

  • Need help, how to create more than one rectangle from a button in one step of canvas

    Dear Guys,

    I have a problem to create more than one rectangle from a button canvas. here my role to create:

    1. I create entry-level size with textfield

    2. I click on the button called "submit query."

    3. my web creates a rectangle with specific dimensions.

    My problem come when I click on the button again, my old rectangle has been remove from my new rectangle was created.

    My question is: How can I create more than one without delete/remove the former I created?

    Here is my Code:

    <head>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <link rel="stylesheet" type="text/css" media="all" href="css/style.css">

    <script src="kinetic-v4.7.2.min.js"></script>

    </head>

     

    <body>

    <label>Length</label><input name="panjang" id="panjang" type="text" size="5" maxlength="5"><br>

     

    <label>Width</label><input name="lebar" id="lebar" type="text" size="5" maxlength="5"><br>

     

    <label>Height</label><input name="tinggi" id="tinggi" type="text" size="5" maxlength="5"><br>

     

    <label>Packing Name</label><input name="nam_pac" id="nam_pac" type="text" size="5" maxlength="5"><br>

     

    <input name="submit" type="submit">

     

    <script defer>

                  var stage = new Kinetic.Stage({

                    container: 'container',

                    width: 943.5,

                    height: 254.10

                  });

                  var layer = new Kinetic.Layer();

                  var rectX = stage.getWidth() / 2 - 50;

                  var rectY = stage.getHeight() / 2 - 50;

                 

                  var group = new Kinetic.Group({

                    draggable: true

                  });

                 

                

                  var box = new Kinetic.Rect({

                    x: rectX,

                    y: rectY,

                    width: <?php echo ($_POST['panjang']/10)/1.3; ?>,

                    height: <?php echo $_POST['lebar']/10; ?>,

                    //fill: '#00D2FF',

                    stroke: 'blue',

                    strokeWidth: 2

                    //draggable: true

                  });

     

                  var simpleText = new Kinetic.Text({

                    x: Math.round(box.getWidth() / 2),

                    y: Math.round(box.getHeight() / 2),

                    text: '<?php echo $_POST['tinggi'].'/'.$_POST['nam_pac']; ?>',

                    fontSize: 30,

                    fontFamily: 'Calibri',

                    fill: 'blue',

                  });

                 

                 

                  // add cursor styling

                  box.on('mouseover', function() {

                    document.body.style.cursor = 'pointer';

                  });

                  box.on('mouseout', function() {

                    document.body.style.cursor = 'default';

                  });

                 

                  group.add(box);

                  group.add(simpleText);

                  layer.add(group);

                  stage.add(layer);

                </script>

    </body>

     

    It's my printscreen can help you help me:

    my_web.jpg

    Thanks before help me

    Kind regards

    Prabowo.

    My script only deletes the last comic layer. If you copy all and paste into a new document, you should be able to see that it works. You can try this?

    --

    Kenneth Kawamoto

    http://www.materiaprima.co.UK/

  • Need help with high back and create more space on the computer's internal drive.

    I don't have a lot of space on my internal hard drive.  I just got a backup unit portable 500 GB.  After that I backup everything, what should I do next to create more space on the original disk of disk space?

    Hello

    Here are some steps to free up the memory of hard drive on your computer.

    Method 1: how to optimize disk space everything back to the top
    http://Windows.Microsoft.com/en-us/Windows7/what-backup-settings-should-I-use-to-maximize-my-disk-space

    Method 2: perform cleaning disc.

    Delete files using disk cleanup
    http://Windows.Microsoft.com/en-us/Windows7/delete-files-using-disk-cleanup

    Hope this information helps.
    Please respond back with the State of the issue and let us know if you have any questions.

  • Can someone help me create a script to repeat to simply open the dialog box to create a link?

    Can someone help me create a script to repeat to simply open the dialog box to create a link?

    the "Connect" command uses the same dialog box as the command to "Place", except for the option "Replace" verified... so, use Ctrl + Shift + P to bring up the place dialog box, select your new image and select the checkbox "replace".

    If check 'Replace' with the mouse slow you down, after you have selected your image, the tab key 'press' 3 times to change the focus, and then press the SPACEBAR to check it out, then ok to place.

  • SilverLight 4 creates more 2 000 registry entries.

    Why should SilverLight 4 create more 2 000 registry entries?

    Hello

     

    Your query can be answered by the Silverlight support team better. Refer to the link below and contact Silverlight for more assistance on the issue and the check-
    http://forums.Silverlight.NET/forums/13.aspx

     

    I hope this helps.

  • Urgent: how to create a shortcut with a relative path?

    I put a set of files and folders nested on a server on a network location.  (Use of office machines Vista; I don't know that the server is running.  The files are a text file and two Office 2007 files).  Users will copy this set-up files on their computer (there is a program of VBA macro in a Word document, they need).  They need tomorrow (Friday) and the shortcut path gives me fits!

    The hierarchy looks like:

    MainDir
    File.txt
    SubDir1
    Shortcut to the Word file
    SubDir2
    Word file
    Excel file

    I don't think even the paths associated with the shortcut until I looked a little deeper.  Because I put all the files and folders together on my computer, when I did a drag - move in the folder on the server, the target properties and start in the shortcut always pointed at my computer!  So now, I'm afraid that a user copy this on their machine will have a shortcut that points to ~ my ~ computer, instead of the file on their computer.

    I deleted the shortcut located on the server and creates a new one from the Word file in the directory on the server.  Better - I think - but it still points to the location of the server.  And it is even more likely that, when the user opens the shortcut, it will try to open the file on the server, vice the file on their computer.

    How can I create a shortcut to this Word file that will pick up the relative path from around where to reside?  I can just click > properties and change the target and start in paths?  Or do I need a VBScript or VBA?

    I have to get this done fast!  A kick - in the right direction is greatly appreciated.

    Ed

    Hi Ed,

    It is not possible to create a shortcut with a relative path.

    You can try the following allows to bypass and check if it helps:

    Create a shortcut to cmd.exe running the start command to open the current directory. Then set the MDC in the

    The shortcut properties.

    a. make a new shortcut to: cmd.exe /c start.

    b. now right-click on it and get the properties of the shortcut (shortcut tab).

    c. the shortened full path must have been set to this:

    %windir%\system32\CMD.exe /c start.

    d. set the directory of "start in" (i.e. DLG) to be a relative path:

    (Example for a shortcut on the desktop)

    ...\SendTo

    e. click on "change icon...". "and set" look for icons in this file: "to: %SystemRoot%\system32\SHELL32.dll and press ENTER.

    Standard folder icon will probably be in the lower right.

    f. now you can copy this file and simply change the "start in:" to make new related shortcuts directory.

    NOTE: The above steps are just an example, so try this at your own risk. And check if it works.

    You can also read the following article and check:

    Folder redirection fails when you specify the mapped network drive or the Environment Variable

    http://support.Microsoft.com/kb/321805

    You can check out the following link and also post your request in the Technet forum for further assistance:

    http://social.technet.Microsoft.com/forums/en-us/winserverPN/threads

    Hope this information is useful.

  • Cannot create more new folders in Windows 7

    Well this problem starts just today after the installation and uninstallation of some free Antivirus software I try for the first time. Before that, I was about to install a new burning program and I decided to create a manual restore first, point in case something went wrong. After you install Microsoft Security Essentials, I'm not too sure if that caused the problem, but that's when I noticed that I couldn't create more new folders when I click the button new folder in Explorer or when I right click and select new, there was no new folder option. I have a feeling this could very likely be a registry problem, but I have almost no idea how to manually re-enable it in the registry. There were a few solutions lying around and showing some tips on changing the context Menu, but whenever I tried to change the registry, I get an error saying that the changes may not be saved. I even download the ShellEX utility but noted the option new folder that if she was clearly not or just was not working as it should. I'll try to use the system restore to reload the manual restore point I had created, which I was when I was pretty sure that everythng was working fine. I hope that that would solve my problem, because there is not more updates update critical for me to install just might solve the problem. I hope that someone who has an alternative solution to what I do can provide details in response to this. Your help would be very appreciated.

    Hi Sop_the_Otaku,

    -Where exactly you are trying to create a new folder? It's somewhere on the C drive or on the desktop?

    However, you can follow the steps below and let us know the result.

    Step 1

    Try using the command prompt and try to create a new folder and check if you can create a.

    To do this, follow the steps below:

    1. click on start.

    2. in the start search box type CMD and press to enter.

    3 type cd... publicity and press ENTER, repeat the cd... and press ENTER until you have c:

    4. now, type the following at the command prompt:mkdir folder_name
    Here, folder_name is the name of desired folder

    5. check if the folder is created in the drive C

    Step 2

    Access the link below and follow the steps suggested by Linda YanonMonday, May 24, 2010 08:38 and check if it helps you to solve the problem.

    http://social.technet.Microsoft.com/forums/en/w7itprogeneral/thread/97de8a2a-12f2-4381-A409-a78f4ae551cf

    Step 3

    If the steps above do not perform a restore of the system on your computer and check to see if it helps you create a new folder

    To restore the operating system to an earlier point in time, follow these steps:

    1. Click Start, type system restore in the search box, and then click System Restore in the list programs.

    If you are prompted for an administrator password or a confirmation, type your password or click on continue.

    2. in the System Restore dialog box, click on choose another restore point and then click Next.

    3. in the list of restore points, click a restore point created before you started having the problem, and then click Next.

    4. click on finish.

    The computer restarts and system files and settings are back to the State they were in when the restore point was created.

    Access the link below to see the system restore:

    http://Windows.Microsoft.com/en-us/Windows7/what-is-system-restore

    I hope this helps. Let us know the results.

    Thank you and best regards,

     

    Srinivas R

    Microsoft technical support.

    Visit ourMicrosoft answers feedback Forum and let us know what you think.

  • Unable to open gmail and other google account services. Need urgent help. Firefox version is 29.0.1. Erasedeverythingcache/history + reset without addons.

    Unable to open gmail and other google account services. Need urgent help. Firefox version is 29.0.1. Deleted all cache and history + wiped without addons. Urgent help please. Same problem in other browsers ie opera/IE. Other Internet sites without problem.

    Personally, I've never had problems with ABP, but questions about ABP would be better answered in the AdBlock Plus forum where there are people more suited to respond as we only deal with technical support from Mozilla (e.. g the Fx of Firefox, Thunderbird, for Android)

  • How can I create more space on c/station of mine of mine window xp

    I want to create more space on c/station of mine, because it's full of this 100.

    so I can download several programs without problem

    I want to create more space on c/station of mine, because it's full of this 100.

    so I can download several programs without problem

    Probably not a Windows / Microsoft issue.

    • Do a basic cleaning.
    • Check the stuff you don't use every day to some external media.
    • Get a bigger hard drive and replace the one you have.

    Search for malware:

    Download, install, execute, update and perform analyses complete system with the two following applications:

    Remove anything they find. Reboot when necessary. (You can uninstall one or both when finished.)

    Search online with eSet Online Scanner. Delete everything is found.

    The less you have to run all the time, most things you want to run will perform:

    Use Autoruns to understand this all starts when your computer's / when you log in. Look for whatever it is you do not know usingGoogle (or ask here.) You can hopefully figure out if there are things from when your computer does (or connect) you don't not need and then configure them (through their own built-in mechanisms is the preferred method) so they do not - start using your resources without reason.

    You can download and use Process Explorer to see exactly what is taking your time processor/CPU and memory. This can help you to identify applications that you might want to consider alternatives for and get rid of all together.

    Learned things that start when you turn on the computer and what you really need? Cut of those that you don't need? Seen what is really using the resources on your computer?

    Do a house cleaning and the dust of this hard drive:

    You can free up disk space (will also help get rid of the things that you do not use) through the following steps:

    Windows XP should take between 4.5 and 15 GB * with * an Office suite, editing Photo software, alternative Internet browser (s), various Internet plugins and a host of other things installed.

    If you are comfortable with the stability of your system, you can delete the uninstall of patches which has installed Windows XP...
    http://www3.TELUS.NET/dandemar/spack.htm
    (Especially of interest here - #4)
    (Variant: http://www.dougknox.com/xp/utils/xp_hotfix_backup.htm )

    You can run disk - integrated into Windows XP - cleanup to erase everything except your last restore point and yet more 'free '... files cleaning

    How to use disk cleanup
    http://support.Microsoft.com/kb/310312

    You can disable hibernation if it is enabled and you do not...

    When you Hibernate your computer, Windows saves the contents of the system memory in the hiberfil.sys file. As a result, the size of the hiberfil.sys file will always be equal to the amount of physical memory in your system. If you don't use the Hibernate feature and want to reclaim the space used by Windows for the hiberfil.sys file, perform the following steps:

    -Start the Control Panel Power Options applet (go to start, settings, Control Panel, and then click Power Options).
    -Select the Hibernate tab, uncheck "Activate the hibernation", and then click OK. Although you might think otherwise, selecting never under "Hibernate" option on the power management tab does not delete the hiberfil.sys file.
    -Windows remove the "Hibernate" option on the power management tab and delete the hiberfil.sys file.

    You can control the amount of space your system restore can use...

    1. Click Start, right click my computer and then click Properties.
    2. click on the System Restore tab.
    3. highlight one of your readers (or C: If you only) and click on the button "settings".
    4 change the percentage of disk space you want to allow... I suggest moving the slider until you have about 1 GB (1024 MB or close to that...)
    5. click on OK. Then click OK again.

    You can control the amount of space used may or may not temporary Internet files...

    Empty the temporary Internet files and reduce the size, that it stores a size between 64 MB and 128 MB...

    -Open a copy of Microsoft Internet Explorer.
    -Select TOOLS - Internet Options.
    -On the general tab in the section 'Temporary Internet files', follow these steps:
    -Click on 'Delete the Cookies' (click OK)
    -Click on "Settings" and change the "amount of disk space to use: ' something between 64 MB and 128 MB. (There may be many more now.)
    -Click OK.
    -Click on 'Delete files', then select "Delete all offline content" (the box), and then click OK. (If you had a LOT, it can take 2 to 10 minutes or more).
    -Once it's done, click OK, close Internet Explorer, open Internet Explorer.

    You can use an application that scans your system for the log files and temporary files and use it to get rid of those who:

    CCleaner (free!)
    http://www.CCleaner.com/
    (just the disk cleanup - do not play with the part of the registry for the moment)

    Other ways to free up space...

    SequoiaView
    http://www.win.Tue.nl/SequoiaView/

    JDiskReport
    http://www.jgoodies.com/freeware/JDiskReport/

    Those who can help you discover visually where all space is used. Then, you can determine what to do.

    After that - you want to check any physical errors and fix everything for efficient access"

    CHKDSK
    How to scan your disks for errors* will take time and a reboot.

    Defragment
    How to defragment your hard drives* will take time

  • How can I create more space in my virtual memory

    How can I create more space in my virtual memory

    In fact this post with this link is pretty bad.

    Virtual memory used by xp as ram memory, however the memory or

    swap file is on the hard drive. For a pc of refrence memory from a hard drive is very slow

    compared to the RAM. Most of the technicians want to eliminate virtual memory as well

    as possible, making the use of ram pc instead. For a better link, go to.

    http://TechNet.Microsoft.com/en-us/library/cc751291.asp

  • I need to address and mail about 100 letters y at - it a program that can help me do more efficiently...

    I need to address and mail about 100 letters y at - it a program that can help me do more effiently...

    I need to address and mail about 100 letters y at - it a program that can help me do more effiently...

    ====================================================
    If you have Microsoft Word, you can use the mail merge:

    Microsoft Word 2010 - use, fusion, and mail merge to create and print letters and other documents
     
    Microsoft Word 2010 - make labels for a mass mailing
     
    (294683) how to use mail merge to create form letters in Word
     
    Microsoft Office Word 2002, 2003 - Word mail merge: a walk through the process

Maybe you are looking for