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

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

Community Beginner ,
Jun 18, 2018 Jun 18, 2018

Copy link to clipboard

Copied

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>

?>

Views

1.6K

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

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

Votes

Translate

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

Copy link to clipboard

Copied

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

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

Copy link to clipboard

Copied

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

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

Copy link to clipboard

Copied

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

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

Copy link to clipboard

Copied

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

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

Copy link to clipboard

Copied

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

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

Copy link to clipboard

Copied

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

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

Copy link to clipboard

Copied

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.

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

Copy link to clipboard

Copied

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 ?

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

Copy link to clipboard

Copied

Je pense que vous pourriez utiliser AJAX avec $POST.

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

Copy link to clipboard

Copied

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

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

Copy link to clipboard

Copied

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.

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

Copy link to clipboard

Copied

merci beaucoups

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

Copy link to clipboard

Copied

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.

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

Copy link to clipboard

Copied

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

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

Copy link to clipboard

Copied

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

Copy link to clipboard

Copied

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 !

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

Copy link to clipboard

Copied

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.

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

Copy link to clipboard

Copied

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

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

Copy link to clipboard

Copied

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.

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

Copy link to clipboard

Copied

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.

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

Copy link to clipboard

Copied

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

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

Copy link to clipboard

Copied

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?

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

Copy link to clipboard

Copied

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

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

Copy link to clipboard

Copied

that's it exactly

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