Preloader stops buttons from working?!

Hi,
I made a flash file with buttons that go here and there and everything was fine
except it takes a while to load so i added a preloader and suddenly the compiler
is throwing the following error:
Error #1009: Cannot access a property or method of a null object reference.
... and the buttons have ceased to function.
Here is my code:
preloader:
import flash.events.ProgressEvent;
function update(e:ProgressEvent):void
var percent:Number = Math.floor( (e.bytesLoaded*100)/e.bytesTotal );
if(preloaderMC is MovieClip){
preloaderMC.gotoAndStop(percent);
if(percent == 100){
play();
loaderInfo.addEventListener(ProgressEvent.PROGRESS, update);
// Extra test for IE
var percent:Number = Math.floor( (this.loaderInfo.bytesLoaded*100)/this.loaderInfo.bytesTotal );
if(percent == 100){
nextFrame();
stop();
scene 1:
stop();
import flash.events.MouseEvent;
//---Hair Button---\\
hair_btn.addEventListener(MouseEvent.CLICK, hairClick);
function hairClick(event:MouseEvent):void{
    gotoAndStop("4");
//---Home Button---\\
home_btn.addEventListener(MouseEvent.CLICK, homeClick);
function homeClick(event:MouseEvent):void{
    gotoAndStop("1");
//---Contact Button---\\
weddings_btn.addEventListener(MouseEvent.CLICK, weddingsClick);
function weddingsClick(event:MouseEvent):void{
    gotoAndStop("3");
//---Products Button---\\
products_btn.addEventListener(MouseEvent.CLICK, productsClick);
function productsClick(event:MouseEvent):void{
    gotoAndStop("2");
//---Gallery Button---\\
gallery_btn.addEventListener(MouseEvent.CLICK, galleryClick);
function galleryClick(event:MouseEvent):void{
    gotoAndStop("5");
//---Contact Button---\\
contact_btn.addEventListener(MouseEvent.CLICK, contactClick);
function contactClick(event:MouseEvent):void{
    gotoAndStop("6");
Please help me sort this out!
Thanks

If you are getting a 1009 error, the file will not work, so the buttons might not be the problem.
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 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.

Similar Messages

  • How can I turn off my computer when I push de STOP button from de program?

    How can I turn off my computer when I push de STOP button from de program?

    You might also want to have a look at the old winutil>Windows API Function Utilities (32-bit) for LabVIEW. While they are written in LabVIEW 4.0 (!), they still seem to work fine under W2000 and LabVIEW 7.0. In particular, have a look at "exit windows.vi" inside "winevent.llb" of the above link. It calls the function "ExitWindowsEx" of user32.dll. Since this is part of the OS, you don't need to include extra DLLs.
    (All the above assumes Windows OS. I don't know how to shutdown the OS on e.g. MAC or linux.)
    LabVIEW Champion . Do more with less code and in less time .

  • As soon as I open iTunes a  message pops up to say a problem has stopped it from working and I have to close it. Any solutions?

    As soon as I open iTunes a  message pops up to say a problem has stopped it from working and I have to close it. Any solutions?

    Start with the third box in  Troubleshooting issues with iTunes for Windows updates.
    If that doesn't work, use the steps in the second box to repair your iTunes installation. Your library should be unaffected by these steps but there is backup advice elsewhere in the user tip.
    tt2

  • Freeze accounts periods stops MRP from working?

    Hi
    We have been doing some work in Accounts and froze the accounting periods January - September, but it appears this action stopped MRP from working.
    Is this behaviour correct by design, or is it possible there is an as yet undefined issue?
    Thanks

    Hi,
    Did you received error message like Period is locked for new data  [Message 131-107]?
    If yes, then the system behavior is correct.
    Thanks & Regards,
    Nagarajan

  • This content requires hdcp for playback.  so I paid $100 for it and now they stop it from working?

    I have an atv 2, my tv uses componet, I have used it to rent and watch movies on it for a year at least but now it says this content requires hdcp for playback.  so I paid $100 for it and now they stop it from working?
    I also have the first atv, I get the same message

    lol, I had to go look at the back of that, I've been using it so long with componet. I started getting the hdcp message a few months ago on it. been using it for years with componet now I cant.  what I meNt on the AT2 is that when I bought it, I was able to use it, rent moves, etc. since I got it using an adaptor because of my tv. It just recently was rendered incapable along with the componet output on the AT1.
    My tv is a 65"  Hitachi rear projection,  with no hdmi. It's old, but still has a great picture

  • Flash CS3 FlvPlayback Skin Stop Button is working as pause

    Hi,
         I am using the skin for FlvPlayback player I have selected the sking from given list of skin.
         The issue is When I select the skin which is having Stop Button, Stop Button is not stopping the video is it just pause the video and after click of play button it should start from begining of the video which is expected bevhaviour of Stop button.
        any one can help me to resolve this issue.
    Thanks in advance.
    Sangati

    Yup, that is how it works. You can't control which state a button is in. So when you click on it, it will go to the down state and when you let go it will go back to over (or up if you release outside).
    Not sure exactly what the "fix" is. It depends upon what you are trying to do. Generally you would need to use MovieClips instead of buttons with event handlers to tell you "button" what to do. Very few people I know actually use buttons.

  • CS4 "play-stop" button not working

    OK hope someone might be able to help - I am trying to get CS4 working on my partners machine which is a Sony Vaio VGN-AR49G – specs here - http://vaio-online.sony.com/prod_info/vgn-ar49g/vgn-ar49g.pdf
    A bit of history...
    Recently installed Premier Pro CS4 on vista (Running CS3 previously on vista with no issues). 
    Running CS4 within days started to have conflicts between AVCHD and DV when editing in the same timeline – were recommended to upgrade to Windows 7.  Upgraded to Win 7 32 bit.  This is the course of action:
    - After upgrading from Vista to Win 7 32 bit, got the Win 7 updates;
    - Upgraded some drivers (used Driver Robot to detect driver updates required);
    - Uninstalled CS4 suite and reinstalled;
    - Downloaded CS4 upgrades…
    Things seem to be running properly now except the "play-stop" button (or space bar) in both the "Source" & "Program Sequence" Screens doesn't work.   Can scroll by moving the bar along the timeline, select in and out points etc… OK, but movie won’t play in source screen or program screen. 
    Have checked WAV, AVI, AVCHD … none will play.
    Closed Premier Pro and open Premier Elements on the same machine and it is functioning fine – can play the same footage…
    I’ve updated all drivers which Driver Robot seemed to think needed upgrading EXCEPT Intel ICH8 Family .. the upgrade failed and I haven’t been able to locate more up to date drivers on the web .. and found a note on my travels that these don’t need upgrading anyway. 
    http://communities.intel.com/message/72149;jsessionid=6169690E70B02BD075E4C1131A7ACC85.nod e5COMS
    Help please!

    Thanks!
    Really, so we're better to start from scratch rather than upgrade??  We'd have to re-load any other apps / drivers back on too after the install?  Don't run too much else on the machine as it is purely for editing.
    We have purchased the upgrade rather than straight install -- but if there's a pretty good chance that we'll solve the problem then we'll go buy that too.  Interested in any comments you have to help me understand Win 7 install vs upgrade ... thanks!

  • Cant get restart and stop buttons to work on scene with movieclip and sound. (NOOB)

    So.
    Iv been trying now for hours and it wont work.
    I have 4 layers.
    ljud: The wav sound file.
    knappar: Buttons, restart and stop.
    kod: which is only AS2. The only thing in it is stop();
    fyrverkeri: which has the movieclip on it. 3 instances of it, named fire, fire1, fire2.
    Code for the restart button:
    on (release) {
    gotoAndPlay(1);
    Code for the stop button:
    on (release) {
              stopAllSounds();
              stop();
    fire.stop();
    fire1.stop();
    fire2.stop();
    It wont work correctly. What have I done wrong?
    I will upload 2 screens for you as well.
    At the moment it wont go back to frame 1. It starts playing at the last MC instance instead.
    Other problems iv had is that it wont play the sound but restarts the mc.
    Thank you in advance!

    I will change it to stream and try.
    My stop and restart button are on the same layer.
    I am referring to fire,fire1,fire2 as being instance names for the 3 movieclips, not frame names. 
    Should I use frame names maybe? 
    The wierdest thing (according to me, the lost noob) is that when I hit my restart button, it doesnt even go to frame 1. It goes to my last instance of the movieclip, frame 69 and it doesnt play it out either. Im lost. Iv been trying so hard for so many hours with this thing now, even remaking it that I think I have become blinded to what the solution could be. -.-

  • How do I stop a Movie Clip (Button) from working once clicked?

    Ok,
    I'm using a movie clip as a button to show content on a page, effectively its like a new page of the website. Problem is, with the script im using for it, once the content is show, the button is still active and if clicked again, will re-load the content. I want a way to effectively disable the button whist the content is shown.
    Thanks.
    this.services_inner.buttonMode = true;
    this.services_inner.addEventListener(MouseEvent.MOUSE_OVER, rollOver_services);
    this.services_inner.addEventListener(MouseEvent.CLICK, onClick_services);
    function rollOver_services(evt:MouseEvent):void {
    this.services_inner.play();
    function onClick_services(event:MouseEvent):void {
    MovieClip(root).mov.backgrounds.colour.gotoAndPlay(2);

    Thanks, that does stop it, however, i now need it to work again if a different button is clicked... there are 4 buttons (movie clips) in total, so I assume I'd just need to add the event listener back again on click of the others?
    This is the "Services" Button, with the event listener removal.....
    this.services_inner.buttonMode = true;
    this.services_inner.addEventListener(MouseEvent.MOUSE_OVER, rollOver_services);
    this.services_inner.addEventListener(MouseEvent.CLICK, onClick_services);
    function rollOver_services(evt:MouseEvent):void {
    this.services_inner.play();
    function onClick_services(event:MouseEvent):void {
    MovieClip(root).mov.backgrounds.colour.gotoAndPlay(2);
    this.services_inner.removeEventListener(MouseEvent.CLICK, onClick_services);
    This is the "Contact" Button, which when clicked would need to "re-activate" the Services button.
    this.contact_inner.buttonMode = true;
    this.contact_inner.addEventListener(MouseEvent.MOUSE_OVER, rollOver_contact);
    this.contact_inner.addEventListener(MouseEvent.CLICK, onClick_contact);
    function rollOver_contact(evt:MouseEvent):void {
    this.contact_inner.play();
    function onClick_contact(event:MouseEvent):void {
    MovieClip(root).mov.backgrounds.art.gotoAndPlay(2);
    this.services_inner.removeEventListener(MouseEvent.CLICK, onClick_contact);

  • Preloader stoping swf from working properly

    have made this external preloader to load my 2mb .swf, and it
    works but when u click on a button the wipe go across the screen
    but it doesnt change the page as you can see this on this link
    below
    Text
    but its supose to look like this example( if you clicked on
    the installs button a 3d amimated wipe will go across the screen
    then it will jump to the Installs page)
    Text
    and i dont know why
    im using the flash 8 Slide presentation template as its
    perfect for what im achive easy to and works fine with out the
    external preloader but if i use the external preloader it stop the
    buttons working by stoping them going to the next page
    the code that tells flash to goto the correct slide is in the
    movie clip where the image sequance of the wipe is and at the end
    of the image sequance i have an action layer which is as follows
    // GoTo Screen behavior
    if((_root.application.Installs != undefined) &&
    (_root.application.Installs != null))
    var screen = null;
    var target = this;
    while((screen == null) && (target != undefined)
    && (target != null))
    if(target instanceof mx.screens.Screen)
    screen = target;
    else
    target = target._parent;
    if(screen instanceof mx.screens.Slide)
    screen.gotoSlide(_root.application.Installs);
    // End GoTo Screen behavior
    and my external preloader code is as follows
    var mcl:MovieClipLoader = new MovieClipLoader();
    var mclL:Object = new Object();
    mclL.onLoadProgress = function(target, loaded,total) {
    loader.percent.text = Math.round((loaded/total) * 100) + "%";
    mclL.onLoadInit = function () {
    loader._visible = false;
    loader.percent.text = "";
    mcl.addListener(mclL);
    mcl.loadClip("kidpower_Web.swf",holder);
    b1.onRelease = function() {
    loader._visible = true;
    mcl.loadClip("kidpower_Web.swf",holder);
    b2.onRelease = function() {
    loader._visible = true;
    mcl.loadClip("2_Web.swf",holder);
    Thanks Martin

    Ok. So after reading through a pile of forum posts and blogs I believe I may have my answer. Though I can't say I like it much.
    It seems that Acrobat does not render video/swf pixels at 1:1 (See This Forum Comment) and the disparity causes the image to appear distorted. The only fix I have really seen so far is to play with the zoom level in acrobat until the image comes into focus. A point that is different on every screen.
    Here are some of the posts I found most helpful:
    http://acrobatusers.com/forum/rich-mediaflash/video-quality-degraded#comment-72985
    http://acrobatusers.com/forum/rich-mediaflash/original-swf-size-distortion-import
    http://forums.adobe.com/message/3379809#3379809
    http://forums.adobe.com/message/3411262#3411262
    I still want to think that there has to be a way to force a 1:1 pixel ratio, but I have not seen any solutions for doing so. There was a suggestion regarding setting the flash stage to NO_SCALE, but I am not entirely sure what the suggested implementation involves.
    I would still love to hear ideas on how to create a better solution to this, but for now I suppose I will have to live with it as is.

  • Installing iTunes updates stops iTunes from working in Windows 8.1

    Last year after installing Windows 8.1 I had problems with iTunes ( couldn't burn to disc and could not uninstall after being advised by Apple Support that uninstalling was the solution), after assistance from the Windows community my problem was solved. I installed iTunes 12.1, I believe it was.
    Then in early January 2015 I received  an update notification and installed it but again started getting error messages and could not run iTunes, error was  -
    "ITunes.exe - entry Point not found"
    The procedure entry point "ADadPolicyEngine_DidEnterStation" Could not be located in the dynamic link library C:\ProgramFiles(x86)\iTunes\iTunes.dll.
    Then the message
    ITunes was not installed correctly. Please reinstall iTunes
    Error 7 (Windows error 127)
    Part of last years solution was the correct procedure to uninstall iTunes (remove all Apple programs) this I followed again and reinstalled iTunes. It again worked correctly until 30.1.15. I opened iTunes and was told there was  a newer version available which I installed which it completed ok but then it checked for any other updates and foolishly I installed it and got the error message -
    GNSDK_MANAGER_DLL. is missing from your computer reinstall
    After clicking ok I get the further message
    ITunes was not installed correctly, reinstall
    Error 7 (Windows error 126)
    Whilst I know how to uninstall and reinstall it is a bit of a pain to have to go through quite a long procedure to correct this problem. As this seems to be an ongoing problem does anyone know a solution ?
    I believe the suggested update is the same (12.1) that I install from the iTunes site, so why does it tell me to update I ask .
    It would appear that this problem relates to the update from iTunes and not Windows
    Obviously not installing updates is an option but not the answer.
    Any advice will be appreciated.
    Thanks.

    i've found something http://download.lenovo.com/lenovo/content/windows8-1/upgrade/ideapad/index_en.ht ml
    1. Model compatibility
    - Ideapad can only support the current preloaded hardware and software configuration. Therefore, depending on a specific configuration, it might not be recommended to upgrade your computer. That is because some hardware issues cannot be resolved currently. 
    It is not recommended to upgrade the following models to Windows® 8.1 because some VGA related issues cannot be solved by the vendor, currently.
    U310, U410, U510, U410 Touch, U310 Touch;
    Z500 Touch, Z500, Z400, Z400 Touch, Z380, Z480, Z580, Z485, Z585;
    S300, S400, S400u, S400 Touch, S405, S206, G485, G585, N480
    I should have read this before updating lol .... i hate my self right now lol

  • Upgrade to iOS 6.1.3 for iPad stopped cable from working

    Hey guys, not too long ago I finally decided to upgrade to ios 6.1.3., because a lot of the apps I wanted needed it. After updating it, my cable to connect to the tv (30 pin male to hdmi female cord from Apple store) stopped working, displaying the message 'This accessory is not support by the iPad'. And the T.V. screen remains black. Has anyone else experienced this and/or solved this issue? Can it be solved at all? Because it's a real **** off, especially since I didn't want to upgrade to ios 6 in the first place. My iPad literally just lost half of its usefulness.

    That's not possible on a device other than an iPhone 3GS.
    (94512)

  • /*   */ is a remark? Why deleting it stops query from working?

    Dear All,
    I recently got the SQL below from one expert and it worked perfecly.
    I am now wondering why he sent me this line in green?
    /*Select 1 from jdt1 t where t.duedate*/
    When I removed this line so that the code at the beginning now reads:
                Declare @d datetime
                set @d = [%1]
    the query stops working. Error Msg "Must specify table to select from'.
    What is happening here?
    I thought   /*   */   means remarks, which can be deleted without effect.
    It now seems they are an essential part of the query.
    Could you explain the meaning of the command, so that I can use it when building other queries?
    -  What does 'Select 1' mean and what is its effect?
    -  Why do we have to put this command to make query work?
    -  Why do you put it between /*   */?
    Thanks
    Leon Lai
    My previous thread is here:
    AR AGEING - Query works perfectly; stops working when changed into Subquery
    Declare @d datetime
    set @d
    /*Select 1 from jdt1 t where t.duedate*/=[%1]
    select * from
    SELECT T1.CardCode, T1.CardName, T1.CreditLine, T0.RefDate, T0.Ref1 'Document Number',
         CASE  WHEN T0.TransType=13 THEN 'Invoice'
              WHEN T0.TransType=14 THEN 'Credit Note'
              WHEN T0.TransType=30 THEN 'Journal'
              WHEN T0.TransType=24 THEN 'Receipt'
              END AS 'Document Type',
         T0.DueDate, (T0.Debit- T0.Credit) 'Balance'
         ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,@d)<=-1),0) 'Future'
         ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,@d)>=0 and DateDiff(day, T0.DueDate,'[%1]')<=30),0) 'Current'
         ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,@d)>30 and DateDiff(day, T0.DueDate,'[%1]')<=60),0) '31-60 Days'
         ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,@d)>60 and DateDiff(day, T0.DueDate,'[%1]')<=90),0) '61-90 Days'
         ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,@d)>90 and DateDiff(day, T0.DueDate,'[%1]')<=120),0) '91-120 Days'
         ,ISNULL((SELECT T0.Debit-T0.Credit WHERE DateDiff(day, T0.DueDate,@d)>=121),0) '121+ Days'
    FROM JDT1 T0 INNER JOIN OCRD T1 ON T0.ShortName = T1.CardCode
    WHERE  T1.CardType = 'C'
    ) sub

    HI Leonlai
    Sorry for my english...I try explain you how work it
    This variables
    '[%0]' - '[%1]' Etc...
    Are from SAP. If you insert this variables in SQL management studio (for example)  doesn't work
    You must declare variables allowed in SQL, using the @, after insert variables of SAP into variables to SQL.
    DECLARE @DATES INT, @BEGIN DATETIME, @END DATETIME
    SET @DATES = (SELECT TOP 1 A.DocEntry FROM dbo.OINV A WHERE A.DocDate >= '[%0]' AND A.DocDate <= '[%1]') /*This variable is used for called SAP varibles*/
    SET @BEGIN = '[%0]' /*Here Insert SAP variables into SQL variables*/
    SET @END = '[%1]'
    NOW WRITE your query.
    Sometimes when uses variables of SAP into UDF, doesn't work. This is a method for replace it.
    Regards

  • Mac: Graphic Update of Snow Leopard (08/19/10) stopped LR3 from working

    I wonder if I'm the only one who has a problem with the latest Apple Update  named "Graphic Update 1.0 for Snow Leopard" from last night. After I installed the update on my iMac 27" with quad core i5, 8Gb RAM I accidently used LR 3 RC 3.2 when I recognized that the brushes and all other editing tools where really slow. Even after clicking the brush it took sometimes up to 15 sec. until the tool got selected. Using the brush was slow and without any effect on working either.
    I recognized that I was usign the RC 3.2 release which I stopped working with as I have had several issues on that release before with long loading times of photos to edit. So I switched back to the normal release 3.0 which was working OK for me before. But now I have the same issues on the official 3.0 release. Even 3.0 is now very, very stringy and tools aren't working, too. Using the loupe, which shows the magnification immediatly takes now 15 sec. to show the magnification and some more sec. until it is sharp. Switching to next photo takes around 25 sec. which was done in around 3 sec. before.
    Now idea what happend, but I think I have to reinstall the OS and get the latest data from my TM.

    Bert Nase wrote:
    thanks exploded view, you're right, I should try it before. It was so obvious that only the update could have been the matter....
    If so normally I expected more people having that problem.
    Bert,
    Was this specific to the iMac?  I just checked for updates on my Macbook Pro and nothing came up about a Graphic update.  I went through the process of backing off an update (10.6.4 back to 10.6.3).  It wasn't exactly pretty, but not impossible.  You may have to do some reinstalls afterward if you find you need to choose that route.  In my case I reinstalled Snow Leopard from the DVD first, preserving current user settings and then reinstalled 10.6.3 from a download.  A few hours effort, but was back in business, so it is doable.
    Jay S.

  • Quicktime will not install on my PC - also stopping iTunes from working

    Quicktime and iTunes will not install on my Vista SP 1 PC, Whenever I try to install either I get the following error message;
    Quicktime - "There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor."
    iTunes - "The installation of Quicktime did not complete successfully. iTunes requires Quicktime."
    From my iTunes error message I hope that by correcting the Quicktime error the iTunes should in turn be fixed.
    I am using the latest installers for each and I can't understand why this is happening,
    I have tried completely removing my old version of Quicktime and tried to copy my other PC's Quicktime folder into this one however that has not worked. I have also tried using the latest installers multiple times however I always get the same error message.
    Please help me fix this error where Quicktime can't install,
    Thanks
    James

    Says windows install package does not operate yet I can install other programs.
    What's the precise text of the message, please? (There's a few different ones I can think of that you might be getting.)

Maybe you are looking for