• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Save the last state of a movieclip

New Here ,
Mar 29, 2018 Mar 29, 2018

Copy link to clipboard

Copied

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?

Views

764

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Mar 31, 2018 Mar 31, 2018

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

...

Votes

Translate

Translate
Community Expert ,
Mar 29, 2018 Mar 29, 2018

Copy link to clipboard

Copied

use cookies, JavaScript Cookies

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 29, 2018 Mar 29, 2018

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 29, 2018 Mar 29, 2018

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 30, 2018 Mar 30, 2018

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 30, 2018 Mar 30, 2018

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 31, 2018 Mar 31, 2018

Copy link to clipboard

Copied

you changed your request from something simple (saving user data to be used by a user when a user returns) to something more complicated (saving data to a database to be used by database owner).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 31, 2018 Mar 31, 2018

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 31, 2018 Mar 31, 2018

Copy link to clipboard

Copied

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.)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 01, 2018 Apr 01, 2018

Copy link to clipboard

Copied

Thanks for your clarification.

In the case you mention, I would only need the js code lines to be inserted in "Animate CC" and see if it works.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 01, 2018 Apr 01, 2018

Copy link to clipboard

Copied

yes, to use cookies you only need javascript.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 01, 2018 Apr 01, 2018

Copy link to clipboard

Copied

LATEST

?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines