Flash :: Share Same NetConnection Object Between Two Views?

Jun 11, 2011

Flex Mobile applications are view based. And I'm using Adobe Cirrus (im assuming its the same for any FMS netConnection) Does anyone know how to maintain a persistent netConnection between views in a flex Mobile Application?[code]I want to be able to trace(netConnection.nearID) on this view, go to another view and trace(netConnection.nearID) and get the same result. and be able to have a cirrusStatusHandler() function like I have a above to listen for cirrus events. Then be able to do netConnection.close() on another view if i wanted to to be able to close the connection.

Brainstorming Ideas what I was thinking I could do:I was thinking I could maybe set up the connection on the main ViewNavigatorApplication mxml file, but i have so much going on and being triggered based on netConnection status events it seems it might be really complicated to handle everything from that mxml file on each of the views. Maybe I could declare the netCon vars in the ViewNavigatorApplication mxml file, and just add event listeners to those vars on each view? But i'm not familiar with accessing vars that exist in the mainViewNavigatorApplication mxml file.I just need to be able to make the connection once, and then it stays persistent until I call netConnection.close()I guess I could use separate views where I dont need the netConnection and just have this particular view use "states" inside the view where the netCon needs to be persistent. It just seems silly be be using states since this is a view based application.[code]and the same in my Home View but i'm getting a null error when i try and call trace(netConnection.nearID) in the crationComplete function on profileView (which is after homeView) to see if it still has the same netConnection and should then be able to get the same nearID

View 4 Replies


Similar Posts:


Actionscript 3 :: Share A NetConnection/NetStream Between Separate SWFs In The Same HTML Page

Dec 21, 2010

I am aware that I can share simple Objects using LocalConnection, but this does not (in my limited testing) appear to work with NetConnection or NetStream.

In short, I wish to have a single SWF that acts as a NetConnection proxy for other SWF files in the HTML page. The client SWFs require direct access to NetStream objects on the proxys NetConnection.

Is this at all feasible, or will each client SWF require its own NetConnection?

I am aware that I could build the entire application in flash and utilize a single NetConnection internally, but this is NOT what I want to do.

View 1 Replies

Coldfusion :: Does Flash Remoting Keep NetConnection Object Open

Nov 10, 2009

I've built a application that communicates with Coldfusion cfc functions via Remoting. I've noticed that the NetConnection object disconnects after each call, is this expected behaviour? For some reason I was expecting the NetConnection object to stay connected until I closed it myself (I'm making about 1 request per second and had planned for it to stay open).

View 1 Replies

Asp.net :: Error #2126: NetConnection Object Must Be Connected

Mar 7, 2010

I want to count the online user,when each client login the system,it's connecting to the server and increase a variable stored in a remote shared object.But when client connecting server,problems arises:Error #2126: NetConnection object must be connected

My web layout:

Website --- apps --- userLogin

Code snippets:

rtmpnc = new NetConnection();
rtmpnc.objectEncoding = ObjectEncoding.AMF0;
var uri:String = ServerConfig.getChannel("my-rtmp").endpoint + "/userLogin";
rtmpnc.connect("http://202.206.249.193:2367/userLogin");

[code]....

View 1 Replies

ActionScript 3.0 :: NetConnection / Client Object And FLV Files

Jan 12, 2011

I'm been impressed by just how terrible the NetConnection docs are. The NetConnection API:
[URL]. It has a client object that "Indicates the object on which callback methods are invoked" but no where can I find a list of the functions that are actually called?

That seems pretty obscene. I can find people mentioning onBWCheck and other functions that were throwing me errors, and I've seen someone mention onMetaData.. but this is hardly a complete list. Just casual mentions across various websites. I don't understand why this fundamental class is so obscure.

View 9 Replies

ActionScript 2.0 :: Can't Create Object With Unknown Class 'NetConnection'

Dec 20, 2010

I'm trying to create a NetConnection object in action script 2 and I get this error. I get the same error when I try to create a NetStream object. I've looked at many other examples using NetConnection and they don't import anything relating to NetConnection. Is there something in the Flash settings that I need to set in order to get this working?

View 9 Replies

ActionScript 3.0 :: Error #2126: NetConnection Object Must Be Connected

Jan 30, 2011

I moved some code that works perfect on the Actions layer, into a class, and I get this error.

ArgumentError: Error #2126: NetConnection object must be connected.

View 1 Replies

Actionscript 3 :: Share TextArea Component In Multiple SWF - Runtime Share Library?

Jan 12, 2011

How to share TextArea Component in multiple swfsaylib.swf (has TextArea Componenet)main.swf (Import TextArea Componenet from lib.swf)section.swf (Import TextArea Componenet from lib.swf)

View 1 Replies

Draw Application And Share Object?

Oct 2, 2009

[url]...I added clear button, which clears all lines from user's whiteboard, but every other user who is connected to whiteboard, still sees lines. But when other users refresh the page, lines are gone too. That means I'm able to delete data from shared object, but I don't know how to update other users' whiteboard.[code]...

View 2 Replies

Media Server :: Multiple Or Single NetConnection Object Per Application?

Sep 22, 2009

If I'm streaming live video and chatting in an FMS app, should each component have its own instance of NetConnection or should they share one? Was thinking perhaps the quality of the live video stream would be hurt in a sharing situation but am not sure the architecture works like that.
 
From a development standpoint, I'd like to make one NetConnection instance in my main application file and connect with it.  Then, when successfully connected, I'd like to pass that connection into any custom components that need it. 

View 14 Replies

ActionScript 3.0 :: Share Size Properties From One Object To Another?

Mar 28, 2011

I want to set it up so the size properies will  pass over to the block (same object size - height and scale) but also  changing the collision properies so the player will be enable push the  block around the screen but I'm not sure how to implement such  functionality/feature. I've experimented with two ways so far; 1.) The enemy changes to a frame of a block when he dies (illusion of a  different object but the same object with a different frame on the  timeline) using the same size properies but I can't seem to the change  the collision properies from it's prior setting of causing damage and  re-bound/bounce to the player. 2.) The enemy is removed completely from the game and a new block object  is added in the same position where enemy died but I can't share/code  the same size properies to this new block object making obvious that is a  different object. Here is a code I've what I've done so far (which is attempting to do first approach);

[Code].....

View 13 Replies

ActionScript 3.0 :: Set Up Different Projects That Share An Interface Object?

Apr 9, 2010

i was wondering how you guys set up different projects that share an interface (interface object, not an UI element). i have several modules in separate projects that use an interface from the main project. right now i'm either doing it by copying and pasting the interface to the module projects or by adding the source path to the project.

View 4 Replies

Youtube Views Using The Flash API?

May 26, 2011

I have a very simple question. Does youtube count "views" if put a YT video into a swf, using their Flash API? I can't seem to find anyplace that explains how views are counted.

View 1 Replies

Flash :: HTTP Streaming For Less Than 1000 Daily Views?

Jun 29, 2010

I want to use http streaming (ie. partial download) to serve some videos (medium to HD quality) to public.Idea is to have videos on server and offer some web page with embedded video player for user to watch selected video.Planned capacity is about 250 to 1000 daily views, with low concurrency requirement (ie. not many users in parallel watching video)I am thinking of complete solution like FLVPlayer or flowplayer to support this.What bothers me are network bandwidth requirements (what is minimum kbps) mainly, and this video player performance when in "heavy" use.For "heavy use" I consider adding possibility to stream many separate video files that I will add in back-end (via XML file or similar) and don't have experience with these players.

View 1 Replies

Flash :: Flex - Builder - 4 - Using MXML As Views - Any References?

Dec 14, 2010

I'm looking to create a flashBuilder document which uses seperate MXML files as "views" which are controlled by states - I believe it's a design pattern of sorts but I'm relatively new to FlashBuilder. I was wondering if anyone knew what design pattern it was and if I can be pointed in the direction of some good references! FYI I'm looking into using FlashBuilder to design Android apps

View 1 Replies

Flash :: PureMVC Mediators And Views - Creation And Control?

Aug 16, 2011

I'm making an app with flash AS3 and puremvc, the way to correctly handle view mediators is sort of throwing me a little...I have 3 or 4 distinct views, each governed by it's own mediator.Each view is only displayed on its own - ie. when 1 is visible/on stage - the others are invisible/removed from stage (over simplified, but I guess could be thought of as seperate pages, viewed one at a time, a nav bar allows a user to change views when they like)

At first each view mediator I had creating and added to stage it's own view component, and as such, when it was 'turn' to show or hide that view, it was simple - addChild and removeChild for it's view component.However, I read over at puremvc.org that it's not good practice to

a. pass round the stage (which was the viewComponent for each mediator in my case - where each view was added to - eg. viewComponent.addChild(foo)

b. create its own view - which allowed me to add and remove it in the first place.

So I changed to the recommended way - when I create each mediator, what I pass in is the view component it governs (rather than the stage/main doc class eg.

var view:MyView = new MyView();
facade.registerMediator( new MyViewMediator( view ) );
viewComponent.addChild(view);

with that the case - I have no idea how I would go about removing/adding each view when needed.I could easily enough set the visibility from within each mediator, but I sort of wanted to avoid doing that - prefer removing when not in use for resource management...how I am 'meant' to go about this (as in, when a view is no longer needed on stage, remove it - temporarily, and add it later on when it is needed?)

View 3 Replies

Flex :: Flash Builder Data Passing Between Split Views

Feb 22, 2012

I have a SplitViewNavigator with two split views. In one of the views I have a list and in another one I have questions. User must solve the question and when user click send button, he will see another question.

But when user click to send button in one view, how can i know this in the other view? I'm a newbie in Flash Builder and I'm searching for this for hours.

View 1 Replies

Actionscript :: Simply Track Flash Views With Google Analytics?

Feb 29, 2012

Tracking should be independent of hosted page. So flash views should be able to recorded on pages that don't have Google Analytics code.

View 1 Replies

ActionScript 3.0 :: Import 3D Models From 3D Programs Into Flash, And Draw Views To BitmapData?

Jun 8, 2011

This is somewhat of an unusual topic, but hopefully you guys will have a reply that will allow me to go on. I am working on a 2D game following an unusual workflow that is very much 3D based. The workflow is 3D based but the game is flat! This is very important: Graphics are flat images.

Here's the general question. I need a Flash library that loads and is able to deal with 3D models, orient them and convert them in various ways to 2D BitmapDatas. Do you know anything that can do this? To elaborate, I was thinking of the best possible workflows for myself and artists' needs and there is one that I would really enjoy but need serious help to break through. Here it is: Import a textured 3D model from 3DS Max or other similar tools, into Flash At runtime, orient the model the way I want and draw it to BitmapData as a flat 2D colored image. This image is what is supposed to be displayed ultimately. Ideally there shouldn't be a need to display the model at all; just like you can draw MovieClips into BitmapDatas without adding them to the display list. The 3D model is non existent to the user, it's only a workflow convenience for developers, it's a data holder as well as a means to reduce file size.

- Still at runtime, I have to be able to generate a height map: Basically a BitmapData entirely black with, instead of the real texture, a gradient along the 3D Y axis that would have the same 2D shape as the model under its current orientation (i.e. it overlaps perfectly with the flat 2D colored image we made earlier; let's call colored images diffuse maps.) Remember it's along the 3D model's Y axis: If it's a character and its orientation makes the model's shoulder have the lowest Y 3D coordinate while his hips are the highest, the gradient will start from the shoulder. (i.e. it's not always "feet to head", depends on the model's orientation.)

View 7 Replies

Flex :: Use The Flash.net.NetConnection Over Https?

Dec 4, 2009

Is it possible to use the flash.net.NetConnection object to connect to my Flash remoting enabled web application over HTTPS within Tomcat or any other servlet container?

I am using the SpiceFactory cinnamon project for amf remoting and have searched for examples of using HTTPS but see only the reference to a proxy type in the NetConnection object.

If someone could provide a reference or example that would be awesome. Or if it is not possible using the flash.net.NetConnection object are there any recommendations of how to configure HTTPS for the spicefactory cinnamon library.

View 2 Replies

Flash - Pass ...rest To A NetConnection Call?

Jun 8, 2010

I want to pass a rest in a netconnection call, something like this:

public function requestData(service : String, ...params) : void
{
nc.call(service, params);
}

this doesn't work since the call is expecting each parameter to be separated by commas, like:

nc.call(service, params[0], params[1], params[2]);

I've read some posts about apply, but I can't find a solution for this specific case.

View 1 Replies

Flex :: Connecting To Web Server Using Flash.net.NetConnection?

Nov 17, 2010

The ActionScript 3.0 Reference says the following about flash.net.NetConnection:

The NetConnection class creates a two-way connection between a client and a server. The client can be a Flash Player or AIR application. The server can be a web server, Flash Media Server, an application server running Flash Remoting, or the Adobe Stratus service. Call NetConnection.connect() to establish the connection.

Does this mean I make a regular HTTP connection to any web server using an NetConnection object? I am a little confused about this as further down the section on the connect() method says connect(): Creates a two-way connection to an application on Flash Media Server or to Flash Remoting, or creates a two-way network endpoint for RTMFP peer-to-peer group communication....Pass an "http" URL to connect to an application server running Flash Remoting.. So, the application server has to have Flash Remoting?

View 1 Replies

Flash :: Force A Source Port On A NetConnection?

Feb 26, 2011

I'm trying to decipher a pre-existing project and make some modifications as I go.

I have a section of code that starts with creating a new NetConnection and then streaming a media file from an external source. I see in the documentation that you can provide a destination port (via the URL), but is it possible to force Flash to use a specific source port? I couldn't find a clear way to do this in the documentation, but I was curious if anyone else has an alternate method or idea.

View 3 Replies

Flash - Using NetConnection Class To Live Video Feed?

Oct 11, 2010

I'm trying to use the NetConnection class to connect to a live video feed on an external server. I have it set up to start playing my video when the user clicks a Play button, however, this appears in my output every time I click the Play button:

ArgumentError: Error #2126: NetConnection object must be connected.
at flash.net::NetStream/ctor()
at flash.net::NetStream()
at Over/connectLiveStream()[Over::frame2:31]

Here is the (I think relevant) code:
if (playVid.label == "Play") {
nc = new NetConnection();
nc.objectEncoding = flash.net.ObjectEncoding.AMF0;
nc.connect("rtmp://my.rtmp.server:1935/live/");
nsPlay = new NetStream(nc);
nsPlay.play("livestream.flv");
}

View 1 Replies

Flash :: Create A Share Button In AS3?

Mar 24, 2010

creating an AS3 Facebook share button? I need to be able to customize the title, description and picture.

View 3 Replies

Flash :: AS3 Swf Hosting An Swf Share The Same Array?

May 22, 2009

I have an AS2 swf that has an array that is updated when a user clicks on items on the screen. The array stores the currently selected items. This As2 swf is hosted by an AS3 swf loaded in using Loader class and a local connection between them is managed by swfBridge. I want to know what the best way for both AS3 and AS2 swfs to share this array is? or how can I call a function in the AS2 (client) swf and return the array to the AS3 (host) swf when it needs to read the items from the array?

View 1 Replies

ActionScript 3.0 :: Share Flv On Facebook From Within Flash?

Jan 20, 2011

i have something like a flv player in my flash site and i load different flvs depending on user interaction. I want to add a "share on facebook" functionality so the videos will be shared on fb in a way similar to youtube sharing. I've serached a lot but there seems to be a lack of documentation on this subject.

View 0 Replies

ActionScript 2.0 :: Share Data Between Different Flash?

Sep 22, 2004

alright.. recently i needed to share data between different flash .swfs on a homepage.. so i tried to use Shared Objects to do so. sofar its fine.. i tried it .. and as long as the data is stored on my harddisk. the sharedObject "cookies" work fine.. but when i put the site online.. they simply dont work anymore..

could this have something to do with security settings of the browser used?.. doesnt a web browser allow flash to access the harddisk to read and write shared objects.. is there another.. simpler and more reliable way to send data from one .swf file to another..?? (without using php -> my webserver doesnt support this sofar )

View 1 Replies

Flash :: IDE, Duplicated Objects Share Instances?

Jul 30, 2009

I'm using CS3+AS3 and I have a Flash project with a menu, the items in the menu can expand to reveal more items and this is currently done by having each state of the menu in a separate frame, and then doing "gotoAndStop" in this movieclip when buttons are pressed.Perhaps not the best solution, but works very well for this purpose, but as you can imagine, this means that the "same buttons" in "different frames" will do the same thing.All frames were constructed by duplicating the first frame, then moving the buttons around and adding more buttons where needed. So now I set instance names to the buttons in frame #1 and added event-listeners. But when I tested the project, the buttons that had event-listeners in frame #1 also had them in all the other frames. Now this could be an awesome feature, but right now it's more of a huge mystery to me.

ance names in frame #2, but yet they share the same instance. I searched all over the IDE but I could not find any functionality to actually determine what instances are linked, how to link instances or unlink instances. But I do know that two objects share instances when you duplicate them.So my question is, is there no functionality in the Flash IDE to actually make more efficient use of this?

View 1 Replies

Share Flash Screen (multiuser Whiteboard)

Aug 8, 2011

How can I make a Flash Application that can be shared? Shared in the sense of like a paint box. If someone is painting there then the painting must be shown to all users. This means each user can write and edit in the paint box at the same time..

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved