Copy the instructions of a function in to another

Hi there I'm using AS2.0 from an older project as the process to transform into AS3 would be too overwhelming for me.

I want to know...

Is it possible to copy a statements of duties in another different function.

I have thought about using global vars and will if I have to, but it would be much more convenient if possible for the application.

The reason - I do a game.

I have an NPC that carries its own variables declared at the time of loading, when the player speaks to the NPC that it passes variables on the _root, allowing the text window display the message/discussion of the NPC said.

I use a main "npc-brain", so that when it is moved to the stadium, the same code and actions are performed for each NPC and variables can be changed by typing of _parent NPCS - this allows instances of the same MC modified by changing just the variables on the _parent.

It works fine but I want now to NPCs to trigger their own functions.

I want THAT NPC s to perform the functions that are declared on the charge, all as variables, and when the right parameters are met, add this function to the root, so that she can be declared separately form the NPC brain when parameters are activated from the separate textbox / discussion MC.

I have some other ideas, but it would be more comfortable.

hoping to create something that would work like this:

_Global. NPCfunction = function () {} = _parent.function1 () {trace ("blabla")};

/ * Global NPC function takes all the statements of the MC parent feature, it will trace blabla * /.

Really just need to know if its possible to copy all the instructions a function in another function to another level. If this isn't the case, I should be able to pursue other options on my own. It would be just more convenient for the particular situation, as it turns out.

Other things that would solve this well are converting a local function in a global function / move automatically the function at the global level

Or a possibility to create a set of instructions that are inactive outside a function, that can be used when the function is called to write the function automatically with the variable declarations.

Yet once don't even know if this is possible, but it would be very useful.

You can use:

_Global. NPCfunction = _parent.function1;

to set _global. NPCfunction assuming that _parent.function1 is already set.

but it would be better to create an NPC class containing the functions and variables common to all NPCS.  each particular NPC would inherit from this class and also to define additional variables and functions necessary for this character and, if necessary, replace some (or all) of the methods and variables NPC.

Tags: Adobe Animate

Similar Questions

  • Error message "unable to copy the file"hiberfil", it is used by another person or program." Problem copying content from your PC to external hard drive.

    Original title: problem to copy content from your PC to external hard drive.

    I use Windows XP 2000 and am trying to restore my pc to factory settings as it is continuously 'stick '. When you try to copy my drive "c" on an external drive I get a message saying "unable to copy the file"hiberfil", it is used by another person or program." Close any program that might be using the file and try again "." What is 'hiberfil' and how do I close it down as I am not aware that I use?

    Concerning

    Pete

    The hiberfil.sys will be created every time that you start... If you put in hibernation enabled in your control panel, Power Options and the file is 'open' to think that you can actually choose to Hibernate at any given time.  When you Hibernate XP gives a note of it and will write a hiberfil.sys sometimes important in the c:\ folder so that when XP fires again upwards and returns from hibernation, XP will read the hiberfil.sys file and return to the situation that you were in when you put into hibernation.

    I use to be a chronic hibernant because it takes less time to return after hibernation as a cold start.  Sometimes, it can actually be slower that a cold so start your system based on the amount of RAM has.  The more RAM you have, the more your hiberfil.sys will, if sometimes it's faster to move with just a cold start if you Hibernate (26,03 seconds for me).

    If hiberfil.sys is giving you a hard time (you would not in any way copy it) disable hibernation in your Power Options and the file will be deleted immediately since it would be is no longer necessary.  That would solve this, but if you are trying to copy the entire C drive, you will have other files to complain after that.

    It is certainly possible to make a complete copy of the C drive, if you want, but you will have to initialize on something next to your drive hard if you want to do this so the XP files are not used - then you can copy anything and everything.  You can get some imaging software of disc that will also help you.

    It depends on what the problem is you want to solve and what you wand to end up with when you're done (so far, unspecified).

    I would work on figure our why your XP is paste and fix it in place.  XP should not be sticky.

  • Copy of complete site. I have a Web site. I would copy the entire site (complete with images) to another directory with a different name. Then, transfer to another hosting server. All ideas

    Copy of complete site. I have a Web site. I would copy the entire site (complete with images) to another directory with a different name. Then, transfer to another hosting server. Any ideas?

    Not sure that you need a different directory.

    If you are working on a local computer, create a new site with all the same settings for local files and change the remote server settings to match the second server.

    This ensures you that there is no difference between the two websites.

  • Can I copy the contents of a form field to another field with toggle checkbox?

    Would it not possible to copy the contents of a form field to another field in the form once a checkbox is disabled?

    I have several form fields that require form-fill to enter their initials.  Rather than repeat this 20 - 30 times on a form, they would like to be able to write their initials somewhere and that their initials copy in another form with a checkbox Toggle field.

    So, I have a field called 'initial' and each of the original boxes are "init_entry1" "init_entry2" etc.

    The boxes for these areas are "check_entry1" "check_entry2" etc.

    This would be possible with scripts?  Or are there better ways to accomplish the initial AutoComplete with a checkbox toggle?

    You can use a code like this in the MouseUp event of your box:

    If (getField("Check_Box1").value! = "Off")

    getField("Text2").value = getField("Text1").value;

    else getField("Text2").value = "";

    Of course, you have to adapt the names of the fields.

  • How to copy the message filters for an email to another account email account

    have a filter of msg in a single email counts with many entries - how to copy this msg filter to another account

    If you want to duplicate a filters of accounts to another account, you don't need to create them again. Output of Thunderbird and copy the file "msgFilterRules.dat" instead. If the account is in a different profile and it uses custom headers, you will also need to copy the parameter mailnews.customHeaders to prefs.js.

  • Copy the package/procedure of a diagram to another diagram

    Dear all,

    I have two of the schema in a single database. I need to copy all A scheme procedures in scfhema B.Is there an easy way to copy only the packages and procedures? If there is no code existing please let me know.

    Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production

    PL/SQL Release 11.2.0.1.0 - Production

    "CORE 11.2.0.1.0 Production."

    AMT for Linux: Version 11.2.0.1.0 - Production

    NLSRTL Version 11.2.0.1.0 - Production

    Regsards,

    S.Balraj

    Dear all,

    Here's the good explantion

    http://www.ulaska.com/Oracle/copy_object_between_schemas.html

  • I copied the photo library on external drive, and that one photo now shows despite the file being 70 GB.

    I had a library in iPhoto on an external HARD drive, and it worked. This is a disc plu so I decided to replace it with a new one that doesn't take much space on my desk. I copied the library through an external DRIVE to another drive, and it seemed to work. However, it now shows that a single photo despite being listed in the file manager as containing more than 70 GB.

    I explored a bit further in the file using finder and preview and found many files sorted by date. The photos seem to be all there, but they appear in iPhoto when I switched to this library. Always only one picture appears.

    I decided to convert the copied pictures from iPhoto library and it took a lot of time to convert, but the converted library always display just a single photo in Photos when I switch to this library.

    I could import all of them individually, but it's a big enough job, if there is a way to get libraries to work correctly.

    Any suggestions?

    We need the details - what format is the drive? How is it connected? It serves a TM backup Volume? How you copied the library itself? The library still works fine on the old drive? anything else you can tell us which could help a total strange who don't see you help?

    LN

  • To copy the Gradient slider

    Hi Sir/Mdm,

    I am facing a problem in copying the Gradient slider from one object to another object. I used the eyedropper tool, click on the left sleeve and click on the right sleeve to copy the gradient but the cursor appears to be different, as shown below. Please advise me how to copy the Gradient slider identical to the original that I created. Below is the screenshot to describe my problem. Thanks in advance.

    gradient.jpg

    In this case, you can convert the gradient "Radial" and assign the same gradient left and right form, at the same time, with the gradient centered at the neck.

    If you must stick with linear gradients, just "reflect" the left shoulder on the vertical axis. If you use the new form or not, you now have the exact angle of gradient that can be transferred to the right shape.

  • I can't copy pictures or videos of my Photos updated app. If I try to export the app freezes. When I try a copy/paste or do drag function only a miniature photo is placed in the destination. Is there a solution?

    Photos app freezes when I try to export photos or videos.   When I try a copy/paste or do drag function only a photo thumbnail is generated on the destination.  Is there a solution?

    Welcome to the Apple community.

    Try to repair the library holding down ⌥ ⌘ at the launch of the app.

  • Trying to create a bootable Windows 7 x 64 Flash drive. Get the "invalid MS-DOS function" error message when you try to copy the file 'bootsect.exe.mui' of the Windows ISO on Flash drive

    The title pretty much everything said.  I have an installer the ISO of Windows 7 Professional x 64.  I am trying to create a bootable flash drive using these instructions:

    http://www.OSNews.com/story/20795/Installing_Windows_7_on_the_Aspire_One_or_Any_Other_Netbook

    I followed all the steps in the guide without problem.  Windows Explorer shows the drive is NTFS.  I can copy all other files of ISO on the FlashDrive without problem.  Only, I can't copy this file.  I tried to copy it to my hard drive rather than on the flash drive, and it still does not work.

    I tried to create a file with the same name by using Notepad to see if there was a problem with the file name.  I can copy this file on my hard drive flash drive, but I can't always copy the ISO file.

    I am running Windows 7 Home Premium x 64 edition and using a Corsair Flash Voyager 16 GB flash drive.

    Help, please!

    Download Windows 7 USB/DVD tool
    http://store.Microsoft.com/help/ISO-tool

    Create a bootable USB:
    http://www.victorchen.info/create-a-bootable-USB-memory-stick/

    Install Windows 7 from USB drive/key
    http://www.MaximumPC.com/article/HOWTOs/how_to_install_windows_7_beta_a_usb_key
    http://www.windowsvalley.com/blog/install-Windows-Vista-and-Windows-7-using-bootable-USB-storage-device/
    http://www.intowindows.com/how-to-install-Windows-7vista-from-USB-drive-detailed-100-working-Guide/
    http://TechNet.Microsoft.com/en-us/magazine/dd535816.aspx

    How to install Windows 7 from a USB drive without Windows 7 ISO DVD
    http://www.Blogsdna.com/2016/how-to-install-Windows-7-from-USB-drive-without-Windows-7-ISO-DVD.htm

    How to install Windows 7 from a Flash drive with XP or Vista:
    http://www.legitreviews.com/article/1031/2/

    JS
    http://www.PAGESTART.com

    Never be afraid to ask. This forum has some of the best people in the world to help.

  • followed all the instructions to copy files in the profile directory failed

    all files named from the old profile are new profile when firefox look any of the bookmarks etc are displayed - what to do now?

    "... "'old' files appear in the new profile but are re-created after firefox starts empty.

    Sounds like Firefox cannot have been closed completely when the files have been copied, or the copy and replace files with the same name did not. Windows should have asked if you want to replace each old file with the 'copied' version, and that didn't happen to you ignored.

    Or you copied the files in the profile \Local Sattings\App Data\ folder and not the profile folder OK \App Data\ - , but that would not have re-created empty files.

  • I created a Subvi to copy the Boolean status to my main VI, but I failed

    I created a Subvi and wanted to copy the Boolean status in my main vi, I wrote a simple code in the Sub - VI, but I can't achieve my goal in the mainVI,

    I know that I don't have to create a Subvi but only VI to do this work, however, out Boolean is the only function of my work, the Subvi has other things to do

    so to do this correctly, what should I do?

    Thank you

    Goto main block diagram, instructions are here...

  • HP 6600 - loud pop on Cart 4 times on power. do not scan, fax or copy the message

    I removed print completely, powered carts and save again, it appears that something is broken and gives me the message that it is unable to scan, copy or fax.

    I can send something to print on the printer and it works perfectly fine.

    I did a check and it is still under warranty but I can't understand how to get in contact with someone on the way to get it fixed!

    Hey @Jmartax,

    Thanks for getting back to me on this subject.

    It's definitely a hardware problem. This hardware problem may be a broken internal part, or it may be caused by a lack of programming on your product. To determine if the programming is the cause and if we are able to solve this problem, I will send you a private Message with instructions on how to perform a reset of programming full semi on your printer. Once the reset is complete I'll you test the scan or copy the function to see if everything is working properly.

    Please check your private Messages to get instructions on how to perform the reset. View the results of zeroing in this thread and not in the private Message.

    Good luck!

  • Error: "Setup cannot copy the NTLDR file" installation of SP3

    original title: try to day XP Professional SP2 to SP3, but a 'copy' error "Setup cannot copy the file NTLDR.

    Try to XP Professional Service Pack 2 update for... SP3, with "The Wizard software update Installation" through "automatic Microsoft updates.
    Everything is going very well until a "Copy error" window saying:
    "Setup cannot copy the file ntldr.
    It gives 3 options
    1: "Retry" (does not work)
    2nd: 'Cancel' ('do you want continue Setup without copying this file?' by clicking 'Yes' gives 'Warning', "" If you cancel copying this file Windows might not work correctly. "") "Are you sure?) and
    3rd: "Browse..." So I just restart and... "The installer was interrupted..." Restore the previous configuration... "And here I am with sp3 refuses to read its own files!
    Any suggestions?
    Thank you

    PS. : Before installation I disable the Avast! Anti-virus service. No daemon or alcohol 120% installed.
    No other problem except when I try to update to the latest ATI AGP adapter CCC (catalist control center) I got a "failed to install".

    Information on the machine:

    Operating system: Windows XP Professional (5.1, Build 2600) Service Pack 2 (2600.xpsp_sp2_gdr.100216 - 1441)
    Language: English

    System manufacturer: Dell Computer Corporation
    System model: OptiPlex gx270s
    BIOS: Phoenix ROM BIOS MORE Version 1.10 A06
    Processor: Intel (r) Pentium (r) 4 CPU 2.60 GHz (2 CPUs)
    Memory: 1022MB RAM
    FG 0, 015 M/b: Dell Computer Corp.
    Chipset: Intel i865PE
    NorthBridge: Intel i865PE
    SouthBridge: 82801EB/ER (ICH5/ICH5R) LPC Interface Bridge Disk Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) EIDE
    HARD drive: Maxtor 6E040L0
    AGP: ATI Radeon HD 2400 Series

    You can trust in the security of any computer used until you have formatted the hard drive & then did a clean install of Windows.

    Note: The free version McAfee to test which is preinstalled on the computer is now permanently disabled .

    Follow the instructions in this post of mine in another forum (to-the-letter & in order! ) to return the computer to a State safe & functional: http://aumha.net/viewtopic.php?f=62&t=44636

    If you need additional assistance with the clean install, please start a new thread in this forum: http://answers.microsoft.com/en-us/windows/forum/windows_xp-system

    Note: The computer must NOT be connected to the internet or local area network (i.e. other computers) in its current state. All your personal data (e.g., banking online & passwords credit card) must be considered at risk, if not already compromised.

    Wish I had better news for you.  Good luck!

    PS: If you still think again your registry database must be cleaned, repaired, amplified, to the point, healed, twisted, fixed, enlarged, "swept" or optimized (it isn't), read http://aumha.net/viewtopic.php?t=28099 and draw your own conclusions. See also http://blogs.technet.com/markrussinovich/archive/2005/10/02/registry-junk-a-windows-fact-of-life.aspx

  • How to copy the address bar

    Once upon a time in a browser, there was an EDICT to copy the link into the address bar. I would like to have this feature because it is difficult to highlight the address so it can be copied to the generic copy.

    I searched mozilla for this function and the search function does not seem to recognize the term copy. The results include all kinds of things to do with the address bar, except the copy.

    Thanks to all those who have provided a response & being persistent. I have been using the right click and select copy from the drop-down;

    As I'm used to, I like it better than the selection on the Edit menu.

    Reminds me of one of my desk at work buddies - whenever I asked him how to do something, the answer was always - right Click & it has always worked.

    I'll have to keep that in mind.

    I think it only working not once in this case. The slider was probably placed in the address box.

    Thanks again for the advice.

Maybe you are looking for

  • How to create a recovery Partition?

    Hello I recently bought a MacBook Pro mid 2015 and immediately on the SDS for a level 1 to one. A few days after I had problems starting (never had in 6 years!), and after a few days, I have (fortunately) had solved the problem and my Mac works OK no

  • Apple music not even on iMac iPhone

    In music from Apple on the iPhone, you can select an album you own and the next screen is the music you have and options to follow this artist and also see this artists albums, songs, etc.   I don't get this screen on iTunes on my iMac.  I just get t

  • A60-302 Sound and Modem problems after wake up

    I use a laptop A60-302 with Greek WinXP.My problem is that after always and sometimes even sleepAfter the start, the sound card is dead and I have to restart to hear something. The same thing happens with the Toshiba Modem.I did the last update for t

  • Music cd or data cd?

    I have always used the CD "music" to create playable and data disks for easy storage. Windows XP Inside Out explicitly stated that the difference was significant. Recently I was informed by the sellers that there is no difference between a CD - R (fo

  • Mail app ctrl + enter doesn't send emails

    When you use the Windows 8 mail application, I would like to send e-mail by using ctrl + enter mail. It has worked before in the mail application, and now the feature is removed. Both on Windows 8 and Windows 8.1 (guess it's the same application) Is