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




Vars & Events From/to C++:Communication?



I want to build the graphics and program basics in Flash 5 and then dynamicly controll the variables and display of instances from C++. In other words let Flash do the webbing and showing while C++ does the calculating and thinking and responding. Is this possible? I am lead to believe this but have yet to find clear documentation. Thanks.



FlashKit > Flash Help > Flash ActionScript
Posted on: 02-06-2002, 01:03 PM


View Complete Forum Thread with Replies

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

Vars & Events From/to C++:Communication?
I want to build the graphics and program basics in Flash 5 and then dynamicly controll the variables and display of instances from C++. In other words let Flash do the webbing and showing while C++ does the calculating and thinking and responding. Is this possible? I am lead to believe this but have yet to find clear documentation. Thanks.

Vars & Events From/to C++:Communication?
I want to build the graphics and program basics in Flash 5 and then dynamicly controll the variables and display of instances from C++. In other words let Flash do the webbing and showing while C++ does the calculating and thinking and responding. Is this possible? I am lead to believe this but have yet to find clear documentation. Thanks.

Object Communication , Methods,events,broadcasters,dispatchers.. My Ever Static Probs
Hello Gary,

I am not completly clear about object coomunication.
Would it be possible for an object from a private class to communicate via methods calling with another object
also to be instantiated from a private class?
Please explain.
Actually, what does the private modifier does regarding classes?
Can I have communication between static classes?
Where can I learn more about object communication in As?
Another thing: why does the Singleton uses the static modifier? Every instance of the SingletonClass will
hold the same for that static holder, but if there is never more than one instance of it why do we need it
to be hold the same for every possible instance.

Also, what could be the use of using the private modifier for a class? What could a private class be used for?
What about a private static class?

please explain and clarify me and us all.

Thanks,
Daniel Alexandre
ps. It would be great if one Guru out there could do a tutorial or/and a video on the subject. The Flash community would thank you!

MX Frame Events / Vars Question
i've got this code inside the MC that i'm attaching to the stage:


PHP Code:



this.onLoad=function(){
    //myName=this._name;
    //trace(myName);
    myColor = new Color(this);
    myColor.setRGB(0xff0000);
    
}
this.onLoad();

this.onEnterFrame=function(){
    myColor.setRGB(0x0000aa);





why doesnt' this work? is it not seeing the vars named in onLoad because they're name inside a function? i'm still fuzzy on this part of MX...
thanks in advance,
-mojo

Fire Order Re: Setting Vars, Contingent Events, And Depth
will buttonB play if it has a higher zindex?

buttonA - width200,height200 at 0,0

Code:
on (rollOut) {
junetojuly=true;
}
buttonB- width200,height200 at 100,100

Code:
on (rollOver) {
if (junetojuly) {
play();
}
}

POLL: Best AS3 Send Vars And Load Vars Method
Hi Guys,

Can you help me decide which way to go with as3 to php and back again.

I generally use sqlite, xml or mysql for a database. I don't know if that matters. And sometimes (rarely) I don't use a database at all.

In the past (with as2) I always went custom. Im not sure If id be better off doing something else.

If you have another suggestion please let me know.

Converting ALL Vars Of A Clip To Global Vars -possible?
I wonder if it is possible to convert ALL variables set within a movie clip to global variables, using a self-defined prototype like movieclip.varsToGlobal or something like that. Here's the code I tried:


Code:
for (z in this) {
if (typeof (this[z]) != "movieclip") {
eval("_root."+z) = eval(z);
}
}


This seems to work, it copies ALL items found in the clip (excepted movie clips) to the root. But I am not sure WHAT things are duplicated to the root exactly. Just the variables? Or anything else I don't expect?

Mike
x-pressive.com

Local Vars Versus Class Vars
Hey guys, if a function gets call alot of times, such as a collision detection function in a game, will it be quicker to run if the variables for the function are declared and initialised outside the function as class variables? Or should they are declared and initialise inside the function as local variables everytime it is called, for good software engineering?

Register Classes - Mc Events Vs Button Events
I'm experimenting with register classes today, and wasn't careful typing the code with only button events for my custom movie clip class.
First I wrote

Code:
CustomClass.prototype.onMouseDown = function(){
this.gotoAndStop("blue");
}// end onMouseDown
Then all the mc-buttons in my movie went to the blue state. (.fla provided)
When I realised the error, I corrected it, and now it works.
I just don't understand what happened.
Do Movie Clip events turn out to be class methods (don't know what to call it in Java script, only used to Java), while button events stay instance events??
Hope somebody have the time - it's not about life and death, but it would be really nice to know how these things work.

Respond To Mouse Events Inside A Movieclip That Has Mouse Events...
I have a main MC that has a couple of mouse events associated with it (onPress mainly). There are also MC's inside this main MC that have Mouse events associated to them (onPress, onMouseMove, onRelease). The child MCs don't seem to get the mouse events (which makes sense, the parent is taking over the event)...how can I make this work? I don't want to have to delete and recreate the event handlers like 900 times as its not efficient...there has to be a better way.

Can Events Trigger Other Events?
Hello brothers and sisters of the Nets most helpful community!

I am going insane in the membrane trying to get my custom cursor to work in my scene. I have successfully completed many tutorials about how to do this in AS3 (the danielmclaren.net solution was particularly helpful) and have scoured this forum a bit for info, and (gasp) also read through a bunch of stuff on live docs. But, alas, I cannot understand why I cannot get the custom mouse (cursor) to work in my file. It works like a charm until I try hammering it into my scene.

I believe that the problem has something to do with with too many events being fired off at the same time and (possibly) my not removing them at opportune times. Or, maybe my coding style is not so elegant? Anyway, the FLA (with easy-to-read structure and commenting) can be downloaded here since I am not certain which part of my code is causing the custom cursor not to work. With all the comments, it should not be too difficult (I hope) to see what it is I am trying to do.

Any feedback would, as always, be most appreciated.

Download_FLA

Regards,

-john

Load Vars Doesn't Want To Load It's Vars
I'm trying to initiate a sendAndLoad operation from a remote movie clip. When the visitor clicks the clip, it triggers a LoadVars object in a different movie clip, and asks it to sendAndLoad. This is the code on the trigger clip:

this.onRelease = function (){
_root.albumHolder.albumLoader.albumName = "album1";
_root.albumHolder.albumLoader.sendAndLoad("readAlbum.php",...);
}

where "albumLoader" is the LoadVars object (already created inside a movie clip called "albumHolder"), and "albumName" is it's only variable.

The LoadVars object is created when the movie loads:

albumLoader = new LoadVars();
albumLoader.albumName = "";
____

What I have done so far:

1. I've used a trace(albumLoader.toString()) to verify that albumLoader indeed has a variable called albumName, and that it's value is "album1";

2. I've used a text box to display that trace value. That was interesting. The output was something like: "%5BType%30Method%5&albumName=album1"

3. I've accounted for all possible variable problems by simply calling the sendAndLoad from the button, and fixing the intial value of albumName to "album1"

4. I've used loadVariables("readAlbum.php?albumName=album1,....); This works, so I know that the paths are right, MySQL daemon is working, etc.

It seems that sendAndLoad either will not send the albumName variable, or it is sending a value that is unrecognizeable.

I HAVENT tried the sendAndLoad operation from the clip where albumLoader resides, but this kind of defeats my purpose as I would like to have different clips in the movie talk to this object at different times. As well, there is another LoadVars object doing a load operation, and it's working fine - I'm pretty sure I'm doing something right.

Thanks for any help - my apologies if the answer is a no-brainer... I'm flying by the seat of my pants with this stuff. Loving it, but feeling like I'm riding Wonder Woman's invisible jet plane - the ground is just WAY to visible, and WAY too far away....

PHP Communication
Hi !
I guess I am not the first with this problem but I have not found where the solution is... ;-(
I have a swf file that use some php programms to communicate values. Every thing is allright on my hard drive but I put the swf file on a http server, it apparently don't read datas...

Where is the solution ?

Thanx a lot...

Communication Between Two Swf.
I´ve got several text variables within a .swf and I´d like to know if there is a way to send them to another .swf

Thanks in advance

.swf To .swf Communication ?
I spent hours on this swf to swf thing and still failed. I will not give up but I could use some help?

IM trying to link My two flash movies(that are on the same page) together. I would like my bottom flash movie buttons to open a pop "upmenu" out of the top flash movie. I was told I could do this from nerdinside with this link http://www.polar-lights.com/fla/fla/sendcommand.zip
and I havent heard from him sense.

Here is my button code

on (release) {
// Notice the Decoy A / WIN1
if (_root.decoyA._currentFrame == 1) {
_root.draglines.swapDepths(10);
_root.WIN1.swapDepths(10);
tellTarget (_root.decoyA) {
gotoAndStop (2);
}
tellTarget ("WIN1") {
// Notice the WIN1
loadVariables ("text.txt", "text_box");
// load from txt file
loaded = 1;
}
} else if (_root.decoyA._currentFrame == 2) {
tellTarget (_root.decoyA) {
gotoAndStop (1);
}
tellTarget ("WIN1") {
loadVariables ("blank.txt", "text_box");
// loads a blank text file when closed to kill text
loaded = 0;
}
}
tellTarget ("click") {
gotoAndPlay (2);
}
}

How would I integrate the code from this zip file http://www.polar-lights.com/fla/fla/sendcommand.zip that (NURD INSIDE) sent me into this to add to my bottom buttons to link to Win1(which is my popup menu in the top flash section).

This is what I tryed so far:

on (release) {
getURL ("javascript:go()");
}
I added this to the top of my button code.

I also tried making my bottom buttons from the zip file and just deleting the starwars pic and loading....


Any comments would be appreciated.
Thanks,

Communication SWF To SWF
Alrighty

I have two SWF files (file1.swf and file2.swf), and I have two different frames (frame1 with frame1.html, and frame2 with frame2.html) each of them holding their respective swf's.

I want file1.swf to act as a menu... when a button is clicked, I want it to change the url of another frame: (name: main, filename: content.html) and at the same time, I want it to execute a function in file2.swf.

1. How would I make file1.swf talk to file2.swf?
2. How would I make the frame main change content.html to something else?

I realize that it requires javascript, but I seem to have trouble with my target= and it seems to pop a new window everytime...

Any help would be greatly appreciated.

Communication Between Two .swf's
Hi

just wandering if it is at all possible to have two .swf files, one with navigation, one with the content, then when the button id pressed in the navigaion .swf the content changes.

thanks

Communication Between Two .swf's?
Hi,

I was wondering if it's possible for two separate .swf files to exchange information and work together. If so, what's the basic idea behind it?

For example, if you had a webpage with two .swf movies in it (call them top.swf and bottom.swf), could you have a button in top.swf that changes the background color of bottom.swf when it's clicked?

Thanks!

Communication Between SWF's
Hey there,
I've hit a block and need a bit of knowledge...
I've got 2 sfw's on a page, I need to unload or goto and play to have it unload on keyframe inside it on sfw #2. When I choose a menuitem in #1 I should be able to do this right?

I've tried various method’s and no luck yet...

I thought that a simple
on(release)
Unload("http://site.com/#2.sw");

But no

Tried levels to but not in same movie so didn't figure this to work.any tips i'm probably missing obvious things but tries a bunch and no luck!

Help would be great!!!

Thanks for any i get!

mmeye

Swf To Swf Communication
I want to make two swf files to be communicated. for example::
I've two files "a.swf" and "b.swf". in a.swf i have one varaiable named "myVal" and itz value is "true"... ie (myVal="true").. i vant to pass this value from "a.swf" to "b.swf".... I've used LoadMoviennum , nbut it needs explorer... i want to do it with swf files alone

Communication Between 2 .swf's
Is it possible for a swf loaded in level 1 of the main swf to control the main swf?

I am trying to get a button in level 1 to make the main swf to goto frame 30.

I am using Flash MX

Communication
If I have two swf files on a web page...say one that lets the user enter information and another with shapes on it (for simplicity) is there a way for the two movies to communicate without having to sent info to a server and back? (directly) thanks!

mikell

Communication
If I have two swf files on a web page...say one that lets the user enter information and another with shapes on it (for simplicity) is there a way for the two movies to communicate without having to sent info to a server and back? (directly) thanks!

mikell

.swf Communication
If you have 2 different .swf on the same HTML page, can these 2 .swf files send commands back and forth to each other using tell target?

IN other words can i have a button in one file that tells the other one to load the movie. OR can this only be done in the same movie?

Thanks..

Swf To Swf Communication
using flash mx
Does Anyone know how I can send a message from one swf (level_10) to change the value of a variable the caller swf (level_1)?
Cheers

Communication?
what do i need to do to get 2 separate swf 's to communicate with each other, if they are placed in two separate table cells on the same html page?

rat

XML Swf Communication
i have one XML doc, and two swfs
accessing it. the swfs are both loaded into MCs in the
main timeline. the nodes in the XML are grouped into
sections with children who are items with info in attributes.


Code:
EX:
<project label="Misc">

<item label="Mural" url="images/projects
/project_img.jpg" link="www" resp="info">My description is here</item>

</project>


one swf("navSwf") goes through the XML and generates a
menu of link using html textboxes and hrefs. thats
fine. the other swf("displaySwf") take the nodes info
and displays it. that works fine. on the nav hrefs i
currently have asfunctions(which do nothing, i am
thinking its the way to go), and i am trying to pass
the info of the selected item from the navSwf to
displaySwf.
EX:
in navSwf i click on item 3, so i need to tell the
displaySwf to access that item 3 node and
parse/display its attributes.

it is here where i am lost, how can i do this?

let me explain a bit about the swfs. in my main timeline i have 3 empty MCs. one loads a main nav swf, one that loads a sub nav swf, and one that loads content...so if i someone clicks on the "project section", the subnav project swf loads, parses the project XML. the content swf also parses the project XML to load the first project's info. which works fine, but the subnav swf is a html text box with hrefs, and i need to pass the node info that selected in the subnav to the content swf.


i may not be setting this up the best i understand,
but any help to get this working is greatly
appreciated. thanks

Swf Communication
I have a flash movie for navigation, and a movie for the page it self....is there anyway to have the navigation send as to the main page movie...like a gotoAndPlay......

I want to do an outro play on a hybrid site.......

Possible?

Help XML Swf Communication
bear with me here. i have one XML doc, and two swfs accessing it. the swfs are both loaded into MCs in the main timeline. the nodes in the XML are grouped into sections with children who are items with info in attributes. EX:


Code:
<project label="Misc">
<item label="IPS Mural" url="images/projects /project_img.jpg" link="www" resp="info">My description is here</item>
</project>


one swf("navSwf") goes through the XML and generates a menu of link using html textboxes and hrefs. thats fine. the other swf("displaySwf") take the nodes info and displays it. that works fine. on the nav hrefs i currently have asfunctions(which do nothing, i am thinking its the way to go), and i am trying to pass the info of the selected item from the navSwf to displaySwf. EX: in navSwf i click on item 3, so i need to tell the displaySwf to access that item 3 node and parse/display its attributes. it is here where i am lost, how can i do this?

i may not be setting this up the best i understand, but any help to get this working is greatly appreciated. thanks for taking the time to read this.

Swf Communication To Another Swf
I've been on the verge of tears with this... so.. I saved in it all back in mx and got rid of the 2004 coding (got rid of the loader (2004 loadMovieClip) and replace it with loadMovieNum), and figured I try my luck with mx... well, once again I've hit the wall and find myself dazed and confused. All I want to do is get the about button... hell, at this point, any button in the nav swf to communicate with the dataBox swf and gotoand play a label on the data_mc timeline.

frame1 of nav.swf :
code: stop();
trace("nav.swf file is LOADED and resides on Level: "+this._level);
about_btn.onRelease = function() {
trace(pic_mc);
_level15.pic_mc._alpha = 0;
//trace(_level15.data_mc); ???
_level0.data_mc.gotoAndPlay("textboxLG"); ???
// trace(data_mc);
};

I'm hoping, if ya get a free moment, you might help rescue me before I pull the rest of my hair out. : /
I attached the 3 fla's that I built and a text file that the data_mc utilizes..,can ya give these the once over and help me to get this working. I think once I overcome this situation... I can apply it to the other buttons and things down the road.

actually to be sure I stay within the upload limit..I have broken down the files into 2zip files ..
(var.fla, text.txt) 2.zip
(master.fla, dataBox.fla) 1.zip

GOD BLESS ALL that help me overcome this!

.SWF -TO- .SWF Communication
I thought this would work, but unfortunately it doesnt.
I am trying to get one .swf file to talk to another. The only data I need to pass, is when you release inside of one movie clip, it calles on the a function in another.

Here is the code.

Buttons SWF
============
sender = new LocalConnection();
_root.forward.onRelease = arrowForwardOnRelease;
{
myLoad = 0;
_root.sender.send("ldMovieConnection", "onReceive", arrowForwardOnRelease);
}

_root.back.onRelease = arrowBackOnRelease;
{
myLoad = 1;
_root.sender.send("ldMovieConnection", "onReceive", arrowbackOnRelease);
}


Now I need this to call the function arrowForwardOnRelease in the Holder.swf file.

Holder.swf
================
_root.createEmptyMovieClip("movieHolder",1);
receiver = new LocalConnection();
receiver.onReceive = function(myLoad) {
_root.movieHolder.loadMovie("nav.swf", 1);
}
receiver.connect("ldMovieConnection");

Everything was working until I broke those 2 button calls out to the buttons.swf so the only problem is transferring the data.

Can anyone tell me what I have done wrong here?? Any help is much appreciated.

Thank you

--J

Swf-swf Communication
I thought this would work, but unfortunately it doesnt.
I am trying to get one .swf file to talk to another. The only data I need to pass, is when you release inside of one movie clip, it calles on the a function in another.

Here is the code.

Buttons SWF
============
sender = new LocalConnection();
_root.forward.onRelease = arrowForwardOnRelease;
{
myLoad = 0;
_root.sender.send("ldMovieConnection", "onReceive", arrowForwardOnRelease);
}

_root.back.onRelease = arrowBackOnRelease;
{
myLoad = 1;
_root.sender.send("ldMovieConnection", "onReceive", arrowbackOnRelease);
}


Now I need this to call the function arrowForwardOnRelease in the Holder.swf file.

Holder.swf
================
_root.createEmptyMovieClip("movieHolder",1);
receiver = new LocalConnection();
receiver.onReceive = function(myLoad) {
_root.movieHolder.loadMovie("nav.swf", 1);
}
receiver.connect("ldMovieConnection");

Everything was working until I broke those 2 button calls out to the buttons.swf so the only problem is transferring the data.

Can anyone tell me what I have done wrong here?? Any help is much appreciated.

Thank you

--J

Swf-swf Communication
I thought this would work, but unfortunately it doesnt.
I am trying to get one .swf file to talk to another. The only data I need to pass, is when you release inside of one movie clip, it calles on the a function in another.

Here is the code.

Buttons SWF
============
sender = new LocalConnection();
_root.forward.onRelease = arrowForwardOnRelease;
{
myLoad = 0;
_root.sender.send("ldMovieConnection", "onReceive", arrowForwardOnRelease);
}

_root.back.onRelease = arrowBackOnRelease;
{
myLoad = 1;
_root.sender.send("ldMovieConnection", "onReceive", arrowbackOnRelease);
}


Now I need this to call the function arrowForwardOnRelease in the Holder.swf file.

Holder.swf
================
_root.createEmptyMovieClip("movieHolder",1);
receiver = new LocalConnection();
receiver.onReceive = function(myLoad) {
_root.movieHolder.loadMovie("nav.swf", 1);
}
receiver.connect("ldMovieConnection");

Everything was working until I broke those 2 button calls out to the buttons.swf so the only problem is transferring the data.

Can anyone tell me what I have done wrong here?? Any help is much appreciated.

Thank you

--J

Swf-swf Communication
hello,

i am trying to send the value of where a line is to another field in another movie.

===================
the code for the sender is:
// On moving line
onClipEvent(enterFrame) {
this._x = -( _root.xvalue = Math.round(_root._xmouse) - 800);
}

onClipEvent(mouseDown) {
userMessage.text = _root.clickVal = Math.round(_root._xmouse - 400);

buttonInstance.onRelease = function()
{
outgoing_lc = new LocalConnection();

outgoing_lc.send("lc_name", "methodToExecute", userMessage.text);
};

}



===============
the code for the receiver is:
// On the background
incoming_lc = new LocalConnection();

incoming_lc.methodToExecute = function (param)
{
_root.clickVal = param;
}

incoming_lc.connect("lc_name");





I can get the value of the location of the line to display in a text box on the sender movie, but not to display in the Uni Val text field in the other movie.

Any help would great be appreciated.

I have also attached the fla files for your review.

Thank you.

SWF Communication
I need two swf to communicate. I have a main swf and i load the button swf into it. via a load movie script put int he timeline frame.

Main SWF:
- has contact_text MC
- has empty MC to load button swf into

Button SWF
-has all the buttons
-all buttons are in a MC on the main timeline(_root.buttonMC.button_instance)

I need the button instance in the button MC in the button SWF to play a MC on Main SWF.

thanks again

Swf To Swf Communication
I have two swf files (A.swf and B.swf) communicating with each other. They are on the same html page. They communicate fine.

However when i open another window with another swf file (c.swf)... the 2 swf files (A.swf and B.swf) fail communicating...why is that?

[F8] Communication Between MC's
I'm having trouble targeting loaded mc's and getting them to talk to each other!

the structure is: a mainMC with loaded navHolder and picHolder empty clips, i want buttons in my loaded nav to move the picHolder position. Sounds simple but i'm not getting any luck. Where do i put the function below in the mainMC or the navMC and how do i target the function from my navMC buttons.

//move pic's
function imgPos1()
{
extendTween = new TweenExtended(_root.picHolder,["_y"],easingType1,[MC._y],[0],0.4,true);
}
function imgPos2()
{
extendTween = new TweenExtended(_root.picHolder,["_y"],easingType1,[MC._y],[-21],0.4,true);
}
function imgPos3()
{
extendTween = new TweenExtended(_root.picHolder,["_y"],easingType1,[MC._y],[-42],0.4,true);
}

AS 3.0 <--> PHP Communication
I was wondering is the priniciple the same as with AS 2.0 (using LoadVars) or something is changed in AS 3.0? Any tutorials on the subject?

thanks

Communication
Hi,

I have main.swf that loads several externals swf's.

How do I communicate that I need to have an external swf unload another swf once it's loaded?

Something like unloadMovie(2); in the last frame of the new loaded swf, but this isn't working obviously.

Also I have buttons that are in a separate swf; how do I write this properly in order for it to go to the time line in the main swf?

on (release) {
_root.gotoAndStop("contact");
}

Thanks!

[CS3] Web Communication
I'm not very good when it comes to Flash and communicating with the web and what i was wondering is this...

I'm guessing most people know what rapidshare is and they have a system which checks the links to see if they are still active. I've seen many websites replicate this "Link checker" so if its possible for a site to do it, is it possible through Flash?

So basically i want users to input links into an input box and it checks the links to see if they are working.

Can anybody help me out on this?

I'm just interested in learning new things when it comes to Flash and the web. I'm then hoping to turn the program into an AIR application, which i'll probably end up needed help on as i am fairly inexperienced with AIR.. but when the time comes ill post it in the AIR forum.

Thanks in advance

[CS3] AS2 To AS3 Communication
Hello all, I'm with a bit of a problem here...

I have this AS3 movie that loads other movies. It loads an AS2 movie also and I need to make the main AS3 movie detect if the AS2 movie clicks a particular button. I tried a lot of examples from the net and nothing works so far...

I have an error on the AS3 movie that I can't understand:


PHP Code:



//this is the connection thing. It has no problem (I think)
import flash.net.LocalConnection;
var myReceiver:LocalConnection = new LocalConnection();
myReceiver.connect("myConnections");

//now when I try to "import" the action from the AS2 file so that the AS3 movie can detect it, something goes wrong...
myReceiver.myAction = function(doThis) {
    if (doThis = 1) {
        trace("testing, testing");
    }
};




the error in my output file says "1119: Access of possibly undefined property myAction through a reference with static type flash.net:LocalConnection."

But how can it be undefined if I defined it on the AS2 movie?
Can anyone help me?

Help With SWF To SWF Communication
This subject may have been discussed and explored already, but I'm having the worst luck finding exactly what I am trying to accomplish. If anyone out there can help me out, it'd be great!

Here's what I need to do. I have a "mother" SWF that's running from one server. The "mother" needs to call a "child" from another location. This location, if possible, needs to be from another server. The "child" will also be in a format of SWF. When "mother" calls the "child," she pauses everything she's doing and calls the "child" on top of her in a "overlay" format. When the "child" is finished playing through (more likely to be a FLV clip), she has to communicate back to her "mother" to start playing again, which she closes herself.

Obviously if I put the "child" in the same directory as the "mother" I have no problem controlling it, using "_parent" command, but once she was moved to another location, the "mother" was no longer being recognized using "_parent" tag.

Is there a better way to handle this situation, or am I simply missing something?

Help~?!

3 Way Communication
I'm pretty new at writing action script but have been reading up on it as much as I can. What I'm trying to do is select a vocabulary word from a list of words in column A and communicate to the buttons I've created in column B (ex. Definition, Synonym, Used in a Sentence) which word I've selected from the list. So in turn when I press the appropriate button in Column B it populates Column C with the correct information for that particular word. What's the best way to go about doing this?

Any help would greatly be appreciated.

Thanks!

Russ

Swf Communication
Hi,

I have a swf file, 3.0, which I want to play for a set amount of time and then load another swf file, 2.0, and after the 2.0 has played in its entirety then go back to the 3.0 swf file, thus creating a loop. Is there a way to do this? Is more information needed? Thanks!

Communication With Swf
I load some swf movies into a main movie. Each one has some movie clips inside. How do I communicate with them?
For example how do I stop a mc that is in a movie I load into an empty movie clip?

2 Way SWF Communication?
Hey,

Ive just been looking at tutorials on loading external SWFs, and its all great ive got my SWF loaded into a main SWF imagine the hierarchy like this:

MainFlash.swf
|
|---- Flash1.swf


So the Main Flash loads in the Flash1.swf, the Flash1.swf contains some events, however on one of them (a button press) i would like to send an event to the Main Flash, here is where i cant find any tutorials on the subject.

I was thinking of maybe having a static event dispatcher class in MainFlash.swf, but then the Flash1 wouldnt be able to use it as it doesnt know it exists... so how do you get a 2 way event communication system going? or dont you...

Later on i would like to have multiple things, so the MainFlash would act like an MDI application, and the other flash things would load up within there and manage themselves, but i would need to make sure they can all communicate events properly...

Any advice would be great!

AS3 -> JS Communication
Is there any way to send variables to JS from within a SWF without using a query string? There used to be a "Javascript and Flash Integration Kit" but it was in beta in 2005 and is/was intended for AS2. Any suggestions?

Thanks,

- MT

Communication PHP - AS 3
Hello,

please help me with communication between flash CS3 (Actionscript 3) and PHP. .sfw and PHP script are on the same server. I need to send variables
from flash to php and get response from php back to flash in XML format. I need to know, if this code is good and right or if there is a better solution for solving this problem.


Code:
function CommunicationFlashPHP():void
{
loader = new URLLoader();
loader.addEventListener(Event.COMPLETE, dataLoaded);
var request:URLRequest = new URLRequest("http://PHPScript.php?what=question" + "&sid=" + _sid + "&actualLevel=" + _actualLevel);
loader.load(request);
}

function dataLoaded(evt:Event):void
{
var xmlResponse:XML = XML((evt.target as URLLoader).data);
trace(xmlResponse);
}

Help On AS3 Communication With PHP
Hi, I'm having a strange problem and need help I'm trying to make a two-player game. On the server side there's a PHP page handling game data. One player creates a game by calling a PHP page which creates a PHP session, and it retrieves the session ID and passes it on to the other player. The other player passes the session ID as an argument in URL and runs the same PHP page. In this way the two players can share the PHP session data. The URL used by the second player is like this:
http://domain/host.php?PHPSESSID=1234
where 1234 is the session ID obtained from the first player. When I used a URLLoader with this URL in the game to call the PHP page, it didn't get into the specified session (the current session ID appears to be another number). However, when I typed the URL in IE, everything works perfectly and the session data can be accessed. I'm really confused...Is there anything I missed with URLLoader? I though it works exactly like a URL typed in the browser, but here it's different...Any help would be appreciated!

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