A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: undesired frame behavior

  1. #1
    Member
    Join Date
    Jun 2007
    Posts
    41

    undesired frame behavior

    Hello,

    I have a flash header on my page which includes navigation and a slideshow. I dont want the slideshow to restart each time a link is clicked, so I have tried using frames.

    The problem is that the html frame gets its own scrollbar, and the flash header always stays on the top of the screen.

    Is there a way to get both of my frames to scroll as one (but not each scrolling within its own frame). The flash header is 250 pixels tall, so, after scrolling a couple of times, I want the flash file to go off the top of the screen, showing only the html frame, but Flash must not reload anytime I change the html frame.

    So, I am looking for one big vertical scrollbar that treats the two frames like they are glued at the edges.

    Thanks

  2. #2
    professional amateur
    Join Date
    Apr 2001
    Location
    Amsterdam
    Posts
    187
    not possible. 2 frames = 2 frames.
    your solution would be to not use frames. reload the page all the time, but to have flash remember (cookie / shared object) where it was in the slideshow so it can continue. (or get flex/AS3 and make an iframe within flash....)

    frames is soooo 1995
    back to work at flashclub.nl.
    Ngezi


  3. #3
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    No... thats whats frames do.

    I wouldnt suggest using frames at all.

    instead I would try to use either shared object to set/read a flashCookie to tell it to either start over or not. each time the page is loaded.

    or you could possibly do the same thing using a variable in the query/url string

    ie: http://www/yoursite.com/somepage.html?header=play
    or
    http://www/yoursite.com/somepage.html?header=noplay

    or whatever you wanted to call it...

    I would suggest either of those solutions over frames.

    I have links in my footer that covers both topics and how to implement them.

  4. #4
    Member
    Join Date
    Jun 2007
    Posts
    41
    Well this sucks. Using cookies or the GET method make good sense, but when I started making this, I really didnt have that in mind. I am afraid I didnt make the movie dynamic enough to implement those methods, but maybe someone can help me with that. This is how I am looking at this...

    I load all of my pictures through a database using POST data, and then work them into an array, which is then passed to my magical slideshow class when all of the pictures have loaded. In order to make it seem like the slideshow never stopped, I would have to save the state of ever photo on the screen (30 of them, with random locations, rotations, and order). Passing my array full of pictures would not be a huge problem, but how to restore the screen to where it was might be a little out of my league right now given time constraints.

    (Im in AS3)
    Are there any simple fixes, or is this going to require me to redesign my movie. Could I copy the entire root timeline DisplayObject, save it in POST data or a session, and then force it back in? I really have now idea how I should do this.

    Thanks for the help.

  5. #5
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    I have no clue about AS3... (sorry)

    but yes I seem where this is a problem.. because it isnt a 'simple' banner/header..

    the saved 'state' has alot of data to go with it..

    although extremely possible..

    I do the same thing (sorta) with a project of mine:

    www.digitalbikebuilder.com

    where you can save your 'design'..

    parts (images)..rotations, scale, placement (x & y)..and load them all back in..

    Im not sure how you movie is set up..if it can even take the saved data and replace the objects.

    but you saving the data I think would be easy enough..

    just save out an object array...and load/split it up on each page load...

  6. #6
    Member
    Join Date
    Jun 2007
    Posts
    41
    Thanks for your help whispers.

    I haven't done much flash, and when I thought this through, the way I wanted the page seemed like it was intuitive enough to work, and I really never gave it a second thought until now.

    I though of one other possibility, although this may be beyond the scope of this thread, or section for that matter.

    Could I create a div class for the body of my page that gets reloaded through some javascript and php. Im not sure if this is what ajax would be used for, but it was a thought none the less.
    I feel like I might know how to do this, but then, how do I call a javascript function from flash?

    Otherwise, I guess I will have to try and work on the save state.

    Thanks again

  7. #7
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    Quote Originally Posted by cpetzol2
    Thanks for your help whispers.

    I haven't done much flash, and when I thought this through, the way I wanted the page seemed like it was intuitive enough to work, and I really never gave it a second thought until now.

    I though of one other possibility, although this may be beyond the scope of this thread, or section for that matter.

    Could I create a div class for the body of my page that gets reloaded through some javascript and php. Im not sure if this is what ajax would be used for, but it was a thought none the less.
    I feel like I might know how to do this, but then, how do I call a javascript function from flash?

    Otherwise, I guess I will have to try and work on the save state.

    Thanks again

    hi... yes on both accounts.. you can keep your static (flash) 'header' and reload the html for each page using javaScript/Ajax....


    and to talk to functions both javaScript funtions in the html page OR function you want to register that reside IN flash.. you woudl use

    ExternalInterface calls


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