Actionscript 3.0 - Button to open URL

I'm attempting to have a basic FlashCS4 intro/splash screen for my  website, that after finished playing is a button that links to the  first page of my site.
I have the animation created, I'm just having trouble actually  linking it to the page.
When I test the movie, I get the error:
TypeError: Error #1009: Cannot access a property or method of a null  object reference.
at splash_fla::MainTimeline/frame66()
Frame 66 being the frame with the button and actionscript on it:
enter_btn.addEventListener(MouseEvent.CLICK,goThere);
function  goThere(e:MouseEvent) {
var request:URLRequest=new  URLRequest("*******");
navigateToURL(request);
I'm very much an AS3 beginner, so it may just be a simple fix, but  I'm at a loss. Any help would be greatly appreciated!

If that is the only code you have, chances are your enter_btn is not named or is otherwise out of scope.  Instance names are assigned by selecting the object on the stage and assigning the name in the properties panel where it says instance name.  If you did that okay, then maybe the problem is that the code is executing where the button doesn't exist-- they need to be in the same frame (Not layer, just 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 not in the display list
- 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 different names assigned.
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.

Similar Messages

  • Naming Buttons - Problem with using Captivate 7 Buttons to Open URL or File

    After spending too much time troubleshooting a button problem, I discovered the importance of naming each item in a Captivate project.
    For some reason I have yet to figure out, publishing to SWF from Captivate causes buttons to function arbitrarily. In my case, I had eight buttons pointing to external URLs, three that worked and five that didn't. All of the buttons pointed to the same external website, only to different PDFs hosted on that site. Each button was named with the default "Button_X" convention as set by Captivate. After trying lots of different settings adjustments, On Enter and On Exit actions, and Play/Pause timings, I did what I should've done from the beginning; changed the names of the buttons.
    Why this worked? I don't know. I've seen hints on other discussions as to SWFs not working well when there are a lot of unnamed or default-named items. If there's some logic to this I would be happy to know it, but for a default setting to cause such a bizarre problem is beyond my comprehension. I could understand if I had named the buttons incorrectly, but I didn't do anything to them; I left them with the names created by default.
    Hopefully this helps someone else resolve a similar issue and, if anything, encourages everyone to follow best practices and use a clear file naming conventions for all projects.

    Hi there
    Perhaps the link below will help?
    Click here to view
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • Newbie is still being stupid! Actionscript for a button to a URL isn't linking??

    Not sure what I am doing wrong now.  I have coded the frame as below, yet when I publish it it doesn't link?  Any suggestions? (obviously a false link here, but am using a link that actually works!)
    stop();
    var getPaypalBoostaboiler:URLRequest = new URLRequest("http://www.addressgoeshere.co.uk");
    //---Get URL---\\
    paypal_boostaboiler.addEventListener(MouseEvent.CLICK,boostaboilerBuy);
    function boostaboilerBuy(event:MouseEvent):void{
    navigateToURL(getPaypalBoostaboiler);

    Just uploaded it and it works fine now - I HAVE SO MUCH TO LEARN!!!
    Thank you so much for your help.

  • Need button to fade-out page (.swf) when pressed, open URL

    Hi-ya
    3 days going on 4 and i still haven't figured out how or what
    i need to do that would enable a button placed on a SWF (webpage),
    when clicked, will fade that .swf to blak,thereafter a URL opens
    (my homepage). does anyone know what i need to do in this case. my
    actionscript skills is graded at c or c -, so any help there would
    be appreciated.
    thanx,
    IfOnlyiNu
    From
    http://www.developmentnow.com/g/68_2004_9_0_15_0/macromedia-flash.htm
    Posted via DevelopmentNow.com Groups
    http://www.developmentnow.com

    Here is the theory - you should be able to figure it out from
    there:
    1. In your main movie create a new movieclip call it "Fade",
    make the first frame blank and put a stop(); action on it.
    2. On the second frame create a new graphic symbol bigger
    then the full screen and make it a full black square.
    3. Go a few frames ahead, the farther the longer the fade
    will take. Insert a keyframe.
    4. Go back to frame 2, select the black box graphic and make
    its alpha = 0%
    5. Create a tween on frame 2, this will make the box go from
    invisible to visible on the last keyframe.
    6. On the last frame where the box is totally black add the
    getURL("url") actionscript.
    7. Go back to the main scene of the movie and place the
    "fade" movieclip on the top layer. Since it is stopped on the first
    blank frame it will not be visible until something makes it play.
    8. Add an actionscript to the button that will start the
    fade, it will look like
    *buttoninstancename*.onRelease = function () {
    _root.Fade.gotoAndPlay(2);
    //this tells the movie fade to go to the second frame and
    play
    replace *buttoninstancename* with the instance name of the
    button on the stage that conrtols the fade.
    That will make the "Fade" movie play, which is a tween that
    turns the full screen to black, and then redirects to a new url at
    the end.
    Hope that helps.

  • Open url in a new browser via a button

    I have created a button within a region and set request='go'. I then have a branch that when request='go', it branches to a url. Is there a way to open a new window when it branches to that url? Basically, I'm trying to open a new browser to go to a specified url when a button is clicked.

    Yes no problem,
    call an javscript function, which open the new window. that function can get as parameter the item value (eg. the URl text)
    function callMyPopupTest(url)
    w = open(url,"winLov","Scrollbars=1,resizable=1,width=1100,height=350");
    if (w.opener == null) w.opener = self;
    w.focus();
    this should work
    In this excample the URL is static for the button.
    If not you have to solve the problem inside the javscript function with getting the value of the item (the url text)
    document.getElementById('P21_URL').value;
    for that the javascript function parameter has to be the id(eg. name: P21_URL).
    hope that helps
    thorsten

  • Captivate 4 Open url from a button not working?

    Hi All,
    I have published a scorm course from captivate 4 and have installed to our servers. I would like to have a link to a document that is online (.doc) but whenever I click the transparent button it starts to load, opens a window (which has the correct title name) but then disappears with no warning or error message.
    The link resides behind a transparent button, and has the settings On Success open url or file in a new window.  I know the problem is not specific to this document because I have had the same problem with a completly different online file location in the past.
    Please Help!!
    Many thanks in advance.
    Chris Maile

    Hi there
    Please send me a private E-Mail message to rstone75 (at) kc (dot) rr (dot) com and advise of the exact file name of the file you are linking to.
    I'll send you back a file that you can use to test and see if the link works.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • Middle mouse button no longers open URL in new tab.

    So, I'm on Firefox 6.0.2 and my middle mouse button no longer opens urls in new tabs.
    It closes them, reopens old ones fine, just no longer opens links in new tabs.
    Any ideas?

    The problem may be about a Greasemonley update :
    http://superuser.com/questions/332782/middle-click-tab-opening-stopped-working-in-firefox/332794#332794

  • Clicking a button set to open url is skipping pause in slide

    Hey there! I must be missing something that's right under my nose... I have two transparent buttons over images on a slide who's actions are set to Open URL or file with infinite attempts. I also am using back and next arrows with click boxes to continue and go back. The click box over the next arrow is set to pause the project until it is clicked. What is happening, though, is that when I play the project, clicking the buttons not only open the URL in a new window, as set, they also cause the project to continue to the next slide.
    What am I doing wrong? Am I going about this the wrong way?
    Thanks for your help!

    Hi there
    Look at the properties where you direct the link to a new window. There is an option there that governs whether a pause is released or not.
    Cheers... Rick

  • Open URL or File button not working.

    I am using VMWare on a Mac running Windows XP with Captivate 4.
    I am trying to essentially put a link at the end of my elearning to have them jump to a URL.  I've switched over to a dell running XP.  I've created a new project and tried to recreate just the last slide, i've created another new project and tried to just make a open URL button but none of it works!
    any thoughts?

    Hi Patrick
    We can all honestly give thanks to those that like to wreak havoc on our computers. Malicious Hackers
    For it is Security reasons we face the difficulties we do.
    Try the link again. I initially pointed you to the wrong anchor. (Sorry - My bad) Basically it's a Flash Player security thing. And it only happens when you test locally. Once things are on a server (as they usually are) the issues tend to become total non-issues)
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • Open URL button not working on MAC CP 5.5

    ok I have so far worked on captivate 5 for PC published
    all my software and made a distributable cd version all works fine.
    now I downloaded the free trial version 5.5 for Mac and I was able to keep the open another project working fine by publishing as SWF but for some reason the open URL button which opens a web page seems to do nothing I can hear the click but nothing opens. Any idea why?

    Go to the Apple store it has a warranty which they fix or give you a new iphone. You could up to a certain time buy the $99 Apple Care Plan. Much better than going to Verizon and getting a refurbished iphone. Never use Verizon for your iphone.
    Go to the Apple Store and you will be much happier that you did.
    They repair the phone and your not getting someones elses problem phone in its place.
    Even if Apple charged me I would rather pay them then go through Verizons jump through hoops.
    The Apple Store can tell you via calling them or going to the store. You have a one year manafactures warranty from Apple go to them.
    Good Luck

  • Open URL in a target div

    I need some actionscript help.
    I have a DIV with an iframe inserted into it on my webpage. I
    am trying to get my flash button to open a URL within that iframe
    without refreshing the entire page. Is there a way to accomplish
    this? Here are some details about my HTML and Actionscript:
    HTML:
    <div id="graynav"><iframe src="gravnav.html"
    name="secondarylinks" width"175" height"349" frameborder="0"
    scrolling=no"></div>
    Actionscript:
    button1.onRelease = firstlink;
    function firstlink() {
    getURL("graynav.html", "secondarylinks")
    Do I need to specify the target in a different way? Any help
    would be appreciated.
    Thanks.

    try using an id in your iframe and targeting that id in
    getURL().

  • Open URL in a new window

    I have a project slide with buttons that open a URL that points to the .htm project file for another project in a new window with the current project to stay running.  This causes the course to close completely in the LMS?

    Hi,
    try setting the button to open the url in a new window, that way the students will not have to "start over" when they need to go back to the module.
    Just go into your button properties and next to your url, click the down arrow and select new.  This will open the url in a new window.  You can uncheck the continue playing move choice also to stop the movie so it doesnt continue to play when the user is visiting the webpage.

  • Open URL in a new window by closing the parent window

    Hi Friends,
    Is there any option to open URL in a new window by closing the parent window on a button click?
    Already implemented the logics suggested in /people/mohammed.anzys/blog/2007/06/05/how-to-close-parent-window-in-webdynpro-applications , the thread ' URL in same window '  and the standard component WDR_TEST_EXIT_PLUG .But button is not triggerring any actions .plz help me  ..............
    Regards,
    Radhika

    hi,
    Do the following steps :
    -> Make an Outbound Plug to the Window.
    ->Make the type of Outbound plug to Exit Type.
    ->Add URL of type String as a parameter to the outbound plug of Window.
    ->Do remember to add Component Name in the Properties Tab of View ( othervs Calling Outbound plug of window from view wont b possible ).
    To open a new URL with closing the previous one write this Code in OnAction of Button : ( this Code can be get from Code Wizard too ).
    DATA lo_zexit TYPE REF TO ig_zexit .   <zexit is name of my Component>
    lo_zexit =   wd_this->get_zexit_ctr( ).
      lo_zexit->fire_out_window_plg(
        url =   'http://www.google.com'                            " string
    I hope it helps.
    Thanx.

  • Open URL from a Captivate generated MP4

    Hello all,
    I am putting together an instructional video (.mp4) using Captivate 5.5, the video will be targeting iOS users.
    I will need to provide a way to open some webpages while the end user is playing the mp4 file. My thought was to include a button with an assigned action to "Open URL or file" and specify the URL.
    This does not seem to work after publishing to mp4 format. Is that feature not supported in Captivate mp4 files? Or did I forget a step maybe? Is there a workaround to achieve the same result?
    I'd appreciate any input on this.

    Hi there
    Unless something has changed recently, it is my understanding that MP4 is strictly a video format and does not support hyperlinking or other types of interactivity.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • How can I create a custom button for opening a form?

    I have a parent form having child forms. In my main form I want to create custom buttons for opening child forms. I want to use master-detail form but there are more than one child forms, and in master-detail form I can only create one detail form. So I will create a form based on a table and in that form I will call the child forms by custom buttons. Can I do that?
    Thanx,
    Gulsah.

    This can be easily done. First open up two instances of your Portal. In one window, you will need to go into your component you wish to link FROM. In the other window you will need to go into your component you wish to link TO. In the component you wish to link TO there will be a moduleid. Note this somewhere. Then, you will see an area that says: "Call Interface: Show". Click on this. (In the window you are linking to.). In this window, you will see a bunch of stuff. At the bottom you will see a URL call. This is the call you need to use. At the top, it explains each piece of the URL call. Just subsitute YOUR appropriate information into the URL call. In the form you wish to link FROM, create a button. Once you create this button, it will appear at the bottom, click on it and you will see an area to insert a Javascript. Click the onClick and insert:
    //this is the variable you want to pass from one form to the other
    get_field_name = getField(this.form,'COLUMN_NAME_IN_DATABASE');
    //this is so you can open the "child" form
    window.open('/pls/cc_prod/DAD_NAME.wwa_app_module.link?p_arg_names=_moduleid&p_arg_values=MOD_ID_HERE&p_arg_names=_sessionid&p_arg_values=&p_arg_names=COLUMN_NAME_IN_DATABASE&p_arg values='+GETFIELD_NAME+'&p_arg_names=_COLUMN_NAME_IN_DATABASE_cond&p_arg_values=%3D');
    In the fourth tab, where it says, "....before displaying form" insert the following: (This will tell the form how to handle the getField function.)
    htp.p('<script language="JavaScript1.3">
    < !--
    function getField(form,fieldName)
    var objName = "";
    var tmp = "";
    var dAction = "";
    var sel_idx = 0;
    var cnt = 0;
    var instance = 0;
    var slicedName;
    var fillData = new Array();
    for (var i = 0; i < form.length; i++)
    slicedName = form.elements.name.split(".");
    tmp = slicedName[2];
    instance = parseInt(slicedName[3],10);
    if (!tmp)
    continue;
    objName = tmp;
    if (objName == fieldName)
    return form.elements[i].value;
    //-->
    </script>');
    I hope this helps.
    null

Maybe you are looking for

  • HT1212 forgot the passcode to my iPhone

    Hi I forgot the passcode to my iPhone and followed the instructions to go to my back up etc, but when I do it tells me to switch off the "find my iPhone" app on my iPhone. But I am locked out so I can't do that. How do I go around this?

  • How to install KDE Applications 5?

    Hi, Are there any programs dedicated to kde 5? With KDE ArchWiki shows "Applications based on KF5 will have a first release in December 2014." So, I mean mostly about apps like Dolphin, Kate, compatibility with gtk (oxygen-gtk*). Thank you for your h

  • Updating Attributes at Position Level in SRM

    Hello, I need to update the extended attributes 'Approval Limit' & 'Output Limit' at the position level in SRM Org structure.  Could you please help identifying the right FM to use. I have tried the FM BBP_UPDATE_ATTRIBUTES but it seems it works only

  • Access to database using ColdFusion & Flex

    Hi, I install a ColdFusion MX 7 Updater 2 in my ColdFusion Server but don't work it.... my server has a Windows Server 2003 Enterprise and we are developing an aplication in Flex 2 and we are using ColdFusion for connect to data base but Flex 2 need

  • Vista Sidebar Gadgets not working with iTunes

    I've tried several different Gadgets, tried reinstalling iTunes 8, tried clean installs of all of them... no third-party controller app seems to be able to interface with iTunes. i have iTunes running, but none of the iTunes controller Gadgets recogn