MovieClips, buttons and tables - oh the joys

I have a question also work with arrays, im not much less fpash but decided to try a different approach to writing over and over again the same functions to different buttons.

The plan is intended to be:

6 buttons in movieclip on the stage (markers) and 6 boxes of movieclip on the stage (panels). Click on a marker and the fade, it plays in the animation in the control panel.

access/call the close button.onRelease function; situation within the animation movieclip movieclip original panel (p1.p1_an.close_btn) then call rewindframes(); to falter again the sign in box departure.

Repeat for all 6 buttons and clips.

Here is my code. I know its probably got something to do with the strings and converting values to objects etc. but I tried so many things, I can't work.

Help, please

stop();

var myMarker = new Array (marker1, marker2, marker3, marker4, marker5, marker6);
var myPanel = new Array(p1, p2, p3, p4, p5, p6);

//***************************//
// Markers buttons
//***************************//

for (var i = 1; i < myMarker.length; i++)
{
    myMarker[i].onRelease = function()
    {
        play();//fadeout markers
        
        playPanel(myPanel[i]); // play panel 1 to 6 depending on marker clicked    
        
        this[myPanel[i] + "." myPanel[i] + "_an"].close_btn.onRelease = function() //location of close button example - p1.p1_an.close_btn
        {
            rewindFrames(myPanel[i]); // function to rewind frames of panel fade in animation back to frame 0;
        };
    };
}

//***************************//
// Play Panel
//***************************//

function playPanel(panelName)
{
    panelName.play();
}

//***************************//
// Rewind Panel
//***************************//

function rewindFrames(panelName)
{
    panelName.onEnterFrame = function()
    {
        if (panelName._currentframe != 1)
        {
            panelName.prevFrame();
        }
        else
        {
            panelName.stop();
            delete this["onEnterFrame"];
        }
    };
}

//***************************//
// Fade in Markers
//***************************//

function fadeInMarkers()
{
    onEnterFrame = function ()
    {
        if (_currentframe != 30)
        {
            prevFrame();
        }
        else
        {
            stop();
            delete this["onEnterFrame"];
        }
    };
}

use:

stop();

var myMarker = new Array (marker1, marker2, marker3, marker4, marker5, marker6);
var myPanel = new Array(p1, p2, p3, p4, p5, p6);

//***************************//
// Markers buttons
//***************************//

for (var i = 1; i < myMarker.length; i++)
{myMarker[i].ivar=i;     myMarker[i].onRelease = function()
    {
        play();//fadeout markers

        playPanel(myPanel[this.ivar]); // play panel 1 to 6 depending on marker clicked    
// the line below looks screwy. but if there really is a p1.p1, p2.p2 etc this is one way to encode it

myPanel[this.ivar][myPanel[this.ivar]._name].close_btn.onRelease = function() //location of close button example - p1.p1_an.close_btn
        {
            rewindFrames(this._parent._parent); // function to rewind frames of panel fade in animation back to frame 0;
        };
    };
}

Tags: Adobe Animate

Similar Questions

  • My iphone 6 does not light, I held the home button and power at the same time and no vibration or no sign of life, any suggestions as to what it could be would be appreciated

    Phone bought 3 days ago and I fight to turn it on, it's just a black screen, the phone records into iTunes but does not turn, I tried holding down the home button and power at the same time and still nothing, I presume that it's a battery problem as if it was the backlight then the phone vibrated when you press the power button help Please!

    Marley6921 wrote:

    Phone bought 3 days ago and I fight to turn it on, it's just a black screen, the phone records into iTunes but does not turn, I tried holding down the home button and power at the same time and still nothing, I presume that it's a battery problem as if it was the backlight then the phone vibrated when you press the power button help Please!

    Put it on wait ten minutes if the phone did not come one, then hold down the sleep/Home button until you see the apple logo and then release, make sure that the phone is still connected to the charger.

  • Copy of an existing MovieClip instance and pushing on the table

    Hello

    Here's what I'm trying to do:

    I have an array of instances of clip called [iconArray].

    what I want to do is to create the effect of moving the icons on the screen left or right. Lets say we are changing the icons on the left - what I want to do is the icon on the left (iconArray [0]: MovieClip) to interpolate left on 20-30 pixels and then fade out, I can achieve at present. The problem is I want to copy of the instance of this interim MC icon and push it iconArray and then the melted in the interpolation of the right.

    In other words, the left most icon should "Pack" back around to the position of the icon mostly right but in order to create the illusion without going through the left most icon pass on the other icons (which seems sticky), I want to create a copy of the left most icon and press it in the table as a new movieclip with the same image and have this right fade While the other is dying off the coast.

    Here's my best interpretation of ascii:

    <-* fade out *-[iconArray (0)] <-iconArray (1) <-iconArray (2) <-iconArray (3) <-iconArray (4) <-* bland in *-(iconArray (5) * COPY of iconArray (0) *)

    Now that you understand what happens if all goes well, I cannot copy table [0] and pushing at the end of the table. When I do:

    var mc_temp:MovieClip = new MovieClip();

    mc_temp:MovieClip = iconArray [0];

    iconArray.push (mc_temp);

    It does not create a new icon, seems to point to the same clip as iconArray [0] and any adjustment that I do x or alpha affect the original MovieClip instance and not the news I created and placed on the table.

    How should be done on a copy of a movieclip, storing in its own instance/var, so it can be displayed and manipulated as a separate entity?

    What you have described initially and I think you're describing now are not the same things, or maybe they are simply not what I think you are trying to do.  What you need to do, it's first move the element to the left and it melted.  Have a listener for when the fade out is completed and have this listener call another function that changes the position x of which faded to movieclip immediately at the other end of the Group and start an another tween to fade.

    I have not worked with the Oregon Tweener sufficiently to be able to tell you how to implement the event listeners.

  • HOW TO REMOVE THE NAVIGATION BUTTONS AND ICONS IN THE HOME SCREEN IN FF13

    The new version of Firefox 13.0 has just installed and I find the icons and the navigation buttons on the homescreen annoying and distracting and I want to remove them and leave everything else as is. Is there a way to do this easily? Thanks for the help.

    Add code to the file in the chrome folder userContent.css

    Customization files (interface) userChrome.css and userContent.css (Web sites) are located in the chrome folder in the user profile folder.

    See also:

    @-moz-document url(about:home){
     #launcher { display: none !important; }
    }
  • How can I add some radio buttons and textbox on the Web

    Hi friends,

    I have a few critical requirements for my application:

    1. There should be a background image.

    2. I need to have 2 radio buttons and a text box. where the user is allowed to give feedback.

    How can I achieve this requiments.

    What ui component I need to use: form or canvas.

    If form, so how can I set the background.

    How can canvas, I add the boxes to option and TextBox.

    can someone suggest me please.

    Thank you

    Maury.

    Thank you very much for your answer.

  • Editing buttons and links in the edition in the browser.

    Hey guys,.

    I use Adobe Muse lately and it's great to discover this new feature of change 'in the browser.

    However, it only works on strings of text and images, if I put a text with a link, I'll be able to change the text, not the link.

    Still more, if I have to highlight a shape (Rectangle) and set the background of an image to form a button with different States, I won't be able to change it at all in the In-Browser editing.

    Is there a way to in Broswer edition that I can change the object (inserted) HTML, image with link (change the link to the other), text with link (by changing the text and the link) and the button with link (link by changing)

    Thank you!

    When create you a Web site for someone and want to use this feature. Apart from Muse your coding of your site Business Catalyst, forming models and development of the site.

    You use this:

    http://helpx.Adobe.com/business-catalyst/partner/defining-InContext-editing-editable-Regio ns - 1.html

    Form controls you want to have with the incontext Editor to your form of models/content.

  • When to recreate queues and tables of the queue in QA?

    When recreate us queues and queue tables when you use Advanced Queuing? Is there an advantage in doing this?

    dbms_aqadm.stop_queue)
    dbms_aqadm.drop_queue)
    dbms_aqadm.drop_queue_table)

    dbms_aqadm.create_queue_table)
    dbms_aqadm.create_queue)
    dbms_aqadm.start_queue)

    Also, can you please let me know what is the difference between the queue and queue table? I'm newbie and not able to get help on that. I had a little of that first we can create the queue table and then create the queue. Any help would be appreciated.

    Why do you want to "recreate" the queues and queue tables?

    Read the documentation of

    DBMS_AQADM.ALTER_QUEUE
    and
    DBMS_AQADM.ALTER_QUEUE_TABLE
    

    and see if you can get out without falling and re - create

    In the contrary case; do some reading on how to manage queues, to drop, modification and creation!

    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14257/aq_admin.htm#i1005956
    and
    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14257/aq_admin.htm#i1006297

    If you want to change the payload type, you need to remove the queue and re-create it, in which case read on drop, keep in mind the STOP_QUEUE!
    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14257/aq_admin.htm#i1006355

    Similarly for the DROP table queue!

    P;

  • Save the data on the button and then save the data on a spreadsheet on another key.

    Hello

    I am a new user of Labview. I'm developing a Labview 7.1 program that will record data on the keys. Another button, he must stop recording, and then open a file dialog box to save the data stored on a worksheet. I read in this forum that I have run several loops in parallel but unfortunately I can't see the examples because I use an older version of Labview. I tried to do to pass the data in a table, once recording is started, and then I carry the data to write a function that spreadsheet inside an another case statement. However, once I put the writing on the spreadsheet for the case statement he cannot write. I tried to put out the statement box but it save only a single set of data. Sorry if I am not clear with my explanation. It will be greatly appreciated if someone can give me some advice on this.

    Thanks in advance for your information.

    See you soon,.

    Anson

    You want to build a table of data.
    If the Boolean value is true, you will add a data point in the table.

    If it's wrong, you do not add anything, and the loop will be re-iterate.

    In the example below, the same code appears twice.

    Half top shows the case of 'Real' and the bottom half shows the case of 'false '.

  • Q on the buttons and animations inside the mc

    OK, it's a long question - sorry (and I'm new to FLASH if it sounds stupid).

    I'm creating a simple "tamagotchi". It is a cute creature onstage, it has 4 buttons next to it (power, sleep, play and 'cute')

    So, I created a long chronology of 15 images in the main stage. To frame 1, I had 'cute', frame 5 I got 'food', frame 10 I 'play' and frame 15 I had 'sleep '.

    I accumulate animation in this way: each of the images (1, 5, 10, 15) has a movieclip with an animation inside - for example "play" to the 10 member contains a movieclip and inside this movieclip I have an animation that I want to play.

    But but... the buttons... If I put the buttons inside the animation and push 'play' it works fine, but I can't get out of this animation and more to for example "food".

    If I put the buttons on the main stage, it will play only 10-15 image when I press 'play', because I can't understand that he must go inside the movieclip and it play.

    So the main question: is there a function saying "touches you - get out of this animation in the main stage and other animation and play that!"?

    Or y at - it an easier way to do this? I tried to copy all the layers of an animation and paste it into the main stage, but when I do it this way, items in layers appear randomly on the stage, which means that I have to put it all together again. AND it will be a very long timeline if I do it this way.

    I hope I make sense?

    It is all back now, so I can see things from new... from what I have just described, your code frame 1 will be replaced by...

    button_1.addEventListener (MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame_1);

    function fl_ClickToGoToAndPlayFromFrame_1(event:MouseEvent):void
    {
    gotoAndStop ("nuttet");
    }

    'Play' button

    leg_btn.addEventListener (MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame_2);

    function fl_ClickToGoToAndPlayFromFrame_2(event:MouseEvent):void
    {
    gotoAndStop ("leg");
    }

    Power button

    mad_btn.addEventListener (MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame_10);

    function fl_ClickToGoToAndPlayFromFrame_10(event:MouseEvent):void
    {
    gotoAndStop ("mad");
    }

    and if your movieclips have a stop at their first image, then these images you would order for the involved movieclip, meaning the 5 frame you order... leg.play ();

  • I clicked on forget (set 5 min) button and it deleted the session state, wasting 80 tablets

    By clicking on the button to forget (forget 5 min) restarted firefox, thus closing all of my windows (not only the tabs for the past 5 minutes)
    and replace my session restore file.
    the sessionstore-backup is also lost.

    It looks like a software bug, but I don't want to try to reproduce it again.
    I'll try to get some of my tabs by spending some time check my browsing history.
    seniors will be difficult

    HI kinito_alc,
    It's what is expected. However if you want to leave a comment for developers, you can submit your comments directly to the team of awareness through the following page:

    The user outreach team will review all feedback and reports on results to the product teams and the parties concerned, in order to influence and shape our products.

  • Performance issue with the query when join OKS and tables of the IB

    Hello

    I'm developing an integration for the automation of RMA through repair. The type of repair order is based on the details of the guarantee. This check must be made for each record.

    Request for detailed below, I wrote, but it of a long way and slows down my program. Without this validation, it works perfectly.

    The problem is the join of tables with OKS IB, he kills performance. I also try to my side,

    any suggestion or help is appreciated. Here's the query in the program:

    SELECT DISTINCT (TYPE |) '-' || service | '-' || status)

    IN v_war_details

    FROM (SELECT TO_NUMBER (linesb.line_number) line,

    DECODE

    (fnd_profile. VALUE

    ('OKS_LINE_MIRR_NAME_OR_DESC'),

    'DISPLAY_NAME', sysitems.concatenated_segments,

    "DISPLAY_DESC", sysitems.description

    ) service.

    linestyletl.NAME TYPE,

    status of ststl.meaning,

    start_date linesb.start_date,

    linesb.end_date end_date,

    oks_misc_util_web.duration_period

    (linesb.start_date,

    linesb.end_date

    ) DURATION OF,.

    TimeUnit.unit_of_measure_tl period

    Of okc_k_lines_b linesb,.

    okc_k_lines_tl linestl,

    okc_line_styles_b linestyleb,

    okc_line_styles_tl linestyletl,

    okc_k_headers_all_b hdr,

    oks_k_lines_b slines,

    okc_k_items kitems,

    mtl_system_items_b1_kfv sysitems,

    okc_statuses_b stsb,

    okc_statuses_tl ststl,

    mtl_units_of_measure_tl timeunit,

    okc_lookups_v rentype,

    Glu mtl_units_of_measure_tl

    WHERE linesb.cle_id IS NULL

    AND linesb.ID = linestl.ID

    AND linestl. LANGUAGE = USERENV ("LANG")

    AND linesb.lse_id = linestyleb.ID

    AND linesb.lse_id (1, 12, 14, 19, 46)

    AND linestyleb.ID = linestyletl.ID

    AND linestyletl. LANGUAGE = USERENV ("LANG")

    AND linesb.chr_id = hdr.ID

    AND linesb.ID = slines.cle_id

    AND linesb.ID = kitems.cle_id

    AND kitems.object1_id1 =

    SysItems.inventory_item_id

    AND kitems.object1_id2 =

    SysItems.organization_id

    AND kitems.uom_code = uom.uom_code (+)

    AND unit of measure. LANGUAGE (+) = USERENV ("LANG")

    AND linesb.sts_code = stsb.code

    AND stsb.code = ststl.code

    AND ststl. LANGUAGE = USERENV ("LANG")

    AND timeunit.uom_code =

    oks_misc_util_web.duration_unit

    (linesb.start_date,

    linesb.end_date

    )

    AND timeunit. LANGUAGE = USERENV ("LANG")

    AND linesb.line_renewal_type_code = rentype.lookup_code (+)

    AND rentype.lookup_type (+) =

    'OKC_LINE_RENEWAL_TYPE '.

    AND (IN) hdr.ID

    SELECT kh.ID

    Of okc_k_headers_all_b kh.

    okc_k_lines_b kl,

    Ki okc_k_items,

    okc_line_styles_v ks,

    csi_item_instances c,

    mtl_system_items_b I have

    WHERE kh.org_id = p_org_id

    AND c.instance_id = p_instance_id

    AND c.serial_number = p_serial_num

    AND i.inventory_item_id =

    p_inventory_item_id

    AND kh.contract_number_modifier IS NULL

    -can be filled

    AND kh.ID = kl.dnz_chr_id

    AND kh.ID = ki.dnz_chr_id

    AND kl.ID = ki.cle_id

    AND kl.lse_id = ks.ID

    AND IN ki.jtot_object1_code

    ("OKX_CUSTPROD")

    AND c.last_vld_organization_id =

    i.organization_id

    AND TO_NUMBER (ki.object1_id1) =

    c.INSTANCE_ID

    AND c.inventory_item_id =

    i.inventory_item_id))

    Service = 'GUARANTEE '.

    AND TRUNC (SYSDATE) BETWEEN start_date AND end_date;

    Not sure where it would be so I put it in the section SQL/PLSQL.

    Kind regards

    Prashant

    Found the solution

    AND TO_NUMBER (ki.object1_id1) = c.instance_id

    replaced by to_char (c.instance_id) = ki.object1_id1 AND

  • Button and click on the button of handling

    Hi all

    I have on my Panel of a few buttons. I defined in the file .h WidgetIDs buttons, then I set ActionIDs for actions (but Iam do not know if this is correct, if the shares are used only for menu items,...). In .fr on file that I have defined keys itselves. Now, I need advice, how to handle the button click? Sould I create controller and observer, or is there any other way how to do this functionality? Is there a document describing what Iam trying to do?

    Thx a lot again

    What you could do is use the observer on the Panel on which are placed the buttons. Inside the 'AutoAttach' of the observer method to attach observer to these buttons on the "IID_ITRISTATECONTROLDATA" Protocol and then you will get a call to update whenever you click on one of these button.

    I don't think that you need to create the ID action to implement this.

    Have a try with this way, it will work.

    Manan Joshi

    -Effective InDesign solutions-

    MetaDesign Solutions

    http://metadesignsolutions.com/services/InDesign-development.php

  • I CAN'T TURN MY COMPUTER MORE. I PUSH THE BUTTON AND I HEAR THE FAN BUT NO LIGHTS APPEAR. Help!

    IT IS A DESKTOP COMPUTER AND WAS WORKING FINE UNTIL 2 DAYS AGO. Thank you.



    Moved from IE

    Hello

    Have you tried to tap the F8 key at startup to see if it gives you all the options?

    You get the manufacturer of the computer or card mother Logo arrive on the splash screen at startup?

    If no logo or options to come, by the sound of it, you have a hardware problem.

    Contact the manufacturer of the computer, if under warranty.

    If it is not under warranty, contact a good computer repair workshop, local.

    See you soon.

  • What does the power button and closing of the lid

    When trying to choose what pressing the power button or closing the cover made my option is locked on the 'sleep', I can't choose anything else, is there something missing in windows or do I have to install something to make it work?

    You must disable the utility Samsung "Fast start".  It handles some of your power for you options [there is no problem with the neutralization of him because it doesn't do anything for you that you can't do it yourself].

    Note: a user said earlier that "Fast start" had been renamed, then you might need check the correct name in your manual or by research in Samsung records in all programs.

  • How do you align the buttons and text near the edge of a window of browser?

    In Muse.pngIn Browser.png

    The image to the left, it's what I'll do. However, unfortunately my output appears as you see on the right side.

    I am a new user of Adobe Muse, no matter which input you can provide would be greatly appreciated.

    Select your item you want pinned and use the tool of the handle.

Maybe you are looking for

  • Satellite U300-FA308C - BSOD every 10 minutes or more

    I have the above posted for laptop and is currently BSOD all 10 or if the minutes. It has all the specifications of the factory (T5450 1.66 GHz CPU/2 GB RAM/250 GB/Intel HD x 3100 video etc...) I tried the following without result, -Blow in the unit

  • L50-B-137 - USB satellite feeds not Versa Laser Engraver

    Hello I'm having a problem, you can be able to help.I just bought Satellite L50-B-137 to replace my previous Tosh, who died a few weeks after 4 years of good and loyal service. However, the new laptop does not seem to be able to feed the laser engrav

  • 5532 ENVY: ENVY OF LOADING CARTRIDGE 5532

    Bought a new desire 5532.  After setting up I was informed (on the printer screen) "the next cartridge must be replaced" (black).  After cleaning of the cartridge and the printer control, I decided to replace the cartridge with the spare provided wit

  • Configuring sound card not open?

    Hello I'm working on the tutorial of 3 h of the NC and accessed at page 50 of the dokumnet. Exercise 3.2. Alternative C. Anyone know how I can find the reason of the problem and the solution, see the following error message: error 4803 bei Audioaufna

  • window serial key

    I lost the sticker with the Windows vista serial key on my laptop and I do not have cd with my laptop