SitePoint Sponsor

User Tag List

Results 1 to 13 of 13
  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2007
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Flash design prob - any ideas?

    Hi,

    Having a design (or perhaps it's a dementia) problem day.
    Client wants basically, 5 images in a row on top.
    Underneath these row of 5 images resides a box, same length as the 5 images above, showing beginning content.
    When cursor goes over each image it changes the bottom content to show
    content in relation to the image we've just rolled over - still with me?
    Seems simple enough, however, although they want each of the 5 images to show relevant content when the cursor is rolled over, they then want the same content that resides in the big box in the beginning to appear again when the cursor rolls away. However................obviously when you move the cursor along the 5 images it shakes between rolling off from the previous image.
    So basically, they want.........content showing in box underneath to show at beginning, each of the 5 images to show their content when the mouse rolls over but to change back when the mouse is rolled off. However, when the mouse moves between each image at the top, they want the content below to change immediately to each individual image content, then roll back to beginning content. But this is showing a shaking between movies.......I'm losing it - any ideas?

  2. #2
    SitePoint Enthusiast
    Join Date
    Nov 2007
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb

    A possible solution is to put all 5 images in a separate movieclip, then apply the rollover to sepcific regions of that movieclip and only apply the roll-out for the default content when the cursor lies in the rest of the frame?

    Hope that makes sense?

    J

  3. #3
    SitePoint Enthusiast
    Join Date
    Oct 2007
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    J,

    Thanks for reply. Do you think an invisible button over the default content at the bottom would be best? I already have the 5 images in a separate movieclip, but had the rollout within.

    Thanks

  4. #4
    SitePoint Enthusiast
    Join Date
    Nov 2007
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile

    Quote Originally Posted by HMCx View Post
    J,
    I already have the 5 images in a separate movieclip, but had the rollout within.
    I'm not too sure what you mean by that.

    Take a look at this .fla and .swf in the .zip (any more TLAs?!)

    Here, imagine the five coloured squares are images.

    Over each of them is an invisble button.(Color>Alpha>0%) Each button overlaps.

    When the user rolls-over each button the dynamic text box below changes to a desired variable, defined within the on(rollOver) function.

    When the user rolls-out of any of the buttons - up, down far left and far right extremeties, the dynamic text changes to that of a global variable defined on the main stage.

    Invisible button code:

    Code:
    on (rollOver) {
    	var my_text = "one";
    }
    
    on (rollOut){
    	var my_text = _global.defaulttext
    	}
    Where "one" is the text for the caption/description.

    Global variable declaration:

    Code:
    _global.defaulttext = "your text here"
    Hope this helps

    J
    Attached Files Attached Files

  5. #5
    SitePoint Enthusiast
    Join Date
    Oct 2007
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    J,
    This is more or less what I'm looking for - you're saviour!!! I was ready to load the gun and shoot the client!!!!!!!! You'd never believe what they were after, but this is what I was after which will suffice. However, I cannot open the fla. file? says unknown format, I have Flash8? Any ideas?
    Many many thanks
    H

  6. #6
    SitePoint Enthusiast
    Join Date
    Nov 2007
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Talking

    Quote Originally Posted by HMCx View Post
    Any ideas?
    Yup, you'll have to upgrade to cs3!

    Just kidding. Hopefully this one will work.


    J

    P.S Drop me an IM with the site once your finsihed, wouldn't mind seeing the end result!
    Attached Files Attached Files
    Last edited by jc07; Sep 18, 2008 at 08:04. Reason: Post Scriptum

  7. #7
    SitePoint Enthusiast
    Join Date
    Oct 2007
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    J,
    Nearly gave me a heart attack there! But then I did laugh!!! Thanks so much,
    I'm nearly bald now with the madness of the day and wondering why I bother with some clients, talk about wanting bells and whistles!!!!!!!!!!!! They better like this or I will shoot them. Cheers, made my day!!!
    H
    PS will let you know how it goes

  8. #8
    SitePoint Enthusiast
    Join Date
    Oct 2007
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    J,
    Sorry to bother you, got fla. fine, understand, but how would you change to show
    a movieclip? would it be var_image = "movieclip name";? would you put movieclips of each 5 on same timeline?
    Thanks
    H

  9. #9
    SitePoint Enthusiast
    Join Date
    Nov 2007
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Which bit do you want to show a movieclip? Where the text is or underneath the invisible buttons?

  10. #10
    SitePoint Enthusiast
    Join Date
    Oct 2007
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi J,
    Thanks for replying. Was just surfing to try and figure out. If you take your 5 boxes as my images, I want to be able to click on each box and a movieclip containing just an image and text to appear, then when you click box 2 another movieclip should fade in showing another image and text and so on, but just as your example, when you move away from the boxes, underneath should go back to a default image/text just like yours says "default text". The movie clips would appear in the same place as your "default text". Does that make sense?
    Thanks a lot
    H

  11. #11
    SitePoint Enthusiast
    Join Date
    Nov 2007
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cool

    This is a really verbose way of doing this. I'm sure there is a much cleaner and easier way of doing this but here goes.

    Create the image you want to display as a movie-clip.

    Give it an instance name in the property panel.

    Poistion the movieclip in the grey area - off the stage - so it's not visible when the movie is played.

    Add this code to the rollover function:

    Code:
    InstanceName._x = 300;
    InstanceName._y = 230;
    InstanceName.gotoAndPlay(1);
    where InstanceName is the name you gave to the movieclip


    This positions the moveiclip using x and y co-ordinates and then, depending on whether the clip is animated (with a fade?) it will send the playhead to the beginning of the clip.

    Do this for each image you want displayed.

    To load a default image, add this code to the rollOut funtcion with the instance name being your default image.

    This would suffice for 5 images. Anymore and it would be much more efficient to load the images dynamically. However, my actionscript skills aren't that great to be honest!

    In the attached file, I've used the same movieclip in each case. The movie clip is situated to the bottom left, off stage. It is transparent due to the fade.

    Hope this helps ,

    J
    Attached Files Attached Files

  12. #12
    SitePoint Enthusiast
    Join Date
    Oct 2007
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    J.

    Thanks a lot, what I thought it might be, however, just like I was having problems; on your fla. the rollout it shows the movie still i.e., doesn't roll away. Any thoughts? Appreciative of your help.
    H

  13. #13
    SitePoint Enthusiast
    Join Date
    Nov 2007
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Was there a default image to be shown?
    Quote Originally Posted by jc07 View Post
    To load a default image, add this code to the rollOut
    funtcion with the instance name being your default image.
    Ideally, the most efficient way would be to load and unload the movie-clips on the stage. However, I haven't worked with flash in a while and am no Flash guru so not too sure how to do that.

    The alternative, is to position the movieclip off the stage again on the rollout function - so just use some silly values such as
    Code:
    my_clip._x = 9999;
    my_clip._y = 9999;
    I think that helps?

    J


Bookmarks

Posting Permissions

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