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

Comment faire changer une variable a partir d'une animation en HTML5 ?

Community Beginner ,
Jun 18, 2018 Jun 18, 2018

Bonjour a tous et a toutes , j'ai fait une petite animation avec animate CC en html5 et je voudrais faire interagir cette animation avec mon site , en faisant changer une variable php dans la page quand QQn clique sur l'animation.

Une fois j'ai reeussit a ouvrir une page a partir de animate mais c'est tout

Je voudrais que dans animate CC une action sur un objet ou autre fasse changer ma variable dans ma page , la variable "achanger

" et lui donne par exemple la valeur 1 , qqn a une idée ??  merci !

<?php

//achanger c'est la variable qui doit passer à 1 si on clique sur un bouton de l'animation

$achanger = 0;

<div id="logo">

        <object id="EdgeID" type="text/html" width="257" height="170" data-dw-widget="Edge" data="animation_assets/logobis3/Assets/logobis.html">

        </object>

</div>

?>

2.1K
Translate
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

LEGEND , Jun 21, 2018 Jun 21, 2018

I tried that and no joy.

the OAM file is actually a zipped file. It is inserted as this:

<object id="EdgeID" type="text/html" width="570" height="420" data-dw-widget="Edge" data="animation_assets/brouillon/Assets/brouillon.html">

So we need to target the ANCC file through the object I suppose orthe opposition rather. hum...

Translate
Community Expert ,
Jun 18, 2018 Jun 18, 2018

that looks like you're using edge animate, not animate cc.

Translate
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 Beginner ,
Jun 18, 2018 Jun 18, 2018

i am using animate CC not edge , why do you say this ? I exported in html format to add it .. really

Translate
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 ,
Jun 18, 2018 Jun 18, 2018

your code shows you're using the edge dreamweaver widget.

Translate
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 Beginner ,
Jun 18, 2018 Jun 18, 2018

Under dreamweaver i clicked on the "animated composition" , it allowed me to import "oam" files , that are bundles of files , and so i clicked on a "ANIMATE CC" project that i exported under animateCC and it wrote the lines that we speak of

        <object id="EdgeID" type="text/html" width="257" height="170" data-dw-widget="Edge" data="animation_assets/logobis3/Assets/logobis.html">

        </object>

I did not write these really .... if i do something wrong please tell me maybe you have a clue

Translate
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 ,
Jun 18, 2018 Jun 18, 2018

i don't know anything about dreamweaver (except it's a problem mixing with animate files) nor edge (except it's confused with animate cc).

Translate
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 ,
Jun 18, 2018 Jun 18, 2018

Avec Ege Animate, vous devriez  référence le 'stage'. Ca devrait être la même chose avec Animate CC.

Translate
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 ,
Jun 18, 2018 Jun 18, 2018

Zipzap32  wrote

        <object id="EdgeID" type="text/html" width="257" height="170" data-dw-widget="Edge" data="animation_assets/logobis3/Assets/logobis.html">

        </object>

Est-ce que vous avez le correct ID de votre composition? Je pense que chaque composition a un numéro dídentification spécifique. Mais je ne suis pas sure. Avec Edge Animate c'était le cas.

Translate
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 Beginner ,
Jun 18, 2018 Jun 18, 2018

en fait ma question c'était si vous connaissez une ligne en HTML5 canvas pour agir sur une variable php ? est ce que c'est possible ?

Is there a way to change a php  variable inside ANIMATECC ?

Translate
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 ,
Jun 18, 2018 Jun 18, 2018

Je pense que vous pourriez utiliser AJAX avec $POST.

Translate
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 Beginner ,
Jun 21, 2018 Jun 21, 2018

Je vais laisser le php pour utiliser du javascript , si vous pouvez m'aider ca serait sympa , je voudrais faire la meme chose que en haut du topic mais avec du javascript , donc voici mon code :

<body>

<script>

        var test = "un super test";

</script>

<object id="EdgeID" type="text/html" width="570" height="420" data-dw-widget="Edge" data="animation_assets/brouillon/Assets/brouillon.html">

</object>

</body>

</html>

Dans animateCC j'ai mis :

this.button_1.addEventListener("click", fl_MouseClickHandler.bind(this));

function fl_MouseClickHandler()

{

    alert(test);

}

l'idée c'est que animate et dreamweaver s'échange des informations , qqn peut m'aider svp ??? MERCIIIIIIIIIIII

Translate
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 ,
Jun 21, 2018 Jun 21, 2018

Bon je vais essayer de vous aider mais je ne promets rien. Je viens de Edge Animate après avoir abandonné FLASH pendant des années et j'ai recommencé d'utiliser ANCC ce mois-ci. La chose dont je ne suis pas sure, c'est le code de DW pour l'objet. Enfin, on verra. Je vous ferais savoir bientôt.

Translate
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 Beginner ,
Jun 21, 2018 Jun 21, 2018

merci beaucoups

Translate
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 ,
Jun 21, 2018 Jun 21, 2018

Bon, je ne peux pas communiquer avec Animate cc quand c'est un objet dans le ficher html. Je peux communiquer directement si j'ecris le script dans le ficher html crée par publish. Je continue a rechercher.

Translate
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 ,
Jun 21, 2018 Jun 21, 2018

Je pense que j'ai approché les choses a l'envers.

Translate
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 ,
Jun 21, 2018 Jun 21, 2018
Translate
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 Beginner ,
Jun 21, 2018 Jun 21, 2018

I think this is better if i speak in english , what i need seems easy to me but i'm stuck , i have a button in my animate CC project , what i want is that this button (once pressed) would change a variable in my html website and increase it by 1

here is an example : my html file is like :

==================================

body

<script>

var test = 0;

alert test;

</script>

/body

and here is the draft of the animate CC project :

======================================

this.button_1.addEventListener("click", fl_MouseClickHandler.bind(this));

function fl_MouseClickHandler()

{

    test = test+1;

}

PLEASE help !

Translate
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 ,
Jun 21, 2018 Jun 21, 2018

Zipzap32  wrote

here is an example : my html file is like :

==================================

body

<script>

var test = 0;

alert test;

</script>

/body

and here is the draft of the animate CC project :

======================================

this.button_1.addEventListener("click", fl_MouseClickHandler.bind(this));

function fl_MouseClickHandler()

{

    test = test+1;

}

Yes, that works perfectly.

Translate
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 Beginner ,
Jun 21, 2018 Jun 21, 2018

it doesnt work with me , the variable is not setting itself properly between the webpage and the animate CC animation , my purpose was to make it interract , i need a variable to increase or decrease itself , right now the program bugs somewhere

is there a guide somewhere with animate CC tutorials ? please i need help

Translate
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 ,
Jun 21, 2018 Jun 21, 2018

I just created an Animate HTML5 movie with nothing but the code alert(test + 1);

I published it.

In the generated HTML code, I added the line <script>var test = 1;</script> as the first script tag.

I ran the HTML document and it displayed 2 in an alert box. No problems.

Translate
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 ,
Jun 21, 2018 Jun 21, 2018

te problem is that it works if you use the hrml created by ANCC butnot if you have the piece as an object in another hrml file. He is publishing an AOM and adding it as an object in his page. then he wants to communicate betweehn animate and the other html page, not the animate html itself.

Translate
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 Beginner ,
Jun 21, 2018 Jun 21, 2018

thanks , i felt dumb not to get it to work....

Translate
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 ,
Jun 21, 2018 Jun 21, 2018

resdesign  wrote

then he wants to communicate betweehn animate and the other html page, not the animate html itself.

We're going to need a much more precise definition of what "other" means here. Are we talking an embedded iframe? A popup window? Is there cross-domain communication?

Translate
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 ,
Jun 21, 2018 Jun 21, 2018
  • He published an ANCC file as an OAM
  • he inserted this OAM in an html file (his site) I guess using DM<inset<html/animtedcompostion
  • he added a script in the above html file with the variable
  • he wants to change the var in the site html page that contain the ANCC OAM object with code into ANCC so from the ANCC object.

Hope that makes sense.

I do not know what his ANCC is about.

Translate
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 Beginner ,
Jun 21, 2018 Jun 21, 2018

that's it exactly

Translate
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