A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Buttons in Movie not showing up when Loaded

  1. #1
    Senior Member
    Join Date
    Mar 2002
    Posts
    183

    Buttons in Movie not showing up when Loaded

    OK, this has been bugging me for about a week now. I have a movie, in which I load other movies into. You can see the site at:
    www.tailgata*******.com

    The problem is with the pictures section. If you go to:
    www.tailgata*******.com/pics.htm you can see that the file there has two yellow buttons used to control the pictures, however when that same file is loaded into the main index file, the buttons disappear.

    what the hell is going on?!?!?!?! I'm going crazy trying to figure this out.

    p.s. If you want to look at the .fla files, they are there under the same name, the main file is index.htm and index.fla

  2. #2
    Getting There! bitsk308's Avatar
    Join Date
    Jul 2000
    Location
    Phoenix, AZ
    Posts
    427
    It looks like a fairly simple design, I'm not sure exactly what's causing the bug. Maybe something to do with the targeting stalls it up. "_root" on the pics timeline refers to the index.swf's _root when it's loaded, and it's won _root when viewed on it's own. Try _lockroot = true on the pics.swf timeline to keep the targeting within that clip. Maybe won't help at all, but it's worth a shot.

    _b

  3. #3
    Senior Member
    Join Date
    Mar 2002
    Posts
    183
    Where exactly would I be placing that code?

    I actually tried placing a movie clip in pics.swf and added code so that if(hitTest) then it would go to the next frame. Again, it worked in pics.htm, but the movie clip didn't even show up when loaded into the index file.

  4. #4
    Getting There! bitsk308's Avatar
    Join Date
    Jul 2000
    Location
    Phoenix, AZ
    Posts
    427
    on the main timeline of your loaded swf (pics):
    code:
    this._lockroot = true


    Again, I'm not certain this'll help.

    _b

  5. #5
    Senior Member
    Join Date
    Mar 2002
    Posts
    183
    Nope, that did not work. I am really starting to get frustrated, I thought I had solved the problem. I was laying in bed last night, and it occurred to me that pics.swf might have been loading the pictures into a movie clip with an instance name of picholder in the main movie (since at one time I was loading each .swf into a separate empty movie clip). However, I found out that there was no picholder….so *sigh*. Then, I decided that if I couldn’t control the movie from inside itself, I would control it from the main movie.

    Great idea I thought!!! So, I created a button in the main movie, gave it the instance name nextArrow. Then, on the first frame of the main movie I set _root.nextArrow._visible = 0. Then, on the Pics link button actions, I added on(release) { _root.nextArrow._visible = 1} (of course if this worked I would add visible=0 on the other buttons). Then, on the button itself, I added
    on(release) {
    _root.homeholder.nextFrame();
    }

    …..and no go. I am going crazy. What is going on??

    p.s. I know I’m calling it correctly, because, after that, instead of nextFrame, I changed it to:
    on(release) {
    unloadMovieClip(_root.homeholder)
    }

    And it surely worked, so….I have no idea. I really thought I had it twice today

  6. #6
    Getting There! bitsk308's Avatar
    Join Date
    Jul 2000
    Location
    Phoenix, AZ
    Posts
    427
    I'm really sorry I hadn't bothered to test the site before, I just went straight to your .flas. Wierd thing is that it works fine for me. I go to www.tailgata*******.com and hit pics, and the images load with the arrows and the arrows work (except for a little bug with rewinding the images past the first one. Just for your reference, I'm on a mac running os 10.4.3 using firefox 1.0.6.

    _b

  7. #7
    Senior Member
    Join Date
    Mar 2002
    Posts
    183
    and I got them to work. All I had to do was take the _root. out of the unloadMovie and loadMovie in the pic.swf file....worked right away. I have no idea why. I guess I'm still wondering why the arrow in the main file wasn't able to control the loaded movie. OH WELL IT WORKS!!!

  8. #8
    Senior Member
    Join Date
    Mar 2002
    Posts
    183
    Quote Originally Posted by bitsk308
    I'm really sorry I hadn't bothered to test the site before, I just went straight to your .flas. Wierd thing is that it works fine for me. I go to www.tailgata*******.com and hit pics, and the images load with the arrows and the arrows work (except for a little bug with rewinding the images past the first one. Just for your reference, I'm on a mac running os 10.4.3 using firefox 1.0.6.

    _b
    Actually, I think you were checking it just as I was fixing it. I made the changes listed just above me, which for some reason fixed it right way, except for that little bug. Adding one stop(); fixed that real quick though. You must have checked it in that minute and a half span in between

    I really appreciate the help though, without the comment about the _root. I probably never would have fixed it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center