Skip to main content
arrow_man
Participating Frequently
March 29, 2018
Answered

Save the last state of a movieclip

  • March 29, 2018
  • 3 replies
  • 1024 views

How to save the coordinates of a movieclip that has been moved to be read the next time you visit the canvas page?

or/and

How to save the content of a dynamic text field to be read the next time you visit the canvas page?

    This topic has been closed for replies.
    Correct answer kglad

    Thank you, kglad.

    Yes, it should have been more specific. The canvas page contains tons of graphics created with Animate cc and is to be seen online and by different users. The idea is to save the name that a user writes in the "dynamic text field" until another user decides to rewrite it with their name.

    If you want, I'll write your answer as correct and write a new query.

    Regards


    nothing above is correct with your latest request.  you're going to have a lot to learn to do what you described.

    first, you'll need to use ajax in animate to communicate with your server-side code (eg, php) and you'll need server-side code to communicate with your database.

    you'll need to learn some javascript so you can understand ajax and you'll need to understand some php so you can login and query your database and return data to your ajax function to be used in animate.  (and you'll need to create your database if that's not already done.)

    3 replies

    arrow_man
    arrow_manAuthor
    Participating Frequently
    March 30, 2018

    Having in scene a dynamic text field ("name") and a button ("save_btn")

    How to write the code to save in an external document the name that is written in "name" dynamic text field?

    The approach can be synchronous or asynchronous and the external document can be json or mysql.

    Legend
    March 30, 2018

    How to store session data on a server is a question that has nothing to do with Animate. You would have better luck asking this question elsewhere, like on Stack Exchange.

    arrow_man
    arrow_manAuthor
    Participating Frequently
    March 29, 2018

    I mean some lines of code as an example assuming access to a mysql database or a json file.

    kglad
    Community Expert
    Community Expert
    March 29, 2018

    use cookies, JavaScript Cookies

    arrow_man
    arrow_manAuthor
    Participating Frequently
    March 30, 2018

    In scene, I have an instance (on_off) of a movie clip, a dynamic text field (operator_name) and a save button (save_btn).

    Each time "on_off" is pressed (it is a square of 100px with two frames) it changes color alternately between green and red.

    The "operator_name" is to write a name.

    Finally the "save_btn" button is to save the changes.