dcsimg
A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: multi-frame slide out shows frame one after tween.

  1. #1
    Junior Member
    Join Date
    Jul 2010
    Posts
    23

    multi-frame slide out shows frame one after tween.

    Hi,

    I've created a multi frame MC for placing each of my slide out images on and have added a tween slide out MC.

    my onrelease is working and I've correctly switched the image frame for the relevant picture being clicked before playing the tween MC.

    However once the MC stops playing the image MC is reverting back to showing frame one image.

    Why is this happening?

    Also why when the slide out MC is over the smaller clicklable image the hit area is still available through the image being shown?

    I've ensured that the slide out MC is on the top most layer, how do I make its backgroud solid so any clickable item underneath is not available.

    Thanks

    Demo file http://dance-music.org/popout.fla

  2. #2
    :
    Join Date
    Dec 2002
    Posts
    3,518
    Within the 'pop-up_panel_mc', Layer 1, frame 10, click on the instance of 'pop-up_inside_gr' on the stage. Change its properties from a graphic to a movie clip, give it an instance name of 'popup_img'. Do the same thing for frame 20.

    Still within the 'pop-up_panel_mc', layer 'actions', frame 10. Add the following code to the existing code.
    Code:
    this._parent.btns._visible = false;
    Create a new blank keyframe at frame 11, add the following code.
    Code:
    this._parent.btns._visible = true;
    On the main timeline, give the instance of 'page_content_scroll copy' an instance name of 'btns'.

    HTH

  3. #3
    Junior Member
    Join Date
    Jul 2010
    Posts
    23
    Fantastic, thank you so much.

    I was so pleased i'd got my head round all this after reading a pop-out tutorial.

    I revamped it for my flyout images and never noticed that frame 10 & 20 still had the old graphic instances instead of the movie clip I'd created. D'oh!

    Though I cannot get the clickable area behind to stop being clickable.

    As this was an extract from a large project, i'm not sure the heirachy is correct.

    plus the pop out cannot hide a specific movie clip as it might not be 'page_content_scroll copy' there are 6 copies dependent on what page you are on.

    how do I create a variable and store the MC instance name I wan't to hide/show so it can be dynamic?

    EDIT->
    As a test I put a trace on the actual image with the onrelease , output showed...
    _level0.pages.instance183.for_text.dillon
    So i put this on the frame10 of the slide out just to see if it would work...
    Code:
    _level0.pages.instance186.for_text.dillon._visible = false;
    but nothing vanished and the annoying hotspot underneath is still active over the pop out image?
    Last edited by Zultanite; 07-20-2010 at 01:29 PM.

  4. #4
    Junior Member
    Join Date
    Jul 2010
    Posts
    23
    OK, cracked it!

    I needed
    Code:
    this._parent._level0.pages.instance186.for_text.dillon._visible = false;
    EDIT ->

    I dont' get this one minute it works then it doesn't.

    What am I doing wrong?
    Last edited by Zultanite; 07-20-2010 at 01:58 PM.

  5. #5
    :
    Join Date
    Dec 2002
    Posts
    3,518
    Always give each of your on stage instances an instance name.

  6. #6
    Junior Member
    Join Date
    Jul 2010
    Posts
    23
    I'll have another go, I must be doing something stupid.

    Can you advise how I declare global variables to pass in the instance name I need making invisible at the time

  7. #7
    Junior Member
    Join Date
    Jul 2010
    Posts
    23
    I worked out why it's not working properly.

    each time the page loads it's given a new random instance number, after running a trace I got...
    _level0.pages.instance187.for_text
    _level0.pages.instance216.for_text
    _level0.pages.instance438.for_text
    _level0.pages.instance566.for_text
    _level0.pages.instance707.for_text
    _level0.pages.instance842.for_text
    How do i deal with this?

    All I want to do is hide any instance of 'for_text' regardless of instance### number

  8. #8
    Junior Member
    Join Date
    Jul 2010
    Posts
    23
    simple, as the template seemed to create new instances as the pages changed from the menu choice I just hid this path instance instead
    Code:
    this._parent._level0.pages
    it gave the desired result.

    and now will work regardless of the calling image onrelease event.

    Thanks for all your help.....I'm slowly getting there!

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