Welcome, Guest
  • Author Topic: CFM Session Management w/Flash  (Read 1304 times)

    Jim Mattingly

    • Server what's that
    • *
    • Posts: 1
      • View Profile
      • Email
    CFM Session Management w/Flash
    « on: 02/26/02, 17:39 »
    Can I use CFM to tell Flash where to go in a movie timeline?

    Example: An e-learning site that allows users to log out and then log back in and return to where they left off...

    Any suggestions?

    Flash-db

    • Administrator
    • Systems Administrator
    • *****
    • Posts: 1876
      • View Profile
      • Flash-db.com
    Re:CFM Session Management w/Flash
    « Reply #1 on: 02/27/02, 14:51 »
    Yes you can use CFM to tell the flash movie where to go - but it can become complicated.  

    A basic what would be after a user clicks on a certain area or logs into the site and needs to be directed to a different area - use loadvariables to send the users information to the script - Then in the Script you'll have to write the code that either queries the database for a location that he should goto or have some other code in their that handles this part.  

    Ok so what you want to return is either a Number corresponding to a frame - Or a string corresponding to a frame label that you want the user to go to.  So it would be something like this that is printed out after the script has been processed:

    Location=TestArea3

    In your flash movie you could have a movie clip that loops and continually checks for a Value for Location to be returned.  Then after it has been returned have a piece of actionscript that looks like this:

    if (Location ne "") {
    gotoAndStop("TestArea3");
    }

    You'll have to have a frame labeled as "TestArea3" for this to work.  

    You can also do this with Movie Clips for example if you wanted to either Load a movie clip that corresponds to TestArea3.  

    You can do this with Frame Numbers as well - but sometimes it's harder to work with integers then it is with strings when you are using the returned data to control the flash movie.  
    Flash-DB