How can I control a button from a swf file to another swf file?

Hello

I have a file main.swf . From this file I can access the file external.swf which is an external file.

Now, how can I write code on my file main.swf to the button that is on my external.swf file?

Activities.MainPanel.close_btn.addEventListener (MouseEvent.CLICK, btnClickClose);

Activities.MainPanel.close_btn (This button is actually the external.swf file, but I want to write code on main.swf file to run it on external.swf) How can I control a single swf in another swf file button?

Thank you.

Advertisement

Some examples of code that you should be able to adapt to your needs.

create a new instance of the loader object.

var loader: Loader = new Loader();

make the download request...

var request: URLRequest = new URLRequest ("external.swf");

Add a full event for the loader listener

loader.contentLoaderInfo.addEventListener (Event.COMPLETE, completeHandler);

start the actual loading process...

Loader.Load (request);

Create a new empty movieClip instance, you place the movie loaded into this movieClip after loading

var externalMovie:MovieClip;

This function is called when the download is complete and the file is ready for use.

function completeHandler(event:Event):void {}

set the contents of the film to the new empty movieClip...

externalMovie = MovieClip (event.target.content);

Add this new film to the display list.

addChild (externalMovie);

}

Now you can reference the film loaded with the name of the instance 'externalMovie '. So if, for example, you want to address a button in the film loaded, you can write something like that on the main timeline:

externalMovie.addEventListener (MouseEvent.CLICK, btnClickClose);

function btnClickClose(event:MouseEvent):void {}

}

Tags: Adobe Animate

Similar Questions

  • How can I remove the button from menu? The custom option doesn't seem to work for this.

    How can I remove the button from menu? [This IChing looking for three line on the toolbar icon].

    The tool bar Customize option doesn't seem to work, and it seems a waste to have a button that duplicates the menus. I would trade on the NoScript icon.

    Hi, I can not recommend that you do, but if you are really determined, this article can help.

  • When you open a Photoshop file with Bridge, how can I control what version of Photoshop, the file wil

    At the opening of a bridge of fthrough Photoshop file, how can I check which version of Photoshop, the file will open in?

    I store my PSD files that is adjacent to the original RAW file which it originates.

    If I open the folder and double-click this PSD file, it opens to the CS6. But, if I use the bridge (CS6) for access to and open the same file, it starts by is Photoshop CS5 and then opens this file PSD in CS5.

    How can I control which Photoshop will open a file then choose to open it through Bridge?

    Interesting, but it does not give any idea what I'm supposed to do. No Photoshop ducuments listed.

    Look at the PSD file on the location of Curt and Photoshop Document research. Beside him ideally should show Adobe Photoshop CS6 if you have Bridge open CS6. Click to provide the fly on the menu and choose the correct Photoshop from the list.

    But probably something went wrong with your installation. By default, Bridge chooses the latest version of PS to open its plug in.

    Maybe reset preferences may also help you. Can you provide more details about the version of the OS etc.

    And you have a good reason to keep your Raw and finalized in the same place files. Personally I put them aside and use a convention of appropriate filename (YYYYMMDD and details) so I can easily search the DNG files in my archives if I needed, but I don't make mistake by opening a bad

  • How can I control the size of the BMP file created by freeze frame tool?

    I use the first 13 items on Windows 7

    When I run the tool freeze frame it creates a still image (bmp file) from an image in my video clip.

    The bmp file size can vary from 6076 KB, 2701 KB or KB 1013 and seems to be independent of the type of item (MPEG, MOV, AVI), size (1366 x 768, 1280 x 720, 1920 x 1080, 320 x 180, 720 x 480) or rate (29.97, 29,55. (29.04 25.00, 24.00) video.

    The size of the image seems to depend on the project folder, in which it was created.  The same clip can produce a 6076 bmp or bmp file 2701 whereby one project (prel) the tool Freeze Frame files was performed.


    I searched everywhere for a project setting that could establish a size by default files for output, but it seems not to be.


    Is it possible to control the size of the bmp file generated by freeze frame?   I need consistency,


    Thank you.

    David_F wrote:

    ..... For example, text on a 2701 KB file annotations appear more important than those on the 6071 KB file when clips of two different subprojects are combined in the master.

    .. .dimensions of image file 6076 KB (20 x 11/5 inches)

    Re thinking, try a few things and this sentence convinces me that you mix dimensions of the image in pixels and the size of the file in KB.   In addition, digital images have in. up to put on paper or screen.  All they have is the pixel dimensions.  Each pixel can have a lot or little information based on the color, brightness, etc. so the KB of size can vary even if the pixel dimensions only.

    I've set up a project in 640 x 480, put in a clip and freeze box a. BMP.  If you look at a file in Explorer and you pass the mouse over it, you get a date, size in pixels and size KB.  The result (you can see in the picture as an attachment) is the file with an image of 640 x 480, as the setting for the project.  In this case, a 900KO file size was necessary to store the data of this particular framework.

    If Visio is happy with JPEG files, there is a way through the publication & share > Image to better control the dimensions in pixels with settings under the Advanced button.  Using this method, I made a jpeg from the same exact with 1920 x 1080 pixel frame and 1,2 MB in file size.

    I am convinced that your changes in the size of the text are due to dimensions in pixels and have nothing to do with the size of the file.  Of course I was wrong more than once and tips can be useful what you actually pay!

  • How can I restore my bookmarks from an HTML file?

    I just installed Ubuntu 11.04, and I want to restore my bookmarks from an HTML file.

    This used to be accessible through the "bookmarks - > organize bookmarks ' menu item 'Organize bookmarks' no longer exists so I'm stuck.

    This help system seems to think that there is, however, so please note that on my system, it isn't. I suspect that hundreds, thousands or even millions of new users of Ubuntu 11.04 will have exactly the same problem.

    I don't think that users will be able to help with this one, unless someone knows how to restore the menu item 'Organize Favorites '. It is the only one that will do what I want and so there is no point recommending "Show all bookmarks" as a solution. It does not work.

    Finally, persuade this system that I don't really have a new problem that are not addressed in the FAQ section has been a very irritating experience. I wonder if Chrome will know what to do with my file "bookmarks.html"?

    "Bookmarks > organize bookmarks ' has been renamed to"show all bookmarks"in Firefox 4.

    If the menu bar is hidden, and then click the Firefox button to open the Firefox menu and click the bookmarks entry or click "Show all bookmarks" to open the library.

  • How can I transfer my photos from a macbook air to another?

    I am consolidating the photos that are on different with different usernames and passwords mac book airs.  How can I do the transfer?

    Use AirDrop

    iPhoto: transfer photos with AirDrop

  • How can I remove the button from the SPACEBAR on Satellite L350?

    I have a brilliant nine of Satellite L350, and a few drops of orange juice got splashed on the lower part of the keyboard.
    The keys are all very well, except the space bar.

    While this works, there only 'click' when pressed.
    Now I don't know if it's going to be interesting to try to raise the bar of space out and clean.

    If this is the case, I'd appreciate some instructions on how to extract.

    Thanks in advance.

    Hello

    Generally, all the keys on the keyboard are only glued on the keyboard and it should be possible to remove it easily.

    I couldn't remove my buttons with a thin object.
    I put the thin object under the button and put the space bar to use carefully.

    If you do this please be careful because if you use too much force, you may break some media.

    Good luck

  • How can I control a Mac from my Surface RT?

    I am looking for a simple remote desktop from my Surface to a Mac with os x.

    The function of standard screen sharing with OS - X is in fact based on VNC protocols and x 86 PCs the VNC wiewer should work. At present, there is no such software for the Surface, they have it for iOS and Android, so we can hope he'll come too soon.

    The main Server RDP for OS - X is a product called iRAPP from a developer coderebel. 14 days ago from the trial, but otherwise it's pay package. This should then allow the RDP client to connect to the Mac.

  • How can I control the paper with a PDF file trays

    At the moment we use postscript to specify which page of a document gets taken from what on our docutech/IGEN etc. paper tray. We are able to specify the source of paper by using InDesign and a third part application but so that the press in order to understand the command, we must present the work as postscript instead of a PDF file.

    How do do this with a 'modern' PDF workflow, by incorporating this information in the PDF itself through some means or is there some kind of external control I'm missing? PDF/VT does it take?

    Thank you

    Bob

    PDF is designed so that the job control is not placed in the PDF file itself. This control work including support pages are printed on what paper, tax parameters, finishing, etc. are placed in a job ticket, normally JDF, to print PDF streams. Some manufacturers have their own format of work ticket that specifies these parameters of the device instead of JDF dependent work.

    In the case of digital presses to Xerox Docutech and iGen, you should contact Xerox if you use their DFE (digital front-end server) or one that provides the DFE or Xerox for instructions on the construction of such a work.

    Regarding PDF/VT, this subset PDF standard is based on top of PDF/X-4. It provides no support for DPM (departure Metadata) that can be used to label individual pages as to what type of page, they are, for example a cover page, a page of text, a postcard, etc.. This label is then used by JDF (or any of the job your system ticket mechanism uses otherwise JDF) to provide guidance for how those pages should be handled (as a source of paper, taxation, duplex/simplex, etc..)

    -Dov (Chair, ISO TC130 WG2/TF2 - PDF / X;)

    Co-Chair, TF3/ISO TC130 WG2 - PDF/VT)

  • How can I extract an image from a .jpg file?

    Attached is a. JPG, I want to change.  I have a lot of drawing like this we would like to make a catalog.  I want to make all the doors of the thesis of the same image with transparent square bottom size.  I understand how to remove the bottom however when I try to adjust the size of my image it always adjusts my canvas size.  What I tried to do, is to have a layer of transparent background with the door image on a separate layer, but I'm not having any luck.  I'm new to PS, so my knowledge is limited.  Any help would be appreciated.  I use the extended version of CS4.

    610.jpg

    All your canvas sizes will have a consistent size? Door images too? Is this number? You can try this:

    1 make the active layer (Layer 1 instead of background) image

    2. Select the entire document outside the shape of the door (using the magic wand + add the number with lasso)

    3 remove the part of the image: it's transparent.

    4. go in picture, trim, all transparent pixels, what you're left with now is the part of the door of the image.

    5. go to the size of the image and put the dimensions in pixels of the door (hopfully not upsampling)

    6. flatten image

    7 go to the canvas size, set the size you want (as long as it is greater than the door) and a ratio of 1: 1 that you should now have a square bottom.

    I know that sounds like a lot of steps, but this can be automated into action. I do that all the time with photos of products that need to adapt to a standard window. Just another way to go, hope this helps...

  • How can I control position to look for SWF files loaded by the class Loader?

    I created a grid of buttons that, when clicked, will load a specific swf and each swf, I would like to play in a certain part of the scene.  When to use the Loader class:

    var my_loader:Loader = new Loader();
    my_loader. Load (new URLRequest ("abc.swf"));
    addChild (my_loader);

    the swf file is always displayed at the top left. Is an attribute of the individual SWFS that I am loading, or can I address the position in the main sequence?

    Thank you-

    Sean

    ...

    addChild (my_loader);

    my_loader.x = 500;

    my_loader.y = 250;

  • How can I extract the data from a csv file and insert it into an Oracle table? (UTL_FILE)

    Hi, please help me whit this query

    Im trying to extrate the data in a file csv and im using the ULT_FILE package
    I have this query that read the file and the first field, but if the field has a different length does not work as it should

    For example if I had this .csv file:

    1, book, laptop

    2, pen, Eraser

    3, notebook, paper

    And in the table, I had to insert like this

    ID descrption1 description2

    laptop 1 book

    Eraser pen 2

    paper laptop 3

    For now, I have this query, which displays only with DBMS:

    Declare

    -Variables

    Cadena VARCHAR2 (32767).

    Vfile UTL_FILE. TYPE_DE_FICHIER;

    Dato varchar2 (200);                                             -Date

    dato1 varchar2 (200);

    dato2 varchar2 (200);

    Identifier varchar2 (5): = ', ';                             -Identifier (en)

    v_ManejadorFichero UTL_FILE. TYPE_DE_FICHIER;     -For exceptions

    -Table variables

    I_STATUS GL_INTERFACE. % OF STATUS TYPE.

    I_LEDGER_ID GL_INTERFACE. TYPE % LEDGER_ID;

    I_USER_JE_SOURCE_NAME GL_INTERFACE. TYPE % USER_JE_SOURCE_NAME;

    I_ACCOUNTING_DATE GL_INTERFACE. TYPE % ACCOUNTING_DATE;

    I_PERIOD_NAME GL_INTERFACE. TYPE % PERIOD_NAME;

    I_CURRENCY_CODE GL_INTERFACE. CURRENCY_CODE % TYPE;

    I_DATE_CREATED GL_INTERFACE. DATE_CREATED % TYPE;

    I_CREATED_BY GL_INTERFACE. CREATED_BY % TYPE;

    I_ACTUAL_FLAG GL_INTERFACE. TYPE % ACTUAL_FLAG;

    I_CODE_COMBINATION_ID GL_INTERFACE. TYPE % CODE_COMBINATION_ID;

    I_ENTERED_DR GL_INTERFACE. TYPE % ENTERED_DR;

    I_ENTERED_CR GL_INTERFACE. TYPE % ENTERED_CR;

    I_ACCOUNTED_DR GL_INTERFACE. TYPE % ACCOUNTED_DR;

    I_ACCOUNTED_CR GL_INTERFACE. TYPE % ACCOUNTED_CR;

    I_TRANSACTION_DATE GL_INTERFACE. TRANSACTION_DATE % TYPE;

    I_REFERENCE1 GL_INTERFACE. REFERENCE1% TYPE;

    I_REFERENCE2 GL_INTERFACE. REFERENCE2% TYPE;

    I_REFERENCE3 GL_INTERFACE. REFERENCE3% TYPE;

    I_REFERENCE4 GL_INTERFACE. REFERENCE4% TYPE;

    I_REFERENCE5 GL_INTERFACE. REFERENCE5% TYPE;

    I_REFERENCE10 GL_INTERFACE. REFERENCE10% TYPE;

    I_GROUP_ID GL_INTERFACE. GROUP_ID % TYPE;

    BEGIN

    Vfile: = UTL_FILE. FOPEN ('CAPEX_ENVIO', 'comas.csv', 'R');

    loop

    UTL_FILE. GET_LINE(Vfile,Cadena,32767);

    dato1: = substr (cadena, instr(cadena, identificador,1,1)-1, instr(cadena, identificador,1,1)-1);

    dato2: = substr (cadena, instr (cadena, identifier, 1, 1) + 1, instr(cadena, identificador,3,1)-3);

    dbms_output.put_line (dato1);

    dbms_output.put_line (dato2);

    -The evidence

    -dbms_output.put_line (cadena);

    -dbms_output.put_line (substr (dato, 3, instr(dato, identificador,1,1)-1));

    -dbms_output.put_line (substr (dato, instr (dato, identifier, 1, 2) + 1, instr(dato, identificador,1,1)-1));

    -dbms_output.put_line (substr (cadena, 1, length (cadena)-1));

    end loop;

    UTL_FILE. FCLOSE (Vfile);

    -----------------------------------------------------------------------------------EXCEPTIONS------------------------------------------------------------------------------------------------------------------------------------------------------------

    EXCEPTION

    When no_data_found then

    dbms_output.put_line ('Todo Correcto');

    When utl_file.invalid_path then

    UTL_FILE. FCLOSE (V_ManejadorFichero);

    RAISE_APPLICATION_ERROR (-20060,'RUTA DEL ARCHIVO NULLIFIED: (');)

    WHEN UTL_FILE. INVALID_OPERATION THEN

    UTL_FILE. FCLOSE (V_ManejadorFichero);

    RAISE_APPLICATION_ERROR ('-20061,'EL ARCHIVO NO PUDO SER ABIERTO ");

    WHEN UTL_FILE. INVALID_FILEHANDLE THEN

    UTL_FILE. FCLOSE (V_ManejadorFichero);

    RAISE_APPLICATION_ERROR (-20062, 'INVALIDO MANAGER');

    WHEN UTL_FILE. WRITE_ERROR THEN

    UTL_FILE. FCLOSE (V_ManejadorFichero);

    RAISE_APPLICATION_ERROR (-20063, 'ESCRITURA ERROR');

    WHEN UTL_FILE. INVALID_MODE THEN

    UTL_FILE. FCLOSE (V_ManejadorFichero);

    RAISE_APPLICATION_ERROR (-20064, 'MODO INVALIDO');

    WHEN UTL_FILE. INTERNAL_ERROR THEN

    UTL_FILE. FCLOSE (V_ManejadorFichero);

    RAISE_APPLICATION_ERROR (-20065, 'ERROR INTERNO');

    WHEN UTL_FILE. READ_ERROR THEN

    UTL_FILE. FCLOSE (V_ManejadorFichero);

    RAISE_APPLICATION_ERROR (-20066, 'LECTURA ERORR');

    WHEN UTL_FILE. FILE_OPEN THEN

    UTL_FILE. FCLOSE (V_ManejadorFichero);

    RAISE_APPLICATION_ERROR ('-20067,'EL ARCHIVO ARE ESTA ABIERTO ");

    WHEN UTL_FILE. THEN ACCESS_DENIED

    UTL_FILE. FCLOSE (V_ManejadorFichero);

    RAISE_APPLICATION_ERROR (-20068, 'REFUSED ACCESS');

    WHEN UTL_FILE. DELETE_FAILED THEN

    UTL_FILE. FCLOSE (V_ManejadorFichero);

    RAISE_APPLICATION_ERROR (-20069, 'OPERACIÓN BORRADO FALLO');

    WHEN UTL_FILE. RENAME_FAILED THEN

    UTL_FILE. FCLOSE (V_ManejadorFichero);

    RAISE_APPLICATION_ERROR (-20070, 'OPERATION SOBREESCRITURA FALLO');

    END;

    Hello

    Try something like this:

    POS1: = INSTR (cadena, idntificador, 1, 1);
    POS2: = INSTR (cadena, idntificador, 1, 2);

    ID: = SUBSTR (cadena, 1, pos1 - 1);
    description1: = SUBSTR (cadena, pos1 + 1, (pos2 - pos1)-1);
    Description2: = SUBSTR (cadena, pos2 + 1);

    where pos1 and pos2 are numbers.

    Rather than use UTL_FILE, consider creating an external table.  You won't have to write any PL/SQL, and this means that you won't be tempted to write a bad article of EXCEPTION.

  • How to disable the cc button animate html5 canvas files?

    Hello!

    How to disable the cc button animate html5 canvas files?

    ex:

    this.mc.on('click',function(){alert('this')})
    this.mc.enabled=false
    

    question 1:

    When you click on the 'mc', it always run. How can I control the button of the deactivate and activate?

    question 2:

    The mc is not an image, it's a movieclip. How can I change the colors of the mc? example: default of the mc color red, I want to click change black!

    Thank you!

    use addEventListener instead of 'on '.  You can then use removeEventListener to disable.

    or you can intemperies to use 'on' using the mouseEnabled property to disable this.mc:

    this.mc.mouseEnabled = false;

  • How can I clear the notifications from the notification Center while I can not click on the delete button?

    How can I clear the notifications from the notification Center while I can not click on the delete button? I have an iphone with ios 9.3 6

    WBY can't you click on the white circle with an X in it next to the notification?

  • How can I control what FEED my CC from Adobe to?

    How can I control what FEED my CC from Adobe to?

    I did it!

    The cloud control creative program location

    CC App - file locations

    > Open creative cloud App (Image below)

    > Right click on it (gear, drop-down) (Image below)

    > Select and click on 'Preferences' (Image below)

    Applications TAB >-install Locatotion (F:\Programs)

    The files tab >-location of the folder (F:\)

    There you GO! (Image below)

    Useful links of video

    https://helpx.Adobe.com/creative-cloud/help/install-apps.html#download and install applications

    Download, installation, setting up

    How to properly set up the SSD as boot drive and the HARD disk as disk storage - YouTube

Maybe you are looking for

  • FaceTime/imessage journal by mistake on macbook 10.11.6.

    Hello I have problems with my login Factime/imessage on macbook 10.11.6. I did all the appleid checking online and my facetime/imessage works perfectly on my iphone. I deleted all the antiviruses MacBook and restarted my macbook several times. But I'

  • T400 - 226532G - Power Bishop

    Installed the last PM 6.66.3. When you click on the battery PM icon to start the PM it appears only as another red icon in the field of activity. Impossible to implement... Just found out that the same happends with Rescue and Recovery 2.7.003 Any cl

  • Exeuting my labview on two monitors project

    Hey guys,. I have the license on my laptop, but once I have the finished code, I am looking to just run the code on two monitors in the testine automated rather than upgrade the license on these screens. Is it possible and if yes, how can I achieve t

  • AnyConnect Secure Mobility Client, the Module of access network, wired PEAP

    Hello I tested AnyConnect Secure Mobility Client, Module of access network as supplicant with PEAP authentication for wired network users. With the default configuration it works well.  With the default configuration is to trust the root CA certifica

  • Gmail load so slow on Windows RT 8.1.

    Gmail load so slow on Windows RT 8.1. He always loaded slow on RT. He used to take about 5 seconds to load. Now it takes 30 seconds to load. This worked OK we I had 8.