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




AttachMovie Action In Local Connections



I'm not understanding why the following attachMovie code isn't working in the local connection code you see here (between two swfs). The same attachMovie code works fine if it's outside of the function so that's not the issue. Sender (swf with button)
Code:
btn.onRelease = function():Void {var senderLC:LocalConnection = new LocalConnection();senderLC.send("targetObj", "doThis");}
Receiver (target swf)
Code:
var receiverLC:LocalConnection = new LocalConnection();receiverLC.doThis = function() {this.attachMovie("button", "button", this.getNextHighestDepth(), {_x:980, _y:534});};receiverLC.connect("targetObj");
And for the record, the AttachMovie action works just fine outside this function. That's not the issue.Thanks / Help appreciated



ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 11-17-2008, 10:00 PM


View Complete Forum Thread with Replies

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

AttachMovie From One Swf To Another Via Local Connections
I'm having difficulty using AttachMovie method from one swf to another. Here's the code I'm using.

Sender swf

Code:
btn.onRelease = function():Void {
var senderLC:LocalConnection = new LocalConnection();
senderLC.send("targetObj", "doThis");
}
Receiver swf

Code:
var receiverLC:LocalConnection = new LocalConnection();

receiverLC.doThis = function() {

this.attachMovie("button", "button", this.getNextHighestDepth(), {_x:980, _y:534});
};
receiverLC.connect("targetObj");
And for the record, the AttachMovie action works just fine outside this function. That's not the issue.

Any help is greatly appreciated.

Local Connections
I create two movie to communicate 2 movies. First movie instuct secondwhat to do. I setup both movies with actionscript from help section. And output window always show up this error:
lcReceiver.myMethod is not a valid property of that class (LocalConnection)


Code:

var lcSender:LocalConnection=new LocalConnection();
lcSender.send("conn","myMethod",5);

lcReceiver:LocalConnection=new LocalConnection();
lcReceiver.myMethod=function(intBla:Number){
txtName.text=intBla;
}
lcReceiver.connect("conn");
Seems there is problem with dynamic class(Local Connection is not a dynamic class). Suggestion...

Local Connections
I create two movie to communicate 2 movies. First movie instuct secondwhat to do. I setup both movies with actionscript from help section. And output window always show up this error:
lcReceiver.myMethod is not a valid property of that class (LocalConnection)


Code:

var lcSender:LocalConnection=new LocalConnection();
lcSender.send("conn","myMethod",5);

lcReceiver:LocalConnection=new LocalConnection();
lcReceiver.myMethod=function(intBla:Number){
txtName.text=intBla;
}
lcReceiver.connect("conn");
Seems there is problem with dynamic class(Local Connection is not a dynamic class). Suggestion...

Multiple Local Connections At Once
I have a local connection between two swf files.

One is a main stage where I load pages, the other is a navigation bar.

It works fine. I have it set to send a variable of the page name to the main stage and then the page is loaded based on this info.

Can I add another navigation bar to this same type of connection?


I am using. Flash MX.

[F8] Local Connections>>>LEARNING
I'm trying to learn more about local connections, and eventually want to make my own locally multiplayer games. Could someone explain to me exactly how could I send, lets say the x and y values of 2 movieclips, real-time, so basically if I move a guy from one swf, he moves in the other swf as well. And could someone please explain/post code how I could have people joining the games.

Thanx!

Local Socket Connections?
Hello,

I tried almost anything and everything to receive input from my sockets, but I keep getting security errors.

When I run my app with:
Security.loadPolicyFile("http://localhost:2000");
Security.allowDomain("*");
Security.allowInsecureDomain("*");

I get this error:
Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation: file:///Users/user/Documents/Flex Builder 3/.metadata/.plugins/com.adobe.flash.profiler/ProfilerAgent.swf?host=localhost&port=9999 cannot load data from localhost:9999.

The app can connect to the socket but cannot receive any data?

Please help, I have been trying for hours now without luck (

Multiple Local Connections
Hi All,

I just finished a localChanneler object that I thought I'd share - it tries to overcome the problem of multiple connections discussed here on FlashGuru.

Please let me know here if you experience any problems.

Withnail.

/*----------------------------------------
What it does: Links together a number of identical (or various) movie clips containing this code so that each responds to the other's calls with the mimimum number of calling channels.

How it does it:
* figures out which of a bunch of identical movie clips should be the chief.
* chief tells any subsequent indians to set up their own calling channel
* chief keeps an array of these codes and is used to tell all indians to update

Limitations:

* does not handle removal of clips efficiently
* deleting the chief movie clip breaks the system

*/
Usage:

PHP Code:



    //instantiate the localChanneler object
    this.otherFlashCaller = new localChanneler(this); //pass the context for the functions to be called here ie. "this"
    
    //setup functions that pass parameters on to the otherFlashCaller object
    this.callOthers = function() {
        this.otherFlashCaller.offThisCall = true;
        this.otherFlashCaller.castCall.apply(this.otherFlashCaller, arguments);
    };
    this.callAll = function() {
        this.otherFlashCaller.castCall.apply(this.otherFlashCaller, arguments);
    };
    
    //setup all the functions that will be shared by all the movie clips
    this.testFn = function(a, b) {
        //testFn code
    };
    
    //now use the "callAll" function to call all movies including this one
    this.callAll("testFn", "a_tst", "b_tst");
    
    //OR use the "callOthers" function to call all other movies (excluding this one)
    this.callOthers("testFn", "a_tst", "b_tst"); 




Object defintion

PHP Code:



_global.localChanneler = function(fn_holder) {
    this.fn_holder = fn_holder;
    this.submovies = new Array();
    this.setupLocalConnections();
};
localChanneler.prototype.castCall = function(fnName) {
    var additional_args = new Array();
    for (var a = 1; a<arguments.length; a++) {
        additional_args.push(arguments[a]);
    }
    //reach all other movie clips by calling castToAll in the chief
    this.sendingLC.send("AX_chief", "castToAll", fnName, additional_args);
};
localChanneler.prototype.castToAll = function(fnName, additional_args) {
    //only used by the Chief
    for (var i in this.submovies) {
        this.sendingLC.send(this.submovies[i], "makeCall", fnName, additional_args);
    }
    this.channelCaller.makeCall(fnName, additional_args);
};
localChanneler.prototype.makeCode = function() {
    //if this function is called it means that it is the chief so delete this.tempCaller
    delete this.tempCaller;
    this.codesGiven++;
    var newcode = "AX_submovie"+this.codesGiven;
    this.submovies.push(newcode);
    this.sendingLC.send("AX_tempCaller", "awaitCode", newcode);
};
localChanneler.prototype.deleteTempCaller = function() {
    delete this.tempCaller;
};
localChanneler.prototype.setupLocalConnections = function() {
    this.sendingLC = new LocalConnection();
    this.channelCaller = new LocalConnection();
    //all clips initially try to connect as the chief
    this.channelCaller.connect("AX_chief");
    //In case this is not the chief, I need to call the chief and ask him for a calling code...
    this.tempCaller = new LocalConnection();
    this.tempCaller.connect("AX_tempCaller");
    this.tempCaller.channeler = this;
    this.tempCaller.awaitCode = function(code) {
        //Once the code has been received from the chief, use it to connect
        this.channeler.channelCaller.connect(code);
        this.channeler.deleteTempCaller();
    };
    this.channelCaller.gimmeCode = function() {
        this.channeler.makeCode();
    };
    this.channelCaller.castToAll = function(fnName, additional_args) {
        this.channeler.castToAll(fnName, additional_args);
    };
    this.sendingLC.send("AX_chief", "gimmeCode");
    this.channelCaller.channeler = this;
    this.channelCaller.makeCall = function(fnName, args) {
        //execute appropriate fn
        if (not this.channeler.offThisCall) {
            this.channeler.fn_holder[fnName].apply(this.channeler, args);
        }
        this.channeler.offThisCall = false;
    };
}; 

Creating Local Connections Inside A Class
I can seem to create the lc and the sending swf can connect, but when you call the function say 'update' the function isn't executed along with the send() command.

This was working perfectly in the root. I think it has something todo with flash not liking to define functions at runtime inside classes? dunoa, any ideas?

thanks.

Local Runtime Sharing? Local External AttachMovie?
I've been trying and searching through the forums but I think I am searching for the wrong keywords.

Is there ANY way of setting it up so that I can use attachMovie/removeMovieClip on external swf's? I've found these runtime sharing options but I am unable to make much sense of them. What I am creating is something that would always be run locally on a machine and not up on the web.

I want to use this one main 'engine' type of file that loads heaps of different movies into it. All of them swf's. Of course I realise that I could do things the loadMovie way, but it seems in this case like an option not really suitable for what I want to do.

Thanks for any tips

Local Connections Script Not Working... & Other Script ?'S
i was able to work out a LC script for my swf's to communicate with each other now they arnt working... ive some editing and changeing since then but nothing with the script all with layout and wut not but for somereason it just dont work

i am attaching the files im a using so you can see my problems.
the only thing is its kinda of a dummy version in a way that im in the process of adding some flash to my existing html document.

anyway thats really all i want to work cas i know it will but it just stopped for somereason my other script question was:

is there a way to have one swf call in or load another swf into and on the highest layer of a html document??
let me explain more.. i have a top menu in a top frame and then a bottome frame that displays content when the top swf's buttons are click. also i have a sub menu that i want to float and also be dragable so the user and move it out of the way but i need it to able to control its visiblabitly with the top swf...
hope that all makes sense anyway i know you guys are genius in script and im sure it can be done but dont strees over it im thankful for any help at all

Button Action In AttachMovie
Tried searching for this problem, didn't find anything similar.

In my movie I attach a MC's with attachMovie.
One of those MC's have buttons in them.
Those buttons are supposed to trigger an action
on another MC that is also attached with attachMovie.
But it doesn't work.
Is it impossible to trigger actions from one attached MC
to another?



Code:
b1.onRelease = function() {
var colorful = new color("shapes");
colorful.setRGB(0xFFFFFF);
};
Tried _parent.shapes, but doesn't work.
Can somebody help me with this?

thanks

files are here

Button Action In AttachMovie
Tried searching for this problem, didn't find anything similar.

In my movie I attach a MC's with attachMovie.
One of those MC's have buttons in them.
Those buttons are supposed to trigger an action
on another MC that is also attached with attachMovie.
But it doesn't work.
Is it impossible to trigger actions from one attached MC
to another?


Code:
b1.onRelease = function() {
var colorful = new color("shapes");
colorful.setRGB(0xFFFFFF);
};
Tried _parent.shapes, but doesn't work.
Can somebody help me with this?

thanks

files

AttachMovie Action To Button Within Dropdown Menu
ok now im having a problem when ever I put the action on my button (which is call royalblood) the attachMovie action doesnt work but when I put it on <this> the action works but I need it to work on my button and I dont know the action to do it. Can someone help me out again on this one.

this one doesnt work.

ActionScript Code:
this._parent.bloodnavi.royalblood.onRelease = function() {     
    var mc:MovieClip = _root.attachMovie("rpmc","newrpmc", 200, {_x:499, _y:335});
}

this one works

ActionScript Code:
this.onRelease = function() {     
    var mc:MovieClip = _root.attachMovie("rpmc","newrpmc", 200, {_x:499, _y:335});
}

Simple Button Question About AttachMovie Action
Im, attaching a MC using a simple attachMovie action. However I want it to track the MC as a button, or at least make it work like one. Any suggestions?

Here is my code:
_root.attachMovie("image_nav_button01", "mural02a", 1);

Thanks,
cooper

How 2 Add Action Script To A Container Clip That Is Added To Stage As "attachMovie"
I need help!

I have created a container (as a movie clip) that serves as a scrolling text window including buttons and graphics. The AS that controls the scrolling is typically added to the container instance after it is placed on the stage--I've tried this, and it works great.

However, I'm building a GUI and I need to replace the clip with others that are selected from buttons in the scroll. Thus, I use attachMovie to add the instance to the stage.

PROBLEM/QUESTION: How do I add the AS to the container instance to control the scrolling functions? Since it is placed on the stage by AS, I cannot find a way to add the script...

How do I do this?

Here is the script I need to add:

//establish scrolling limits (for any size scroll)
//load the container's up and down scrolling functions
//the functions control the scrolling rate
onClipEvent(load) {
boundsBox=boundingBox.getBounds(_root);
boundsContent=Content.getBounds(this);
function updateUpScroll() {
Content._y+=5;
}
function updateDownScroll() {
Content._y-=5;
}
}

//watch for scrolling event (mouse click on button)
//scrolling continues while mouse button is pressed
onClipEvent(mouseDown) {
if(FEUpButton.hitTest(_root._xmouse,_root._ymouse) ) {
upScrolling=true;
}
if(FEDownButton.hitTest(_root._xmouse,_root._ymous e)) {
downScrolling=true;
}
}

//stop scrolling when mouse button is released
onClipEvent(mouseUp) {
upScrolling=false;
downScrolling=false;
}

//watch for scrolling upon entering each frame of the movie
//check scrolling limits (limits offsets are for container)
onClipEvent(enterFrame) {
if(upScrolling) {
if(Content._y<boundsBox.yMin-45) {
updateUpScroll();
}
}
if(downScrolling) {
if(Content._y+boundsContent.yMax>boundsBox.yMax-60) {
updateDownScroll();
}
}
}

THANKS!!!

Launching A Local Html File From Local Swf ( Flash 8.)
Hello everyone i am having a problem launching a local html file from my swf. i have a button called print that when clicked it is supposed to open the local html file and print out the content. this is the code i used on the button

on (release){
getURL("folder/folder/file.htm","_self");
}

i also tried scripting it on the time line when that didn't work.

any ideas?
Thanks,
kool

P2P Connections?
I am currently working on a project where users can play games together, but I am unsure of what I need to do this in flash, if anyone can point me in the right direction I would be very happy.

Thanks for your time
- Dan

Connections
Flash MX Pro
There is an input text and a movie clip. How to use the inputed value in the movie clip.

Limewire Connections
Is there anyone out there who can connect to Limewire? Just so I know if its me or not...

XML Socket Connections
I am try to figure out XML Sockets and I need to figure out what a server daemon is and where to start for building it.

Internet Connections?
Im using flash MX 2004 and im new can i make possibly two computers connect and go kind of head to head in for say... rock paper scissores? is it plausible?

XML Socket Connections
Does anyone have any good XML socket connections tutorials???

thanks.

Number Of Connections
Hi, I have a simple chat type; all I need is a simple piece of code that would show the amount of people currently connected to the chat. Something saying... (16 users connected) It's just a simple .exe that connects to the server just using netConn = new NetConnection(); kind of thing....

Any help would be greatly appreciated!!

Concurrent Connections
How to count concurrent connections on a simple videochat application with audio.

Theoretical set-up is: One room with 6 pods. 5 people lock on and broadcast there webcam at the same time. In the room there are 5 videopods and one text chatpod. All 5 connected users can enter text in the chatpod. All 5 will see there own webcam plus the 4 other videofeeds.

How will FMS2 (2.04) count the number of concurrent connections?

Max Simultanious Connections
is there I way I can pass a value back to a server side script in PHP for example. So when I reach the maximum simultanious connections is reached. I can display a message to the user instead of them just seeing a blank screen. Any help on this would be appreciated.

Connections Don't Close In Ie 6.0
At our company we have built a video/chat application with multiple rooms and a lobby using FMS2. The application runs fine in most browsers but when I open another window in ie6 (apart from the window where the flash application plays), visit a different website and close the window where our flash application resides, the stream keeps playing (you can still hear the sound of the application).
I was wondering if this is this a known bug.
Has anybody experienced this before?
Is there a way to prevent this bug?

This is a problem which occurs when opening our site in Internet Explorer 6.0 only.

Thanks in advance,

David

Connections Count
If I have 10 users attached, and all are connected through three separate shared objects, is that 10 connections or 30?

FMS 2 Closing Connections
I am relatively new to the FMS.

I was trying a live cast sample application. The problem I am facing is that although the client side code does a "nc.close" (and the status is also received appropriately at the client), the connection is not closed at the FMS. I tried a lot of googling but couldnt find anything to force the close at the server. Is this a unique case, or is this behaviour normal. If it's normal, then how do I close the connection at the server gracefully?

Siva.

Port Connections
How do you connect to ports on a remote host and send requests to the ports (and recieve responses)?

Peace out,
Peace Co.

User Defines Local Image And Add It To A Local Swf(CD) ?
I have to run flash (swf) locally, which in my case means a CD.

What I want to do is allow the user to have a browse (local) function and pick an image from his hard disk and use that image to see a flash movie (swf) with his/her selected image in it!

Then after the user watched the movie with his/her photo on it, the user should be able to send this movie in a site(upload it). then naturally the user should be able to see it online at that site as well!

So my questions are how to have a browse function that puts the selected image somewhere I would like it to and then use this image in a flash movie (that will be a game with the photo on it).

And I guess then to send it online I do not really have to publish a new swf with the image in it, I can send seperately the swf (game) and the image file to the server through php? Did i get that right?

So far I know flash 8 has a new class for browsing, but how do I take a file selected from a user locally and use it in the movie again locally? load variable can do that but I should know the name of the file selected and also be possible to even select a local file??

Basically it is for educational movie. It will run from a CD. there will be many interactive exercices. At the end of the section there will be one game that in order to make it more personal I want to allow the users to add their photo at the game. So far everything should take place locally. Then if the user desires should be able to send in a specific site the movie he/she just watched(which means with their photo in it).

ANy ideas how I do that.

Even general ideas will help!

Thank you

Problem With Local File And Local Link
Hi to everybody,

I have installed a new version of flash player (9,0,28,0) and when I open a local file like:
c: estindex.html

When I click into some link that point to some local file like as:
c: est est.htm

I don't obtain nothing the page still remain index.html.

If i put the test directory into some server everithing working fine.
I have tried to change some machine and i have tried some old flash file but still the same!

How can solve it without upload all file everytime into some web server and without install some local web server?

Thanks in advance to everybody for any tips and sorry for my bad english!

John

Quickie - Viewing From Different Connections
Have my site up and running, mixture of Flash and DWeaver. Since I travel around the country a bit I always pull up my site to see how it displays using other connections and hardware.
Looks like I do need a preloader for sure, but......

My flash buttons sometimes display transparent like there suppose to and sometimes they don't. It seems to occur more times than not, any ideas?

Thanks to those who might know..

In Savannah, GA today.....

Preloader For Slower Connections ONLY
Hi folks,

I'm working on a site where im externally loading MCs that are around 40kb each. theres a reasonable gap with a fast connection but im sure an irritating one for slower ones. I've tried using a preloader for each external MC (theres like 30 of them in total), but with a quicker connection is just sort of blinks which is rather unsightly. I'm hoping there's a script that will only run a preloader if theres a particularly slow connection...perhaps something thats gauged by the initial loading of the homepage? i dunno...pipedreams maybe.

i've also considered just having a "faux loader" that will appear in the small gap that occurs when these external MCs are loading - just some text that's better than a blank page. unfortunately i cant get this to work properly given the buttonless scroller that i have set up for navigation. but i digress.

anyway im having trouble keeping this site small and still look good. my main .swf is about 600kb...is this reasonable or way too big? ive worked in flash before but never with this much content, any tips would be much appreciated.

thanks.

Actionscript And Internet Connections
I am in desperate need of help . . . My game that I am currently working on is near completion except for one final feature . . .
Internet connection!!! I have seen it done and know that it works so all I need is a little help. I need to figure out how to let my game be a online multiplayer game with chat abilities. The only thing that really needs to be worried about is how to connect to it and how others connect and all of that fun stuff . . .
If I could have at least a point in the right direction it would be greatly appreciated

Client Accepting Connections
I know that there are ways for the flash applications to connect to servers using netconnection(), but is there a way for the client to receive connection requests?

It would be like setting up a server socket in C. I'd like to set up a flash applications with which users can talk directly to each other without the data going to the server. The server would be used only to get the addresses of the other clients.

Flash And JavaScript Connections
OK! This should be very interesting.

I am doing an online project where user need to save the flash data to xml. I know it's possible if we can connect Flash with JavaScript. But how? Given below is the simple scenario :-

1) User entering his data.
2) Clicking a button to save his data to XML.
3) "Save As" dialog appears where he could choose the location to save his xml data.

Please help me out. Thanks!

Restricting Connections With FLVPlayback
I am doing a test on limiting the number of connections to a given application that uses the FLVPlayback component. I am connecting to a specific instance not “_definst_”. The problem that I am having is that when the connection to the instance is rejected the FLVPlayback connects to the default instance. So in my test I end up with double the connected clients… half to the correct instance and half to the default instance. How can I stop the FLVPlayback component from making this connection?

This is only a test so the code is as basic as can be…..

application.connections = 0;
application.totalConnections = 3;
application.onConnect = function (p_client, p_autoSenseBW){
if(this.connections<this.totalConnections){
this.acceptConnection(p_client);
this.connections++;
if(p_autoSenseBW)
this.calculateClientBw(p_client);
else
p_client.call(“onBWDone”);

}
else{
this.rejectConnection(p_client);
}
}
The rest is just the default main.asc file contents




























Edited: 11/29/2006 at 11:51:42 AM by Ven34

Closing Idle Connections From FMS
The FMS management console is showing a number of clients/connections that clearly are not being actively used anymore -- no bytes have been transferred for hours or for several days in one case. I'm guessing that what's happened is that someone paused or stopped the video but left the browser window open, thereby leaving the client alive. (I would have thought that FMS would close inactive connections after some defined period, but this doesn't seem to be happening in these cases, at least.)

Does anyone know if there's a way to use the FMS management console to close these inactive clients? If not, can it be done from the command line?

Server Rejects All Connections
I have setup my server using default values. I use the free developer editon. I'm have tried sample applications from de adobe site(broadcaster and sample_videoconferance) and I keep getting:

NetConnection.Connect.Rejected

in de fm2_console i keep seeing things like: conneted:0 , connects: 5 , disconnection 5:

-I have no (windows)firewall
- I created empty directies in de application folder with the correced names
-used localhost, LAN adress, 127.0.0.1 , rtmp,rtmpt

all nothing. Red5 works fine btw ( i don't have it running right now)

Track Peak Connections
We have setup Flash Media Server 3 to start to stream videos to our students/faculty. We currently monitor usage by using the Flash media Administration Console and set it up to refresh every 60 seconds. After a couple of hours, I think 4-6 all the data on the screen has moved off to the left. Is there a way we can store this information or log it somewhere where we could later go back for example last week and see what day was the busiest day? Right now I can watch it during the day but after 5pm is the busiest time to track it and I'm not around to see the stats.
Let me know if there is something I could do so I can keep this information.

Thanks

Socket Connections / Smtp
I have a form that sends mail (smtp) through a socket connection (actionscript), which I picked up here, http://www.bytearray.org/?p=27
Tested and works fine locally, but when posted online and tested, it quietly fails.

I am trying to send mail from my domain, to the mail function within my host server. (same domain).
Tried both "local" and "network" publishing options.

I have read the article on socket security at http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security_04.html
but I do not have the option to place a crossdomain.xml file at port 843 since I am on a shared server.


I've read everything that I can online but because policy changes from player 9,0,115,0 on, it seems that older posts may not be relevant, so is there another way to approach this matter?
Is it possible for me to hard code the cross domain policy into my scripts or .fla?

Thanks,
Key.

Xml Sockets And Direct Connections...
Ive heard a few things about these..
and just recently i wanted to make a game in which you play head to head with other people.. but before i get ahead of myself here..
Any tutorials on how to establish a server which receives info from all connected flash movies , and then sends it out to all the ones witch i want to?
basically i was thinking of making a chat thing 1st of all and then depending on how difficult it is move on to my game idea..


I have a server.. i just need the knowledge

//VoS

Variables Connections Problem.
Hello Kirupa-clan
Yeah it's me again...

ok down to the problem.

the thing is that i have a global var on the main line "Gvar"...so far good ?
next there's a Mc that is supposed to change a variable called "ParentVar"
but... the ParentVar is not defined within the Mc but rather it's passed to it
by :
OnClipEvent(load) {
ParentVar = _global.Gvar
//the global variable is passed to the Mc
}
here's the problem :
now once the global variable is passed down, at some point in the mc
i want the Mc to change "It's" ParentVar witch in this case is _global.Gvar eg. (ParentVar = "HELLO") and that should change _global.Gvar problem is that this will only change the parentVar and not the global var, I know the above code is logicly wrong, so i'm asking is there another way around ?
the only reason i'm doing this way is that i want to have mutiple MC's that changes Mutiple Globals while using single Mc instance copies.
is it possible ?
Please reply soon, thank you in advance.
...

Xml Sockets And Direct Connections...
Ive heard a few things about these..
and just recently i wanted to make a game in which you play head to head with other people.. but before i get ahead of myself here..
Any tutorials on how to establish a server which receives info from all connected flash movies , and then sends it out to all the ones witch i want to?
basically i was thinking of making a chat thing 1st of all and then depending on how difficult it is move on to my game idea..


I have a server.. i just need the knowledge

//VoS

Flash/Mysql/.net Connections
Been searching for a while now and can't seem to find what i am looking for.

There is alot of resources out there for connecting Flash to a Mysql Db using php, but i haven't found anything regards to getting mysql data into a flash movie on a .net 1.1 page.

any help would be appreciated.

Thanks
Ras

[AS]One FLV Connections Show Into Places
Hello,

I am trying to see if I can show my streaming video in 2 different video objects.

Here is what I have.


ActionScript Code:
var flvMovie:String;
var flvMovie = "http://www.creativescientist.com/z_work/dw/dw.flv";
var nc:NetConnection = new NetConnection();
//
//progressive connection
var connected:Boolean = nc.connect(null);
//
var ns:NetStream = new NetStream(nc);
//
connect();
////////////////////////////////////////////////////////////////////
//connection2
var nc2:NetConnection = new NetConnection();
//
var connected:Boolean = nc2.connect(null);
//
var ns2:NetStream = new NetStream(nc2);
//
connect();
//
theVideo.attachVideo(ns);
theVideo2.attachVideo(ns2);


When I do this I can have the same video in two different players, but when i eliminate one connection like so.


ActionScript Code:
var flvMovie:String;
var flvMovie = "http://www.creativescientist.com/z_work/dw/dw.flv";
var nc:NetConnection = new NetConnection();
//
//progressive connection
var connected:Boolean = nc.connect(null);
//
var ns:NetStream = new NetStream(nc);
//
connect();
theVideo.attachVideo(ns);
theVideo2.attachVideo(ns);


and I try to show the video in to places it will not work. Anyone have an idea if I have to have 2 connections or can i have just one connection and I am missing something in my code?

Hi, Question About "attachMovie" Action
Hi guys,

Flash newbie here.

I have a movieclip that attaches dynamically to the _root of my movie stage with the "attachmovie" command. However, when i used this command, it attaches my movie to the top left of the screen.

How can i make it so that i control where the movie appears. Does it have something to do with the setproperty command? Do i use _x and _y parameters?

This is what my syntax looks like, (it is inside the last frame of another movieclip that is on the main stage. BTW, i did the linkage and all of that already, so..):

onClipEvent (load) {
_root.sb_matrix.attachMovie("MBG", "MBG_1", 1);
}

So i guess my questions really is, what can i add after this code to control where the movie appears (x, y coordinates), and maybe even how to control its proportions and rotation (if possible)??

Thanks in advance.

Miguel

Live Preivew And Database Connections?
Is it possible to create a databse connection witht he live preivew of a component? If it is possible that would be great, that would solve my problem of dynamic data in the authoring environment.

Script Fails On Fast Connections
Hi all,

I used a script I always use for preloading and tested it with a really fast connection an it fails.

I have a button:

Code:
on(release)[
loader.loadMovie("myPic.jpg");
}
the loader mc:

Code:
onClipEvent(enterFrame){
if(this._url != _root._url){

contentLoad(this);
}
}
the function


Code:
_global.contentLoad = function(theContent) {
if (!theContent.doneLoading) {
if (theContent.getBytesLoaded()>0 && theContent.getBytesLoaded() == theContent.getBytesTotal()) {
theContent.doneLoading = true;
.. do stuff...preload.stop();
theContent._alpha = 100;

} else {
...preloader.play()
theContent._alpha = 0;
}
}
};
This example is basically taken from ASDG (thanx to moock!)and works fine for regulare connections.
On fast connections the function is ignore and the image simply loaded. That sucks since I position the .jpg within the function.

yes, I searched moocks page and did not find anything.

Any suggestions?

greets and thanks

andreas

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