Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




PHP Interaction



Hey

I have MX 2004 and I was reading about getting Flash to interact with PHP.

Now, I have this script in Flash:

testw is a dynamic text box

var test = new loadVars();
test.load("test.php");
test.onLoad = function(ok)
{
if (ok)
{
testw = test.user;
}
}

In the test.php file, I have a variable, $user, set to "hey".

I just want the Flash to be able to display that variable in that script.

Now, this doesn't work, but I'm not sure how to get this to work.

Thanks



DevShed > Flash Help
Posted on: December 5th, 2003, 02:45 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

JS-2-Fla Interaction[? I M P O S S I B I L I T I E S ?] Can You Help'em Out?
all of the examples on the WEB that i found tryed and looked through.. are pretty basic, old and.. lets face it NOT-CROSSBROWSER at all.. can this kind of comunication actually work.. nowadys! and be relatively stable and crossbroser?
i have worked with that kind of matters last year.. maybe.. before the BIRTH of Gecho, NS 5.5,6.. and the "OhSoPrettyGoodLookingAndPromisinglyMagiclyEasyToU SE"-NEW!-DOMbrowsers.. and before the establishing of that JOKE-browser-thing OPERA...
I know I managed to make it work on.. IE an ns4,x... but i never faced the newDOMies.. and OPERA.. OK. With Gecho and DOM.. i think or i hope i'll find a way to deal with.. GetElementByID... blabla.. not that i realy know how to do it.. but at least thay have documentation of some sort.. but what about OPERA?

Anyway do you know.. how crossbrowser comunication from JS to FLA movie can be done.. hev you seen it somewhere on the WEB? Have you seen some link , reference, example, tutorial.. related.. or sth that can help out.. if you have.. tel me.. mail me.. help me out.. I'll be so greatful.. and happy.. and i'll owe you ONE..

Didko.

ASP Interaction
Hi guys, I am having trouble passing data from asp to flash. Is there is there a clear example of it that ca show ASP code too?.
Thanks very much in advance!

SWF Interaction
Is there any way to for one Swf to interaction with another one?

In more detail:
My main stucture is called main.swf.
Within this swf, I'm loading another swf called background swf which will change depending on where the user is on my site.

I'm loading another swf called nav.swf which will be the primary Nav for my site.

Overview:
Main.swf
Level0 bk.swf
Level1 nav.swf

Now here is where I get fuzzy. How do I get the nav.swf to interaction with the bk.swf.

I want to be able to target certain frames. Is this possible?
If it is what do I use for this?

Swf Interaction
Sup Ladies and Gents,

I ran into a small problem. I'm in the middle of a project, and can't seem to get 2 SWF files to interact properly.

I'm working with 2 files. One is called (portfolio.swf) and the other is called(thumbs.swf).

Now Portfolio is loaded into level 3. There is small nav that has a thumbnail link that will unload (port.swf) and load (thumbs.swf into level3). It's been clean up to this point.

Now within the Thumbnail gallery, when someone clicks on an image, I want to reload (port.swf) back into level3 and target it's corresponding picture.

I have tried

On release {
_level3.gotoAndPlay("framename")
}

also

_level3.portMC.gotoAndPlay("framename")

The main reason why I added portMC, cause the targeted frame is withing a Movie Clip called portMC, with the (port.swf)

Does anybody have any ideas what I'm doing wrong??? Any help would be much appreciated.

Ryan

Interaction Help
I am trying to make a card game like flash game where two people can play each other. Now I am not to sure on how I can actually do this in real time. If anyone can give me any pointers or help I would be very greatful.

Thanks for your time
- Rayn

Interaction
There is probably a tutorial on the matter but where? what I want to do is: ie: a birthday present wrapped and when the viewer clicks on it he sees what is inside; easy you may say, it can be done with a button, trouble is with a button when you move the mouse away from it it reverts to the first image; I want it to stay open then do other presents the same way until they are all showing the contents. Is it that difficult?

Interaction
Hello !

As i can do this:
button on release i change _x, _y coordinates of image (at html page)

I exactly now, what this can realize javascript, but as?

button.onRelease = function(){
getURL("javascript:...('...')");

}

Sergey Samoylenko.

Interaction Between 2 Swf's
What is the simplist way to interact between two seperate swf's on one page?
The reason I need to do this is because a want a menu to left justifed and have another swf centered in the browser.

An example of what im talking about:
http://www.nagaoka-id.ac.jp/gallery/gallery.html

Interaction Help
this is what i want to do:
load a dozen layer of images and then the user will be erasing them with the cursor. at the end there should be a a new image made from all those layers... Is this possible? and if it's then how?

thanks in advance

and please help me...

[F8] Mc Interaction
i have a block of text that the user is able to scroll through on a site i am building. i want the user to be able to rollover an image inside this text and a floating text box will appear next to the image with a brief explanation of what the image is.

i have set the image up as you would if you are using the mc as a button, so it has an up over and out state for the mouse interaction. i know to usually to get the effects to display you would use this action script on the time line


Code:
this.but1_mc.onRollOver = function() {
but1_mc.gotoAndPlay("over");
};
this.but1_mc.onRollOut = function() {
but1_mc.gotoAndPlay("out");
}


how can i do this for the image_mc inside the text_mc so that when the mouse rollsover it the text will display. i have never tried to do this before so i dont no really what i need to do with it. if there is a tutorial explaining how to do this please point me in the direction.

Interaction Help
I need to be able to do the following on an "onPress" function:


Code:
if(frameNo >20 but <30) and (>40 but <50) and (>60 but <70){
then do something
}else{
do something else
}
Please if anyone can help i would really appreciate it

Dominic

ASP Interaction
Is it possible to open a asp page inside the flash player or current flash page.
Let me expound on what I am trying to accomplish. I am creating a new e-commerce page, I want my first page to be complete flash, flash buttons and animation. I want to connect to the asp page and query the products catalog but for navigation reasons I would like to stay with in the original page. I have searched the net for a couple of days now with no luck. I am not even sure that what I am proposing is even possible but, so far I havn't found a yea or nay on the subject. Any help would be appreciated.
Thanks

Interaction Between SWF's
Is it possible to make the time line of one .SWF file interact with the timeline of another .SWF file when loading them onto the same stage? For instance, one .SWF file is a thumbnail gallery of a photo gallery, and the other .SWF file is the fullsize photo gallery. I want to make the thumbnails SWF create a reactive response in the timeline of the fullsize gallery on a rollOver command.

I'm trying to do this to make it slightly easier for dialup users to load this photo gallery without having to sit and wait several minutes for it to finish loading all 180 something photos in a single .SWF file split between different movie clips.

Php Interaction
I have a PHP script that sends various commands off to a socket/port on a remote machine.

I would like to pop-up a flash window that would show all the stages that will occur and highlight the active stage.

Is this possible with PHP and Flash?

MC Button Interaction
ugh, somone correct me. I have a MC named "invisi" that is set to alpha 0. I also have a button, and attached to the button I have this script:
on (rollOver) {
setProperty ("invisi", _alpha, "50");
}
on (rollOut) {
setProperty ("invisi", _alpha, "0");
}
on (press) {
gotoAndPlay (20);
}
Simply, I want the MC "invisi" to be put at 50% alpha when the mouse goes over the button and set it back to 0% when the mouse leaves the button. The script looks right to me...but its not working. Please help if you can.

Database Interaction...
Hi,

can anyone give me a brief indication of what's involved to create a flash CD-rom for kids with a searchable access db containing different jobs they may end up doing.

I'm OK with flash and know a little actionscript but am not sure how I'd link to an access database. If I had 5 jobs in the db and want to search it from within a flash interface would I have to use fscommand to talk to an ASP script that contains a connection string like this??

Set objConn = Server.CreateObject("ADODB.Connection")
strConnection = "DSN=frog;Database=frogdb;"
strConnection = strConnection & "UID=sa;PWD=;"

Or should I not bother with a dsn and connect to the db directly - How would I do this???

Cheers

ASP And Flash5 Interaction....
I was wondering why i can not seem to get my asp script to run..

i have a form in flash5 and it calls an ASP that takes the info and puts it into an email and sends it to me.

the site is in a popup window and I am having trouble, so if anyone knows anything that could be helpful please let me know..

here is the code on the submit button:

on (release) {
if (name ne "" and business ne "" and email ne "" and site ne "" and comments ne "") {
loadVariablesNum ("emailScript.asp","", "POST");
gotoAndStop ("good");
} else {
gotoAndStop ("bad");
}
}

name,business,email,site,comments,.. are all veriable names.
they do match up with variable in the asp script..

here is the site - (under contact)
http://www.access-now.net/goodie

THANKS in advance!!!!

Controlling MC Interaction..
I have a MC that I want to interact with another MC. I want, when the mouse goes over MC1 it plays MC2. The thing is, lets say MC2 is an animation of a ball bouncing. When you put the mouse over MC1 it starts the ball bouncing in MC2. However, if you do a onClipEvent as normal, then when you put the mouse over MC1 it starts playing MC2 at frame1. When the mouse goes over MC1 again it restarts MC2 at frame1. What I want to do is have, once you put the mouse back in MC1 it will play MC2 from the current frame. In other words, if MC2 is at frame 20 when the mouse goes over MC1 again, then it will continue playing at frame 20 and not jump back to frame1.
Am I being clear? I've seen this a million times, I just don't know how to do it.

MightyHokie
--
"One man with courage is a majority."
Thomas Jefferson, Virginian (1743-1826)

Interaction Between 2 Swfs
Hi Flashers!!
I have one swf cs1.swf placed in a movie clip mc1 which is placed in the main movie on level1 .I have another swf cs2.swf placed in a movie clip mc2 which is also placed in the main movie at level2. I want one button in cs2.swf to execute an action like gotoframe and play in cs1.swf.Is this possible, if so how ?.
I tried using tell target, but either i am not getting it right or it doesnt work? can anybody tute me on this or any fla or code on this. If there is any other way out pls lemme know.
Thanks in advance
shrejeet

Interaction Between Swf's In Different Frames
hi

i've been asked if it's possible to control a swf with a navigation swf which is in a different frame

we can't use fscommand - i said it couldn't be done - is there a way???

thanks for your help

Interaction With Visiblity PLEASE HELP MEE
I am building a site which has 6 menus...
There are 3 3dspinning cubes, each one if is it pressed will appear 2 menus, heres the trouble i Have....
When I press for example menu button 1 ok then if I press menu button 2 the script goes fine.
Now If I press cube 3 after I have press cube 1 and go back to press cube 1 again It appears all the submenus and its a mess.

heres what script I putted if thert can be of any help.

on (release) {
_root.BOX2MC.gotoAndPlay(2);
_root.BOXB2._visible = false;
_root.TESA.gotoAndPlay(2);
}
on (release) {
ifFrameLoaded ("_ROOT.TESA.", 7) {
_root.BOX2MC.gotoAndPlay(20);
}
}
on (release) {
_root.BOX1MC.gotoAndPlay(21);
_root.BOXB1._visible = true;
_root.BOX3MC.gotoAndPlay(21);
_root.BOXB3._visible = true;
}
on (release) {
_root.TESA.gotoAndPlay(2);
_root.FOIN._visible = false;
_root.INFO._visible = false;
_root.FORUM._visible = false;
_root.PROPAR._visible = false;
_root.PROFILE._visible = false;
_root.PARTNER._visible = false;
_root.TESA._visible = true;
_root.SAMPLES._visible = true;
_root.TEAM._visible = true;
}


on the last action i used the true because if I don't the menus don't appear at all...

Please help

Scrolling Interaction
This is a stupid question 'cause I'm new to Actionscript, but please help.

I have a MovieClip with loads of thumbnails (buttons), when the viewer moves over one with the mouse, it must enlarge that specific photo. Of the later I made movieclips as well. But I have no clue where to start to write this script.
I would appreciate any help.

Thank you
Anx

Keyboard Interaction
I'm trying to create a ScoreBoard for a basketball game this weekend. The facility does not have a scoreboard but they do have a nice projector w/a computer and a large screen. I want to create a packaged FLASH file that will act as a scoreboard. I want the points for the home team to go up or down by pressing the right and left arrow keys. Then I want the points for the away team to go up or down by pressing on the up and down arrow keys. I'm not very familiar with action script - any help or ideas, pointer, and such as to how I might do this would be greatly appreciated. Thanks!

Another Mc-interaction Problem
i have two scenes in my film.

on the main timeline of scene1 lies a movie which i named "mymovie".

now i want to go to a particular frame inside that movie from a button wich lies on the main timeline of scene2.

i already tried: on (release) {
_root.mymovie.gotoAndStop ("label");
}


or: on (release) {
_root.mymovie;
gotoAndStop ("label");
}


...but it just won't work. i think i'm using a wrong syntax...

Interaction Between Loaded .swf's?
Hello guys

When I load my different swf's into my main movie, is it possible to have the first one "close-up" before the other one is loaded? What I mean is, from my menu you have four options(menu buttons), when you press one of the buttons some content (some text and a picture) is loaded from an external swf. When you then press another button, I want the first swf to do some animation (fade out, fold together etc) before the next swf is loaded. Is this possible and how is it done??

Regards

Michael

PHP - Flash Interaction
Hello!

I've got a problem: I can't get some variables loaded into my flash movie. It is meant for a login script. The actionscript, which posts the key:

on (release) {
loadVariablesNum("http://localhost/onderzoek-online/site2/dev/Login.php", 0, "GET");
if (access == 1)
{getURL("http://www.onderzoek-online.nl", "_blank", "GET");}
else
{gotoAndStop(15);}
}

The PHP (test) script:

<?PHP
if($HTTP_GET_VARS["key"] == "correct-login")
{
echo "access=1";
}
else
{
echo "access=0";
}
?>

Thanks for helping me.

Interaction Between Movies
I can't remember the actual code for local connection between movies (to call functions and pass arguments between movies).

I know I once found it in the ActionSript Dictionary (Flash's Help menu), but I can't get the search applet to work any more, and I can't find it.

Any help will be apreciated!

Javascript Interaction
Hi there,

on (release) {
getURL ("javascript:void(launchvirgin('www.woowoos.com /ikey'))");
}


I've got this script, on a button, with the launchvirgin-script in the page where the first flashmovie is put.

I know the javascript works, but I can't seem to figure out the way to define the URL.

the requested url is http://www.woowoos.com/ikey
and that page is set in the FTP as indexw.htm, in the ikey-directory.

Can anyone tell me how to define the URL?

thanx in advance

Robin

Button Interaction
I have been trying to make a animated button that links to a page for months now, tried many different tutorials but still cannot manage it. Is there ANY tutorial out there that explains it right from the start to actually putting into Dreamweaver?...none of the tutorials on this site or most of the sites I have been to do...

Really frusfrating, once I understand this I can imagine the rest is not quite as complicated

Database Interaction ====== HELP
Is it possible to get data directly from an online database by querying from Flash itself .... not calling any middle layer script pages ??

Javascript Interaction
Hi there

I managed to create a .fla which activates javascript functions on the page where it's in.

But how can I open a window that is exactly the size of the screen, and looks like a normal window?

the code I've got for now is


function launchwoowoos (url,name) {
newWin =window.open(url,name);
}


and the result is a window with the same size as the previous... .

help?


robin
[Edited by linckx on 09-12-2002 at 09:40 AM]

Interaction Of Two Swf Files
Hi Masters

I have two diffrent swf in my html page. One of name a.swf and other having a name b.swf. Now i want that to play b.swf when i click on a button in a.swf.

Can anybody tell me how can i do that. I am in big truble.
Please help me.

cheers
Rits

Button Interaction
could anyone tell me how i could do this:

i want the user to press a button, and this sets off a countdown timer, if the timer is above 0, they are able to press a 2nd button. if the timer is below 0 the 2nd button is disabled...

my actionscripting is a bit rusty and any help would be great!

josh

oh yeah im using flash 5

Browser Interaction
I have a really big swf movie published and i want to use the back and forward buttons in the ie5 browser,to navigate whitihin the flash movie.

Is there any way to do this?

thanks!

Mouse Interaction
i'm interested in learning about making my movie interact with mouse position. An example would be three dimensional figures that rotate according to mouse position. i have a basic (very basic) knowledge of AS and i was wondering it anyone could tell me what areas of AS or objects and properties or whatever it is i should study to learn this. If you know of any tutorials on Flashkit or elsewhere that might help that would be great too. Thanks in advance.

Flash Interaction?
can flash files interact with each other???

What I mean is if I have a menu...and then I create a display window, can the menu send requests to the display window....so If in the menu I choose FAQ, I would want to tell the display window to list the FAQ links..or list etc...??

Can flash do that?

Masking And Interaction
Hey Folks,
I'm having a bit of an issue with masking layers. Currently, I want to use "spotlights" which the user can move via clicking to reveal positions on a background. As such, I want these graphics to be mobile. When the layer isn't masking the background, the spotlights work fine, but then the whole background is visible so there's no point. When the spots are in a masking layer, the user can no longer drag them! Argh!
I've tried using buttons on layers above the masking layer to direct the motion of the spotlights, but it seems that there is still an issue. It's like the graphics no longer register as instances once they are masked.

Any suggestions on how to get this effect?

Thanks!

Oject Interaction
Hi, I am trying to make a hittest. My programm creates objects. With a push of the button they all start falling. Now, some collide(all objects are from the same movie instance). How do I make the objects that are created collide with oneanother. I can't figure out how to do that. Can anyone, help me please?


Code:
//HIT TEST
onClipEvent(enterFrame) {
if(keyPressed == true) {
if (this.hitTest(_root.Brick) or this.hitTest root.Vice_Brick + i)){
hit = true;
fall = true;
}
}

Ball Interaction
i'm currently learning actionscripting and am playing with an experiment

basically, pretend you are looking into a rectangular room from one of the walls

from your position you can see a wall at the far end and the two side walls the floor and the roof

(see http://www.tesoweb.co.uk/experiment/balls.html for what I mean)

what I want to do is have a ball bounce from the wall I am looking from to the end wall, as the ball goes towards the end wall it gets smaller, it then bounces back from the end wall. It is also able to bounce off the other walls.

Any help would be greatly appreciated!

Movie Interaction
Hi
I am self taught in Flash and I am having difficulties with the following content for my elearning project.

I have created a .fla file called Main Menu and in frame 4 I have a clickbox that the learner has the option to click to view a short movie which has been created seperately with some animation included (filename Person ID Group.fla). Once this movie has completed I want the learner to be navigated back to the parent movie to continue. Also if they do not choose to view the option movie from the parent movie they are to continue on.

These files will eventually be loaded onto a 3rd party software for distribution to clients.

I have read about 'attachMovieClip', 'loadmovie' etc but have not been able to get them to work. I am now totally confused and would appreciate some guidance in this matter.

Many thanks

Debbie

Learning Interaction
I made use of the learning interaction extention quiz template. I selected the randomize option. However I ran into problems with the drag and drop interaction when I use randomizing. Sequential it works fine. But with randomizing it does not remove the dragable objects when movien onto the next question. This however is noly hapening when a drag and drop interaction other than the first drag and drop interaction is first displayed. I made sure that all the drag objects and drop targets for each interaction are differently named and that each interaction have a unique interaction id. I looked at the drag and drop component and found the following code at the bottom:
// This functions clears the active drag objects from memory during navigation
this.onUnload = function() {
var clearLast = _parent.SessionArray[_parent.session].drag_objects;
var len = clearLast.length;
for(var i=0; i<len; i++){
eval("_parent."+clearLast[i]).removeMovieClip();
}

However nothing I changed here solved my problem. Please help as this is very, very urgent as all projects usually are!!!

Learning Interaction
I made use of the learning interaction extention quiz template. I selected the randomize option. However I ran into problems with the drag and drop interaction when I use randomizing. Sequential it works fine. But with randomizing it does not remove the dragable objects when movien onto the next question. This however is noly hapening when a drag and drop interaction other than the first drag and drop interaction is first displayed. I made sure that all the drag objects and drop targets for each interaction are differently named and that each interaction have a unique interaction id. I looked at the drag and drop component and found the following code at the bottom:
// This functions clears the active drag objects from memory during navigation
this.onUnload = function() {
var clearLast = _parent.SessionArray[_parent.session].drag_objects;
var len = clearLast.length;
for(var i=0; i<len; i++){
eval("_parent."+clearLast[i]).removeMovieClip();
}

However nothing I changed here solved my problem. Please help as this is very, very urgent as all projects usually are!!!

Help About Php And Flash Interaction
hi i want to ask you that i want to pick data music files from php database to flash player how can i pick that do you have any solution or know a site about it anything like that...

Interaction With Audio
hello friends,

This is senthil. I am using flash MX. I want to create a character that speaks in synchronization with the audio file. ie, if the audio file says " hi..................how...................are..... ..............you" the character should animate................animate..................an imate................animate. clearly speaking.if the wave output of the audio file is none, than the character will be silent.if the wave output is raising then the character should also animate.is there any provision? am new to scripting.unfortunately my first project in my office happened to be this one.so guyn n gals whoever know it pls do send me a reply to

senthilarularasu@yahoo.com

thank you

Interaction With OnKey
HI!

I will create a full interaction menu/movie only with the onKey command.
With determined keys (highlighted scroll menu, stop and play movies, load movies, next frame aso.)

I tried this first:


stop();

myListener1 = new Object();
myListener2 = new Object();

myListener1.onKeyDown = function () {
if(Key.isDown(69)){
keypressed = true;
trace ("You pressed a key.");
nextFrame();

}
}
myListener1.onKeyUp = function () {
if(keypressed){
trace ("You released a key.");
keypressed = false;
}
}
Key.addListener(myListener1);

myListener2.onKeyDown = function () {
if(Key.isDown(81)){
keypressed = true;
trace ("You pressed a key.");
prevFrame();

}
}
myListener2.onKeyUp = function () {
if(keypressed){
trace ("You released a key.");
keypressed = false;
}
}
Key.addListener(myListener2);

First it works fine but more and more I use the keys it jumps out of controll in the timeline.

Server Interaction
How can I get information into a variable, not dynamic text, with information on the server the SWF file is being run on?

I initially tried using a PHP script to send the
$_SERVER['server_addr'] and $_SERVER['server_name]
variables. I was able to get the variables into a dynamic text field.
The dtext's var was set to md5sum and it had nothing set in the name field.

When I tried to compare _root.md5sum to a set value

PHP Code:



if(_root.md5sum == "123"){




it returned false. Even if the dtext showed the same value. Here is the code I'm using.

The PHP file

PHP Code:



<?
if($keyCode=="nfkey"){
printf("md5sum=%s", md5($_SERVER['SERVER_ADDR'].$_SERVER['SERVER_NAME']));
}
?>




The actionscript (Is lockated in a keyframe not a movie clip)

PHP Code:



var keyCode = "nfkey";
this.loadVariables("key.php", "POST");
if (_root.md5sum != "32bit md5sum hash would go here") {
    gotoAndStop("stolen");
} else {
    gotoAndPlay("key_passed");
}




I'm more of a PHP coder over a Actionscripter. I did used to make games, but never really did any server interaction. Please treat me like a nOOb when you explain what is happening.

Help With Movies Interaction
I have a movie call "menu.swf", and another movie call "thumbnails.swf". both are loaded into a new flash file movie with loadMovieNum. Now if there's a button in the "thumbnails.swf", and I want it so when the user click on it, it will tell the movie "menu.swf" to go to frame 2, how would I do that? thanks for your help.

MC Interaction Failing
im having problems trying to tell the archer (baddie_mc) to tell his arrow (baddie2_mc) to gotoAndPlay("DIE"), but it just wont work. No error message, no trace of the problem eccept that the arrow is disobeying the script. You see, when the archer dies, he goes to a frame where he is lying on the ground and in which says:

tellTarget("_parent.baddie2_mc"){
gotoAndPlay("DIE")
}

simple, or too simple?
thanks for the help.

File Interaction
Hello,, Im using Flash MX 2004

I have designed a character, and a background.

I havnt used any scripting before. I have little knowlege of flash but can follow instructions easily and would appreciate help.

I would like my character to be connected to the internet, so it can acess a web page of which the user can select. i.e www.google.com.

Once the character of flash program has retrieved information of the website.

I would like the character to act in an acording manner.

i.e if the usedr typed in www.weather.com, it would be sutible for the flash progrm to search through the page for certain keywords. for example snow, sunny,windy,rain, etc.

Once the program has identified these key words the character could react.

so if it retrieves snow, the backgrond of the flash character would change to snow, and I could perhaps animate the character to put gloves on, or if it were sunny, the character could strip off!

I know i will need to use scripting for this.

Could anyone think or know of a solution to my problem.

Thankyou

Amean

Copyright © 2005-08 www.BigResource.com, All rights reserved