-
1. Re: How can i pass a movieclip instance on mouse click to php
Ned Murphy Jul 11, 2012 7:41 AM (in response to Shoaib Ahmed 99)Search Google for tutorials about using the LoadVars class. Here is one result from searching "AS2 LoadVars tutorial" the has it working with sending data to a PHP file...
-
2. Re: How can i pass a movieclip instance on mouse click to php
Shoaib Ahmed 99 Jul 12, 2012 12:00 AM (in response to Ned Murphy)Dear Mr. Ned. I have already told the condition that i have some movieclip symbols with instance name. On clicking the symbol i want to pass the instance name or its value to php. Just this....
Thanks
-
3. Re: How can i pass a movieclip instance on mouse click to php
Ned Murphy Jul 12, 2012 5:03 AM (in response to Shoaib Ahmed 99)Yes, I have already informed you to search for a tutorial, and even provided a link to one that shows you how to interact between an AS2 file and a php file to send data, such as an instance name or value.
If your problem is that you do not know how to code a movieclip to be clickable, then you would use something like the following in the timeline that contains the movieclip...
movieclipName.onRelease = function(){
// code to initiate passing the info to the php file here
}
-
4. Re: How can i pass a movieclip instance on mouse click to php
Shoaib Ahmed 99 Jul 12, 2012 6:36 AM (in response to Ned Murphy)Dear Mr. Ned. I appreciate your help. Please just check my code for passing value. Now i'm using button instead of movieclip.
The code is:
on (release) {
getURL("result.php?value1=1");
}
is it right one?
Thanks
-
5. Re: How can i pass a movieclip instance on mouse click to php
Ned Murphy Jul 12, 2012 9:14 AM (in response to Shoaib Ahmed 99)It is better to use the timeline style of coding that I showed instead of placing code on objects like yours.
-
6. Re: How can i pass a movieclip instance on mouse click to php
Shoaib Ahmed 99 Jul 12, 2012 10:30 PM (in response to Ned Murphy)Will you please help me coding this....?
-
7. Re: How can i pass a movieclip instance on mouse click to php
Ned Murphy Jul 13, 2012 5:00 AM (in response to Shoaib Ahmed 99)Just change the code I offered to use your button's instance name
buttonName.onRelease = function(){
getURL("result.php?value1=1");
}
Note that you are going to replace the current page with the php page using that approach of passing the data to the php page. That is not what you asked about originally. So if that is not what you want to do, go to the tutorial I pointed you to or find another like it and follow it.


