Creating new buttons on different frame labels

can someone tell me if im doing something wrong or assigning
the as to the wrong frame?
first off i have all my buttons on frame 2. im creating a
real estate site and i have to have a couple links like HOME ABOUT
BUYING SELLING CONTACT, the thing though is that in the BUYING and
SELLING frames i want to add more sections and links but only on
these 2 other parts of my site. when i code it and add new buttons
to these sections though my movie plays over and over and over non
stop. heres my coding...
FRAME 1 preloader
Frame 2 has a frame label of home and all the buttons on a
diff layer, and AS3 on a different layer
Frame 3 has a frame label for about section
Frame 4 is my contact for example
so if i create a new button in the about frame label and just
add the code to the working as3 code on frame 2 my movie just plays
over and over and over again, and all i want it do do is act like
the other buttons and go to a different frame label down in the
time line. the only way i get it to work is if i have ALL my
buttons on frame 2.
frame 1
my preloader
frame2
home_btn.addEventListener(MouseEvent.CLICK, onHome)
function onHome(event.MouseEvent):void
gotoAndStop("home");
about_btn.addEventListener(MouseEvent.CLICK, onAbout)
function onAbout(event.MouseEvent):void
gotoAndStop("about");
etc....
etc...
i enter my btn code just like this and the buttons on frame 2
work but any new buttons i try and creat and put into different
frames othere then frame label "home" aka frame 2 wont work

correct.
there are lots of ways around it. but they all require the
object to exist when the code executes.
with as3 it's particularly easy to create objects, code for
them and then add them to the display list later when
needed.

Similar Messages

  • How & where to use Java script to create new button in object detail page

    Hi All,
    I want to create "New/Add button" in object detail page. If i am not wrong i need to use java script for that but could you please let me know how & where to use Java script to create new button in object detail page in CRMOD.
    Thanks in advance.
    Regards,
    Manish

    Any related object on the detail page should have an "Add" or "New" or both buttons by default - This is vanilla functionality and will do the required action.
    If you want to modify this behaviour and do something tricky you will potentially have to go for javascript. You should add the javascript on a custom web tab on that Object.
    Admin --> Application Customization --> Contact -->Contact Web Applet
    Now, add your javascript in the code area, after you select the type = HTML for this web applet, expose this web applet on the Contact detail layout and your javascript will be invoked whenever this page is loaded.
    Check this online document to see how javascript can be embedded in CRM on Demand http://helponmyproject.com/TTOCOD/
    Cheers!
    Royston

  • 3 same buttons & 3 different frames, but each frame must have it's own actionscript?

    Here is my issue. I have 3 frames and 3 buttons. Each button takes you to their respected frame. However, I noticed that I cannot have 1 key frame of actionsript read the same on those 3 frames. Why? because if I jump from frame 1 to frame 2 or 3, then I cannot jump back. Instead, each frame has to have it's own actionscript. The only thing that would change is the method name. I find it tedious. Is that how  it is? This almost felt seem like it would be less tedious but even for 3 frames, I have to change each method name as I build more frames to navigate to. Check my example below:
    Old Actionscript (1 keyframe for 3 frames did not work to jump back any frame)
    frame1_btn.addEventListener(MouseEvent.CLICK, handlerFrame1);
    frame2_btn.addEventListener(MouseEvent.CLICK, handlerFrame2);
    frame3_btn.addEventListener(MouseEvent.CLICK, handlerFrame3);
    function handlerFrame1(event:MouseEvent):void {
    gotoAndStop("frame1");
    function handlerFrame2(event:MouseEvent):void {
    gotoAndStop("frame2");
    function handlerFrame3(event:MouseEvent):void {
    gotoAndStop("frame3");
    New Actionscript (3 keyframes and this works):
    Frame 1
    frame1_btn.addEventListener(MouseEvent.CLICK, handlerFrame1);
    frame2_btn.addEventListener(MouseEvent.CLICK, handlerFrame2);
    frame3_btn.addEventListener(MouseEvent.CLICK, handlerFrame3);
    function handlerFrame1(event:MouseEvent):void {
    gotoAndStop("frame1");
    function handlerFrame2(event:MouseEvent):void {
    gotoAndStop("frame2");
    function handlerFrame3(event:MouseEvent):void {
    gotoAndStop("frame3");
    Frame 2
    frame1_btn.addEventListener(MouseEvent.CLICK, handlerFrame4);
    frame2_btn.addEventListener(MouseEvent.CLICK, handlerFrame5);
    frame3_btn.addEventListener(MouseEvent.CLICK, handlerFrame6);
    function handlerFrame4(event:MouseEvent):void {
    gotoAndStop("frame1");
    function handlerFrame5(event:MouseEvent):void {
    gotoAndStop("frame2");
    function handlerFrame6(event:MouseEvent):void {
    gotoAndStop("frame3");
    Frame 3
    frame1_btn.addEventListener(MouseEvent.CLICK, handlerFrame7);
    frame2_btn.addEventListener(MouseEvent.CLICK, handlerFrame8);
    frame3_btn.addEventListener(MouseEvent.CLICK, handlerFrame9);
    function handlerFrame7(event:MouseEvent):void {
    gotoAndStop("frame1");
    function handlerFrame8(event:MouseEvent):void {
    gotoAndStop("frame2");
    function handlerFrame9(event:MouseEvent):void {
    gotoAndStop("frame3");

    You should not need to have code in all three frames.  The first bit of code you show should suffice under normal circumstances.  If you have the code on a layer that has only one keyframe and the buttons on a layer that only has one keyframe, then the buttons will remain working.  It is only when you create new instances (keyframes) of the buttons that you need to assign new event listeners for them, but even then the same event handler functions can be shared for all of them as long as that actions layer extends the length needed for all the buttons.

  • Creating a button with a text label layer

    Hi guys.  Looking for any tips on how best to implement a button with a text label.  I initially created a rectangle object on a lower layer and with text in the upper layer via type tool.  When I group both objects and create the button the text is readable in my InDesign (document) computer screen but the minute I preview it on my iPad the button becomes unreadable and pixellated.  I tried various approaches by moving the text layer outside the button group does not display the text at all.  Has anyone run into this issue?  If so what is the best practice?  Thanks in advance.

    Thanks for the insight Neil.  Regarding my button design its nothing fancy.  Its a rectangle box on one layer and a text label on another layer inside the rectangle object.  What I'm trying to simulate is when the user taps on the button the click state will change colour to notify the user that they have activated an event and in this case a navto://...
    The way I've implemented it is the rectangle is coloured pink [Normal] and when tapped the light pink [Click] toggles between both colours BUT my text label disappears. 
    See the screen shots below.

  • Error 1009: Buttons Linking to Frame Labels?

    Hello here is my code for my buttons for my rather simple Flash site. I have 5 "frame labels" each label contains a set of frames representing a page. Yet when I test the site with the action script below it freezes on the first frame and gives the message
    Error #1009: Cannot access a property or method of a null object reference. at SelfPromoSite_fla::MainTimeline/frame1()
    This is my code below for my main navigation buttons
    Home_Btn.addEventListener(MouseEvent.MOUSE_DOWN, goHome);
    function goHome(event:MouseEvent):void {
    gotoAndPlay("Home");
    About_Btn.addEventListener(MouseEvent.MOUSE_DOWN, goAbout);
    function goAbout(event:MouseEvent):void {
    gotoAndPlay("About");
    Resume_Btn.addEventListener(MouseEvent.MOUSE_DOWN, goResume);
    function goResume(event:MouseEvent):void {
    gotoAndPlay("Resume");
    Work_Btn.addEventListener(MouseEvent.MOUSE_DOWN, goWork);
    function goWork(event:MouseEvent):void {
    gotoAndPlay("Work");
    Contact_Btn.addEventListener(MouseEvent.MOUSE_DOWN, goContact);
    function goContact(event:MouseEvent):void {
    gotoAndPlay("Contact");
    Also on the "Work" "page" "set of frames" I have buttons to advance between frames.
    button1.addEventListener(MouseEvent.MOUSE_DOWN, goBack);
    function goBack(event:MouseEvent):void
              prevFrame();
    button2.addEventListener(MouseEvent.MOUSE_DOWN, goForward);
    function goForward(event:MouseEvent):void
              nextFrame();
    I've tried putting this action script on the frame where the "Work" label starts and the actual buttons for advancing back and forth are located. I've also tried putting the action script for these buttons on the first frame with the remainder of the button action script above, it does not work. Also when I remove the 2nd set of actionscript altogether the site still freezes on the first frame.

    The 1009 error indicates that one of the objects being targeted by your code is out of scope.  This could mean that the object....
    - is declared but not instantiated
    - doesn't have an instance name (or the instance name is mispelled)
    - does not exist in the frame where that code is trying to talk to it
    - is animated into place but is not assigned instance names in every keyframe for it
    - is one of two or more consecutive keyframes of the same objects with no name assigned in the preceding frame(s).
    If you go into your Publish Settings Flash section and select the option to Permit debugging, your error message should have a line number following the frame number which will help you isolate which object is involved.

  • Create new buttons for photos

    I'm wondering how I can create a button to link to photo page instead of multiple photo pages on the top nav. bar. I just want all albums on welcome page to link to photo page..How can I do that?
    Thanks!

    If you are on iOS 5 and it's an IMAP based email account then you should get an Edit button at the top of the list of your current folders on your email account - if you aren't on iOS 5 or if the account is POP based then you won't get the Edit button.
    Similarly for photos, if you are on iOS 5 then you should get an Edit button at the top right of the Album selection screen in the Photos app which allows you to create new albums and copy (not move) photos into - and if you delete the original photo then if will also be removed from all albums that you've 'copied' it into.
    If the iPod Touch is also on iOS 5 then I think that you will get the same options (though I'm not 100% sure)

  • Any way to change back button title without creating new button?

    Hi,
    Is there any way to change the back button title on a navigation controller without having to create a whole new button and action to go with it?
    Thanks
    Ray

    Yes, you don't need to create a new a new action mechanism etc.
    One way to change the back button text on a the navbar of a view is to create a new UIBarButtonItem (with nil tagget and nil action )
    Then set self.navigationItem.backBarButtonItem of the parent view controller to the new button
    Note that you're setting the backbarButtonItem of the parent view controller (and not the view controller on which this bar button will be displayed). This automatically plugs in the default target, action etc. So you don't need to implement it

  • Time Lapse import creates new clip for every frame!

    I shot a time lapse film - five hours reduced to 4 minutes ie one frame every 4 seconds. The iMovie Import wizard created a separate 'Clip' for every frame, (which is unusable), and then crashes the program every time I try to open it, I guess because there are too many 'Clips' to handle.
    Is there a way to import these discontinuous shots as a single clip? If iMovie can't do it, any ideas on a better way? I couldn't get Quicktime Pro to do any better - it opened thousands of separate windows on the desktop.
    Fortunately, the original is on DV, though each frame has a different time stamp on it.
    Thanks for any ideas!

    FYI
    I found that iMovie 6 was able to handle the multiple files and I could export them as an MPEG4 file. iMovie 08 bombed big time.

  • Creating a Gif is different frame rate

    If I have an uncompressed .AVI file that I created in After Effects CS5.5 which is 23.976 fps, and load it in Adobe Media Encoder CS5.5, and tell it to create a .GIF of it, at an output fps of 23.976, when I load the created .GIF into Adobe After Effects it tells me the frame rate is 25 fps and there is a black frame padded on the end.  I want the frame rate of the GIF to be what I ask it to be, ie. 23.976, with no additional black frames.
    Here's what happened with screenshots:
    1. I load the uncompressed AVI file that was created in Adobe After Effects CS5.5 into Adobe Media Encoder CS5.5.  Note below that Adobe Media Encoder is saying that the source clip is 23.976 fps, and that the export settings are to create an animated GIF at 23.976 fps.
    2. After Adobe Media Encoder CS5.5 has said "done" (Encoding Completed Succesfully) for this export to a .GIF, if I take that .GIF file that Adobe Media Encoder has just created into Adobe After Effects CS5.5, this is what it says:
    As can be seen above, Adobe After Effects CS5.5 is saying the GIF file that Adobe Media Encoder CS5.5 has just encoded is actually 25 fps, not 23.976 fps like I told it to be exported as.  Also, the GIF Adobe Media Encoder has created is 10 frames long, whereas my original uncompressed AVI is 9 frames long.
    Edit: I've just been reading up on the GIF format and it seems it doesn't store a frame rate but instead stores a frame delay, which is in hundredths of a second.  If this is just an integer, is this the reason for the displayed frame rate discrepancy, ie. 1 frame at 23.976 fps  would be 4.1708 hundredths of a second I think, and 1 frame at 25 fps would be 4 hundredths of a second I think - both rounded to the nearest integer would be 4 hundredths of a second so would the frame delay be set to "4" for both 23.976 fps and 25 fps? (there is also the fact that some short time will be taken for the drawing of the frame)
    Though even with the above, it shouldn't be increasing the amount of output frames.  It converts it correctly (no additional frames) if I use VirtualDub to convert the AVI to GIF instead of Adobe Media Encoder CS5.5.

    Thanks.  Could you get them to also check other parts of the code too.  eg. when I had a work area set in Adobe After Effects CS5.5 and then loaded that project into Adobe Media Encoder (dynamic link etc.) and rendered just the work area I think it was about a frame out then too - I don't think it was a GIF in that case but another type (maybe AVI/H264).

  • Inserting old swf into new fla with different frame rate

    Hi, I'm trying to insert an old banner ad into a new Flash site.  The problem is, the banner I made at 20 frames per second, and the Flash site is set to 41, so it literally plays the banner twice as fast.  Any ideas as to what I can do about this?  Thank you.

    A few of them I may have the original source files on disk.  Do you know what's the easiest way to transpose them to the higher frame rate?
    For the ones I don't have, I should open the swf file in the new site and add a frame between each already existing frame?
    Yes I imported the swf, I'm kind of just finding my way around Flash and I don't know how to load them dynamically.  If I did load them dynamically, would they play at their original frame rate?

  • Creat New Button through Web Pl/Sql

    Hi,
    I have 2 Queries:
    First:How i can remove the default buttons which appear on the
    Form after i complete the Successful Generation of Web Pl/Sql?
    Second:How i can create my own Button object and place it on
    screen,bcz by default this buttons dosn't appear at all on
    screen.
    Thanx.
    Pritam

    New to Oracle and your nick says OCP? High hopes perhaps? ;-)
    The answer here is pretty complex (dealing with mod_plsql document table, processing CLOBs, using options such as external tables, writing your own tokeniser and CSV parser, etc).
    I'll be happy to touch on these.. but maybe you will find a lot more joy, a lot less frustration, in using APEX instead. See http://apex.oracle.com for details.

  • How to create new nav buttons in nav bar

    I am trying to design a new site in iWeb. I want to add a row of navigation buttons to go to 8 different pages. All I have in the first page is a button called "welcome" and I cannot add anymore. It won't even let me select rollover colors or anything in that area.
    I only have a single page so far. If I add new pages does it automatically create new buttons in the nav bar, and how can I name them?
    Mike

    I cannot add anymore
    Yes you can. *New Page* from the file menu. Or *Add page* at the bottom left of the window.
    If I add new pages does it automatically create new buttons in the nav bar,
    Yes. (They're actually not buttons but textlinks)
    and how can I name them?
    By typing the characters of the pagename in the Sidebar on the left.
    Tutorials : http://www.apple.com/findouthow/web/
    Also note the word HELP in the menu bar at the top of the screen.

  • Creating a button through a class... H E L P

    Can any on ehelp me...
    I need to make a class, so that i in my JSP-file can create multiple buttons with different names..
    Something like this:
    package form;
    import java.awt.*;
    import java.applet.*;
    public class knap1 extends Applet
         public knap1()
              Button Knap = new Button("Knap");
              add(Knap);
    I'm pretty new at this, so can any one help me...
    Martin

    You'r right...
    The only thing i want is to have a set of different classes, that makes different form tag's by sending information to them..
    fx. TextField("the_name", "size","max_length")
    NumField("the_name", "size","max_length")
    and so on....
    Can you help from here....

  • Frame Label not found

    I have an FLA with two scenes. The first scene is an
    opening...at the end it goes to the next scene called Main.
    On Main I have a series of buttons....that click to different
    frame labels in Main.
    When I play JUST the scene it works fine...but when it goes
    from the opening into Main...I get this error on all the buttons:
    ArgumentError: Error #2109: Frame label Board not found in
    scene Main.
    at flash.display::MovieClip/gotoAndPlay()
    at ASIS4_fla::MainTimeline/onMouseClickBoard()
    There is a label called Board...and it works with that scene
    alone...any idea why it doesn't work when coming off the previous
    scene.
    Thank you in advance...

    this is on the first frame of the scene...when I do test
    Scene...it works great. But Test Movie I get that error
    btn_boardcert.addEventListener(MouseEvent.CLICK,
    onMouseClickBoard);
    function onMouseClickBoard(event:MouseEvent):void
    gotoAndPlay("Board");

  • RH_INSERT_INFTY not creating new records

    Hi All,
    I am using the FM RH_INSERT_INFTY to insert new records in HRP1000.
    See the below FM call :
    CALL FUNCTION 'RH_INSERT_INFTY'
         EXPORTING
             fcode               = 'INSE'
             vtask               = 'D'
              order_flg           = 'X'
              commit_flg          = 'X'
              authy               = 'X'
              PPPAR_IMP           =
              OLD_TABNR           = ' '
              REPID               = ' '
              FORM                = ' '
                keep_lupd           = keep_lupd
         TABLES
              innnn               = it_i1000
         EXCEPTIONS
              no_authorization    = 1
              error_during_insert = 2
              repid_form_initial  = 3
              corr_exit           = 4
              begda_greater_endda = 5
              OTHERS              = 6.
    But instead of creating new records it is changing the existing record in HRP1000.
    Actually I want to create new records with different long text and short text in different languages so in case object id and object type even the dates can be same but the language would be different.
    So I need to create a new records with a different language key and different short text. But this function module is changing the existing object short text,long text and language.
    Could you please reply at the earliest.
    Thanks & Regards,
    Poonam

    Hi,
    you're right, this function didn't create new record when i want to create a record with same object but have different language.
    you can use  this function for your problem :  RH_INSERT_INFTY_DIRECT
    i tried and it works.
    CALL FUNCTION 'RH_INSERT_INFTY_DIRECT'
      EXPORTING
        vtask                     = 'V'
      KEEP_LUPD                 =
      tables
        innnn                     = p1000
    EXCEPTIONS
       NO_AUTHORIZATION          = 1
       ERROR_DURING_INSERT       = 2
       REPID_FORM_INITIAL        = 3
       CORR_EXIT                 = 4
       BEGDA_GREATER_ENDDA       = 5
       OTHERS                    = 6
    Regards,

Maybe you are looking for

  • Need help with formula in Numbers for iPad 2

    I have a spreadsheet with a formula such as b2 x c2  very simple.  However, if the formula cells (b2 and 2) are blank then the destination cell contains a zero. How can I make my destination cell b blank while the formula cells are blank? I got thsvr

  • How we can maintain challan qty in receiving

    Hi ! I want to maintain the challan qty along with the received qty, accepted qty and rejectect qty. Example, invoice /Challan have 10 no of pens (Challan qty= 10) actual received qty is 8 no. 2 piece are shortage (received qty = 8) out of 8, 2 no of

  • Preferences Display Tab missing

    So after setting up and plugging in an external monitor and selecting the mirror option, my arrangements tab in the display preferences pane is just gone...reboot did not fix the issue, and neither did unplugging/replugging the external monitor, and

  • Suppressing a section based on two conditions

    Hello currently, I am trying to suppress a section of group based on two conditions: - The first condition is to suppress the section always if the user is not at DrillDownGroupLevel 1. - The second condition is to supress the section if the GroupNam

  • TMS 14.4 and F5 BIG-IP config: username and password

    Hi, We've got 2 TMS servers running 14.3.2 software behind BIG-IP load balancer. We're going to upgrade to 14.4 but Cisco has changed the redundancy model from active/active to active/passive. Some changes are required on the load balancer and this i