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>
?>
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...
Copy link to clipboard
Copied
that looks like you're using edge animate, not animate cc.
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
Copy link to clipboard
Copied
your code shows you're using the edge dreamweaver widget.
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
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).
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.
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.
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 ?
Copy link to clipboard
Copied
Je pense que vous pourriez utiliser AJAX avec $POST.
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
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.
Copy link to clipboard
Copied
merci beaucoups
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.
Copy link to clipboard
Copied
Je pense que j'ai approché les choses a l'envers.
Copy link to clipboard
Copied
voir ceci aussi:
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 !
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.
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
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.
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.
Copy link to clipboard
Copied
thanks , i felt dumb not to get it to work....
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?
Copy link to clipboard
Copied
Hope that makes sense.
I do not know what his ANCC is about.
Copy link to clipboard
Copied
that's it exactly