SecurityError: Error #2148: issue

I am getting a SecurityError: Error #2148: when I try to run
an application where I created a component from Flash CS3 which
communicates with a Flash Media Server to play an FLV file. The
full message is as follows:
SecurityError: Error #2148: SWF file
http://localhost:8084/flex/nmDeploy/nmSite/nmSite.swf
cannot access local resource C:\Program Files\Macromedia\Flash
Media Server
2\applications\videoApp\streams\_definst_\dChild-JaRuleJloAkeys-WhatsGoingOn.flv.
Only local-with-filesystem and trusted local SWF files may access
local resources.
at flash.net::NetStream/play()
at fl.video::VideoPlayer/
http://www.adobe.com/2007/flash/flvplayback/internal::_play()
at fl.video::VideoPlayer/
http://www.adobe.com/2007/flash/flvplayback/internal::_setUpStream()
at fl.video::VideoPlayer/
http://www.adobe.com/2007/flash/flvplayback/internal::_load()
at fl.video::VideoPlayer/load()
at fl.video::FLVPlayback/::doContentPathConnect()
I went onLine and found a recommendation to add the following
information to the "Additional compiler arguments:"
-use-network=false
Even with this statment included I still receive the error
message. Any recommendation on how to resolve this issue would be
greatly appreciated.
Thanks in advance,
Bob

Thanks to Jeremy. I found a post on solution at
http://groups.google.com/group/riadev/browse_thread/thread/85cc05c49c5ec50a/9a50ac7d94defe e8
This is probably because all flex swfs are using
local-with-network as the
default sandbox, hence it won't have access to the local
files (including
images), one suggested solution is to add extra compiler
argument:
1. Right click on project > properties > flex compiler
2. add this "-use-network=false" to "additional compiler
arguments" field
3. then recompile the swf
See if this solve the security problem.
Jeremy.

Similar Messages

  • SecurityError: Error #2148

    Hi all. I have problem.
    I have two application(Adobe Air and usual flex application
    in browser).I use LocalConnction for communication.
    Air application consist video files and return for flex
    application array(label:file Name,data:Sourse).
    Flex application in browser show this video files.
    If i run both application in flex builder all works ok.When I
    copy my flex application in other place on my pc and run it, i
    reseved error :
    SecurityError: Error #2148: SWF file
    http://localhost/AirTest/PlayerInBrowser.swf
    cannot access local resource
    D:\Projects\flex\X_ClientForBrowser\bin-debug\Files\X.flv. Only
    local-with-filesystem and trusted local SWF files may access local
    resources.
    Plase help me.

    Hi,
    A couple of things to look at.
    Take a look at the documentation about Flash security
    1)
    http://livedocs.adobe.com/flash/9.0/main/00000347.html
    (particularly security sandboxes and local content)
    2)
    http://www.adobe.com/devnet/flash/articles/fplayer8_security.html
    (more in depth about the rules around interacting with local
    content)
    Specifically, look at LocalConnection.allowDomain
    http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/net/LocalConnection.html#a llowDomain()
    I hope these things help!
    -Erica

  • How to resolve security sandbox violation (Error#2148) in Flex 3 on XP?

    Hi,
    When I tried to access an image on c:\ (on XP), I get the following error:
    *** Security Sandbox Violation ***
    Connection to file:///C:\DBFiles\3.jpg halted - not permitted from http://localhost/test-debug/test.swf
    -- Remote SWFs may not access local files.SecurityError: Error #2148: SWF file http://localhost/ullmanphp-debug/ullmanphp.swf cannot access local resource file:///C:\DBFiles\INDSprintOrgChart.pptx\3.jpg. Only local-with-filesystem and trusted local SWF files may access local resources.
    at flash.display::Loader/_load()
    at flash.display::Loader/load()
    It looks like some sort of mismatch on security settings. I have done the following so far (based on what I got by googling....)
    1. Flex comipler setting additional compiler arguments:  -use-network=false
    2. I have added a crossdomain.xml on the source directory with these lines...
    <site-control permitted-cross-domain-policies="master-only"/>
    <allow-access-from domain="*"/>
    <allow-http-request-headers-from domain="*" headers="SOAPAction"/>
    However, error is still appearing. How do I fix this for testing on my local machine. I cannot move to a webserver at this time.
    Thanks!.

    How do I set Security.sandboxType related to flash player? When I try to see it in my application through debugger it says "remote". I think I need to set it to one of the following from the adobe manual pages...
    Security.sandboxType has one of the following values:
    remote (Security.REMOTE)—This file is from an Internet URL and operates under domain-based sandbox rules.
    localWithFile (Security.LOCAL_WITH_FILE)—This file is a local file, has not been trusted by the user, and it is not a SWF file that was published with a networking designation. The file may read from local data sources but may not communicate with the Internet.
    localWithNetwork (Security.LOCAL_WITH_NETWORK)—This SWF file is a local file, has not been trusted by the user, and was published with a networking designation. The SWF file can communicate with the Internet but cannot read from local data sources.
    localTrusted (Security.LOCAL_TRUSTED)—This file is a local file and has been trusted by the user, using either the Flash Player Settings Manager or a FlashPlayerTrust configuration file. The file can read from local data sources and communicate with the Internet.
    application (Security.APPLICATION)—This file is running in an AIR application, and it was installed with the package (AIR file) for that application. By default, files in the AIR application sandbox can cross-script any file from any domain (although files outside the AIR application sandbox may not be permitted to cross-script the AIR file). By default, files in the AIR application sandbox can load content and data from any domain.
    Any input on how to set it would be greatly appreciated. Thanks!

  • Error #2148 when loading image from ByteArray (not network or file)

    Hi!
    When I try to access bitmap data of Image loaded from ByteArray, I receive the following error:
    Error #2148: SWF file file:///C|/blablabla..../MyFlash.swf cannot access local resource file:///C|/blablabla..../MyFlash.swf/[[DYNAMIC]]/2. Only local-with-filesystem and trusted local SWF files may access local resources.
    I'm on Flash, not on AIR. And ByteArray contains PNG data which I prepare myself
    I tried to do it with Image.load and loader.loadBytes - the error is the same. I tried to use Flex SDK 3.4, 3.5 & 3.6 - nothing helps.
    When I add this image to my stage, it is displayed absolutely OK, but I still can't access bitmapData of this image - always got the same error.
    Flash Player 10
    Here are the samples of my code:
              public function onLoadComplete(event:Event):void
                var loader:LoaderInfo = event.target as LoaderInfo;
                var bmp:Bitmap = loader.loader.content as Bitmap; <-- here I received the error
                var bmpDat:BitmapData = bmp.bitmapData;
                this.bitmapData.copyPixels(bmpDat,new Rectangle(0,0,width,height), new Point(0,0));
                var loader:Loader = new Loader();
                loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
                loader.loadBytes(byteArray);
    And another try
           var image: Image = new Image()
           this.addChild(image);
           image.addEventListener(FlexEvent.UPDATE_COMPLETE, onCompleteLoad2 );
          image.load(byteArray);
          public function onCompleteLoad2 (e:flash.events.Event):void
                     var image:Image=e.target as Image;
                     var bitmapData:BitmapData;
                     bitmapData=new BitmapData(image.width,image.height,true,0);             
                     bitmapData.draw(image); <-- here I received the error, while image is correctly added to the stage and displayed
    What's wrong? It seems, the image loaded from byteArray is treated as local resource. How can I overcome it inside the code? Because this .swf is
    run on different computers and I can't just add a flash security exception on every of them....
    Please, help I spent, maybe 20 hours and still can't find the solution

    I had the same problem, except I was reading in the image from the local disk using FileReference.  Anyway, my issue was resolved by using the
    -use-network=false option on the command line of my compiler (I do all my development in the shell using 'vi' to edit and mxmlc to compile).
    Ttry "-use-network=false" and see if that helps...
    ...bob...

  • SecurityError: Error #2123: Security sandbox violation: BitmapData.draw: cannot access

    When we try to print the Google Map API for Flash component, it is throwing the Security Sandbox Violation
          SecurityError: Error #2123: Security sandbox violation: BitmapData.draw: http://ps6143:8080/aa/XYZ/Main.swf/[[DYNAMIC]]/1 cannot access  http://mt1.google.com/vt/lyrs=m@171000000&hl=en&src=api&x=1&y=1&z=1&s=Gali&flc=x3t. No policy files granted access.
    at flash.display::BitmapData/draw()
    To avoid this error we tried to use the alternate API provided by library. But that also causing cross domain issue as it loading some 3d library internally which is not able to access our application.
    SecurityError: Error #2121: Security sandbox violation: BitmapData.draw: http://maps.googleapis.com/mapfiles/lib/map_1_20_10_3d.swf cannot access http://ps6143.persistent.co.in:8080/dv/SiteOptimizer/SiteOptimizer.swf/%5b%5bDYNAMIC%5d%5d /1http://ps6143:8080/aa/XYZ/Main.swf/[[DYNAMIC]]/1. This may be worked around by calling Security.allowDomain.
    at flash.display::BitmapData/draw()
    Please help us in resolving this issue.
    Thanks & Regrds,
    Ravi Darji

    There is no redirect... Charles is a web proxy so it will look completely legitimate to the browser.
    According to the help, it's getting the access request from the SWF itself and not the crossdomain.xml file:
    In the case of a source object other than a loaded bitmap, the source object and (in the case of a Sprite or MovieClip object) all of its child objects must come from the same domain as the object calling the draw() method, or they must be in a SWF file that is accessible to the caller by having called the Security.allowDomain()method.
    http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9 b90204-7d1b.html#WS5b3ccc516d4fbf351e63e3d118a9b90204-7c4a
    So the default state accessing a SWF on a different domain is protected, unless that SWF allows some or all domains to access it via the Security.allowDomain() method.

  • XML & Error #2148

    Hi,
    maybe this question is already answered elsewhere in this forum, but I can't find where. So;
    I imported an XML file into Excel(2003) and made some calculations. That Excel file I imported in Xcelsius Engage 2008, created a testdashboard and exported that as HTML-file.
    All files were in a local folder(C:\temp). When updating my XML file, my dashboard was updated as well. So far OK
    Now, I did exactly the same beginning from scratch and stored everything in a networkfolder. When running my HTML file, I get an error #2148.
    Why?
    Thanks,
    Edwin.

    Edwin I believe that you have to check the path to your xml file in the connection manager.  The Path has to point exactly to where the xml file is now.  From client machines the file location security settings have to be set to always allow but also the path set in the datamanager has to also be assumed by the client machines accessing the file, if they are trying to open the file from file.  I had this same issue and it took some figuring to fix this.
    Not sure if I am explaining this clearly.
    Mark

  • Is anyone else having Config error 16 issue when trying to start PSE 12 or Premier Elements after Mac upgrade to Yosemite 10.10 on iMac

    Is anyone else having Config error 16 issue when trying to start PSE 12 or Premier Elements 12 after the Mac upgrade to OS X Yosemite 10.10 on iMac. I have had a number of issues with software and things after upgrading to OS X Yosemite 10.10 and even 10.10.1.  I have uninstalled and reinstalled both PSE 12 and Premier Elements 12 a number of times and everything goes fine until its ready to launch and then you get an error message. Numerous uninstalled and reinstalls don't removing the problem.  Strangely enough  PSE 11 still appears to boot up and I never owned Premier Elements 11 so I don't know if it will start. I thought with Apple dropping its Apeture software and greater integration of iPhoto and Apeture files into Lightroom 5.7 all would be harmonious between these two players. Im not sure where Adobe wants us to go it recently removed the plugin to allow you to update files from LR to Adobe Revel, whats up with that. I now own two version of Adobe software that no longer work with my Mac and now way of uploading pictures from Lightroom to Revel. Needless to say I am pretty reluctant to sign on to a subscription of Creative Cloud with long term financial obligations when I can't even get my current Adobe software to work independently much less integrate with Lightroom. Frustrated with it all!

    Get rid of 'put disks to sleep when possible' and you may see a dramatic improvement (not necessarily a cure).
    That specific problem is a multiple-Processor (including graphics processor) problem, where one of the processors lost track of whether it should be responding to interrupts. You may have a Hardware problem.

  • Error while transferring file :: Error while issuing ssh command.

    Hi All,
    I am having a JSP based website application.
    I am getting the following exception in my logs.
    [ERROR] 05/04/2007 03:43:44 - Error while transferring file :: Error while issuing ssh command.
    java.net.ConnectException: Connection timed out
                at java.net.PlainSocketImpl.socketConnect(Native Method)
                at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
                at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
                at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
                at java.net.Socket.connect(Socket.java:464)
                at java.net.Socket.connect(Socket.java:414)
                at java.net.Socket.<init>(Socket.java:310)
                at java.net.Socket.<init>(Socket.java:125)
                at com.sshtools.j2ssh.net.SocketTransportProvider.<init>(Unknown Source)
                at com.sshtools.j2ssh.net.TransportProviderFactory.connectTransportProvider(Unknown Source)
                at com.sshtools.j2ssh.SshClient.connect(Unknown Source)
                at com.sshtools.j2ssh.SshClient.connect(Unknown Source)
                at com.sshtools.j2ssh.SshClient.connect(Unknown Source)
                at com.novartis.util.DataExporter.transportFile(DataExporter.java:127)
                at com.novartis.util.DataExporter.export(DataExporter.java:101)
                at com.novartis.businessmanagers.SandosSignupManagerPojoImpl.export(SandosSignupManagerPojoImpl.java:103)
                at com.novartis.util.DataExportJob.process(DataExportJob.java:48)
                at com.novartis.util.ExclusiveJob.execute(ExclusiveJob.java:35)
                at org.quartz.core.JobRunShell.run(JobRunShell.java:191)
                at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)Any help would be appreciated.
    Thanks.

    This means that the SSH server you're trying to connect to isn't listening. Is the SSH server running? Are you trying to connect to the right machine?

  • SecurityError: Error #2048 when using special characters in request url

    Hi all,
    I'm facing a really strange problem with requesting address data from a in-house developed address webservice that can be accessed using a HTTPS connection.
    The problem is that I get the following error when a request has been made with special characters in the url:
    SecurityError: Error #2048: Security sandbox violation: http://www.foo.com/myapp.swf cannot load data from
    https://www.bar.com/myservice.svc/Aleja Legionów ul., BYTOM.
    The url is encoded using encodeURIComponent. Fiddler show's a correctly encoded url:
    https://www.bar.com/myservice.svc/address/Aleja%20Legion%C3%B3w%20ul.%2C%20BYTOM
    The server send a normal response back.
    The weird thing is that this only happens on FireFox with special characters in the url. With normal characters, it works fine.
    On IE everything works fine..
    crossdomain.xml of the www.foo.com:
    <cross-domain-policy>
    <site-control permitted-cross-domain-policies="all"/>
    <allow-http-request-headers-from domain="*" headers="*" secure="false"/>
    <allow-access-from domain="*" headers="*" secure="false"/>
    </cross-domain-policy>
    Any help is appreciated.
    Best regards,
    Sjoerd Brandsma

    You could try downloading the Oracle 8.1.7 client and the latest
    Oracle8 ODBC driver, install them on your machine, and verify
    that the failure goes away. That's obviously the acid test.
    I can tell you that when I worked in the ODBC driver group we
    did identify and fix some bugs where our parser wasn't skipping
    string literals. If this particular bug wasn't fixed earlier,
    it almost certainly was then (I'm guessing that work was done 12-
    18 months ago).
    Justin

  • Really urgent! SecurityError: Error #3226,Plz help!

    i need to import a swf file into my project,the swf file was created by a quick gallery application for mac ( bannerzest pro)
    the swf works fine until i exchange the project into AIR project, I get a
    SecurityError: Error #3226: Cannot import a SWF file when LoaderContext.allowCodeImport is false.
    at flash.display::Loader/_loadBytes()
    at flash.display::Loader/loadBytes()
    at EmbedFlash()
    at MyFactory/init()
    at MyFactory/onEnterFrame()
    no idea for this, anyone can help me or any idea to avoid the error?

    my codes,
    <fx:Script>
    <![CDATA[
    import mx.core.UIComponent;
    import mx.events.FlexEvent;
    public function creationComplete(event:FlexEvent):void
    //Security.loadPolicyFile("assets/images/crossdomain.xml");
    var loader:Loader = new Loader();
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loaderComplete);
    loader.load(new URLRequest("assets/images/YinkunB.swf"));
    private function loaderComplete(event:Event):void
    var loaderinfo:LoaderInfo = event.target as LoaderInfo;
    var loader:Loader = new Loader();
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
    var loaderContext:LoaderContext = new LoaderContext();
    loaderContext.allowCodeImport = true;
    loader.loadBytes(loaderinfo.bytes, loaderContext);
    private function onLoadComplete(event:Event):void
    var displayObject:DisplayObject =  event.target as DisplayObject;
    var ui:UIComponent = new UIComponent();
    ui.addChild(displayObject);
    this.addElement(ui);

  • More error -8 issues - Linksys BEFSR41 to Airport Express

    Hey there, I hope you guys can help b/c I am having a heck of a time with this. I'm having Error-8 issues with my ichat AV 3.1 despite numerous changes. Here's the setup.
    Motorola cable modem-->Linksys BEFSR41 wired router-->Airport Express and Vonage VOIP conected to router.
    Imac Intel 2 GHZ 20" and MBP CD 2.16GHZ both running Tiger 10.4.10
    Router setup: DHCP enabled (Obtain IP automatically, all port forwarding ports opened as per Ralph's numerous posts. Disabled DMZ, Disabled UPnP b/c Airport Express does not support (Even though the router CAN use UPnP). MTU enabled 1492
    Comcast Cable: I called them and they do not give out DNS's for setting up static IP addresses.
    Router IP: 192.168.1.1
    DHCP starting IP: 192.168.1.100
    Range: 192.168.1.100 - .149
    Subnet 255.255.255.0
    Airport Express setup:
    Internet tab: Using DHCP
    IP address: 192.168.1.102
    DNS Server: 68.87.85.98, and (in grey next to it) 68.87.69.146
    WPA2 Personal Security
    Network tab: "Distribute IP addresses" DISABLED
    Port mapping, Access control, and WDS tabs all left blank.
    Imac Network Prefs:
    Airport connected to internet
    IP Adddress: 168.192.1.101 Using DHCP
    Mac Firewall OFF
    Quicktime Prefs: Set to 1.5 MBPS T1/ Internet LAN
    iChat Prefs: AIM port set to 443 b/c of Vonage. Bandwidth set to NONE.
    MBP Network prefs:
    Airport connected to internet
    IP Adddress: 168.192.1.100 Using DHCP
    Mac Firewall OFF
    Quicktime Prefs: Set to 1.5 MBPS T1/ Internet LAN
    iChat Prefs: AIM port set to 443 b/c of Vonage. Bandwidth set to NONE.
    Main issues.... error -8 when trying to video or audio chat. Tested with appleu3test03= NO GO with Intel iMac but MBP works! Tried vid chat with brother and NEITHER WORK.
    I cannot figure out what is going on but I think it is the router. Problems started when I switched to Linksys from netgear. Could it be that I need to just pony up and get an Airport Extreme so that I can utilize UPnP? Or am I missing something.
    Thanks in advance for the help.
    Pete
    iMac Intel and MBP   Mac OS X (10.4.10)  

    Hi,
    I would renumber the devices radiating out from the router (192.168.1.1)
    Airport 192.168.1.100
    Computer one 192.168.1.101
    Computer two 192.168.1.102
    It's not a big thing but I prefer it in case the power goes off or things needs rebooting. And it points to the order of things
    The Airport doing NO Distributing Addresses should allow UPnP to work. It's just a dumb Wireless Access Point now.
    Otherwise if you are doing Port Forwarding it will be to only one Computer and only Text chatting will work on both due to the 443 port being below 1024(NAT)
    If the Airport is not allowing UPnP then I would go for Port Triggering if your Linksys does it.
    Some BEFS41 versions do. I have linked yo to the lowest version listed on the Port Forward site's Triggering pages.
    Don't worry too much about the PC app they say you need.
    Fill in the Trigger port at the top and without hitting enter scroll down to see how that effects the table.
    Then set it up like this
    This pic shows Port 5190 and the AV ports
    You will need to add the Bonjour Ports (5297, 5298 and 5353) and Jabber ones (5220, 5222, 5223) as single lines like the port 5190
    On My Linksys you did not have to specify Protocols. Nor do you on the link above.
    As you have gone Static (router to Airport) you could try allowing the Airport to do Distributing Addresses as the Subnet problem will have been dealt with and the NAT issue will be more linear.
    The Vonage device will have conflict on port 5060 (In fact 5060-5063) with iChat if In-Line between the computers and the Modem. Your set up suggests that this is not the case and it should not be an issue.
    If by Brother you mean the other computer this will need the Bonjour Ports in both directions (5297, 5298 and 5353) to be able to work.
    Strangely this still needs the port 5060 and does contact the SNATMAP server according to my Little Snitch hence the reason for UPnP or Port Triggering for your LAN.
    2:09 PM Wednesday; July 11, 2007

  • Error #2148 when updated Flash Player to version 14

    Links to files shared in my network area stops working after update Flash Player to v.14 (in FP 12 and FP 13 it worked).
    When I click on link displaying in my application via TextFlow i got this error message:
    Error #2148. SWF file <http://my_www_server/path_to_my_swf> cannot access local resorce \\SERVER-NAME\Folder\File.ext.
    Only local-with-filesystem and trusted local SWF files may access local resources.

    No one has a similar problem?

  • Error when "Issue output To" is done in VA23 transaction

    Hi All,
    I'm getting a error when "Issue output To" is done in va23 transaction, the message reads as follows "Element CONF_OUT window MAIN is not defined
    form ZVQUOTATION_3YR".
    But when i check the script the text element CONF_OUT is present in the main window
    Can u please tell me what is the reason for this.
    Thanks & Regards
    Santhosh

    Check in the driver program .when you calling the Write_form for this text element is the name proper ,check out the sapscript is activated .
    Please reward if useful.

  • Error sense issue dvd burning

    I have probably the last 24" i mac made and have been very pleased with its performance over the 5 years i have had it, but just wanted to share with all that are having the "error sense" issue when attempting to burn a dvd.
    Don't bother wasting your money buying alternative dvd media,don't bother to reformat your machine or use alternative burning software as i have tried everything in the book and everything that is not in the book, this as someone quiet rightly said on communities a Apple problem and i am surprised that Apple have not jumped on this one sooner.
    Apple get your best minds on this please there are lots of frustrated people out here

    lots of people repport issues with optical drives dieing after awhile and with all the moving parts I'm not really chocked
    if you check the new macs then apple is no longer using optical drives in their macs so suppose they are doing something
    connecting any dvd usb burner to your imac should work fine

  • This bug has been around for over a year: SecurityError: Error #2123: Security sandbox violation

    Hi,
    The bug of 'SecurityError: Error #2123: Security sandbox violation: BitmapData.draw: file:///xxx/xxx.swf cannot access rtmfp://fms4.acrobat.com/cocomo/na2-sdk-xxx/xxx. No policy files granted access.' was first reported in lccs forum over a year ago:
    http://forums.adobe.com/message/2803074
    But the bug is still around. The bug can be generated by calling BitmapData.draw() on a flash.media.Video object which is attached to a p2p stream. It looks like the solution is to have the publisher to call:
    send("|RtmpSampleAccess", true, true)
    on the NetStream object _before_ the subscriber calls NetStream.play(), in order to give the permission to subscribers for audio and video streams.
    In lccs library, the above permission authorisation happens in WebcamPublisher:
    protected function onNetStatus(p_evt:NetStatusEvent):void
    if (p_evt.info.code=="NetStream.Connect.Success") {
    setTimeout(sendSnapShotPermission, 500);
    _stream.send("|RtmpSampleAccess", true, true);
    protected function sendSnapShotPermission():void
    _stream.send("|RtmpSampleAccess", true, true);
    but it doesn't help the problem. In fact, it is not clear to me when this 'snap shot permission' is sent to the subscriber.
    One more note: This is not a critisism for the lccs development quality, but rather a question on how ready lccs is for production use. After encountering this bug, I had to go through the lccs code (the open source parts), and found out that the library is not really written, well, carefully, and it is full of temporary quick-n-dirty fixes.
    For instance in the above example, sendSnapShotPermission() is called after 500 milliseconds, probably to allow something to happen before calling the method, but how can you be sure that it will happen in 500 milliseconds? Probably,an event listener should have been used. Immediately in the next line, we see:
    _stream.send("|RtmpSampleAccess", true, true);
    which is a duplicate of sendSnapShotPermission(). many examples like this can be found throughout the library.
    Aureliano

    Hi Nigel,
    Two questions:
    1. When the publisher sends the access permission to the subcriber by:
    netStream.send("|RtmpSampleAccess", true, true)
    , on the subscriber side, what event or function can handle the guaranteed receipt of the access permission? Currently it is possible to draw the incoming stream video upon receiving NetStream.Play.Star and waiting for 5 seconds or so:
    public class MyWebcamSubscriber extends WebcamSubscriber {
    override protected function layoutCameraStreams():void
    // trying the event listener seems to work here.
    _streamManager.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus);
    override protected function onNetStatus(e:NetStatusEvent):void
    super.onNetStatus(e);
    case "NetStream.Play.Start":
    setTimeout(function():void {
    // draw the video from the incoming stream here.
    }, 5000);
    The questions is, which event can let the subscriber know that it has the access permission to the video stream?
    2. In WebcamPublisher, why is that the access permission is sent 3 times?
    a. Once on receiving NetStream.Connect.Success with 0.5 second delay, as in below.
    b. Once immediately upon receiving NetStream.Connect.Success, as in below.
    protected function onNetStatus(p_evt:NetStatusEvent):void
    if (p_evt.info.code=="NetStream.Connect.Success") {
    setTimeout(sendSnapShotPermission, 500);
    _stream.send("|RtmpSampleAccess", true, true);
    protected function sendSnapShotPermission():void
    _stream.send("|RtmpSampleAccess", true, true);
    c. Once in onConnectionTypeChange() with 2 seconds delay:
    protected function onConnectionTypeChange(p_evt:StreamEvent):void
    if ( _streamManager.isP2P) {
    _stream= new NetStream(_connectSession.sessionInternals.session_internal::connection as NetConnection,NetStream.DIRECT_CONNECTIONS);
    setTimeout(sendSnapShotPermission, 2000);

Maybe you are looking for

  • Unrestricted sharing of free* items from iTunes Store

    We are trying to find a legal but convenient way of managing our family iTunes purchases and sharing. We are just beginning to use iTunes on a couple of new Macs, three iPads or iPod Touch devices and two old PC's. We have a home Wi-Fi network with a

  • Can multiple Powershell v4 DSC configuration objects be combined on a machine?

    I'm working on configuring servers using Powershell Desired State Configuration (DSC). I have several different groups of IIS servers. The configuration for all of them is about 90% identical, but there are differences between the groups. In order to

  • No longer able to submit app to iTunes.

    Today I am trying to submit a new version of an app to iTunes with the application loader but keeps coming up with the following error. The app was submitting fine last Friday. Any help or fixes will be much appreciated. Package Summary: 1 package(s)

  • How to remove text

    I have added a piece of text to a movie I am making. How do I remove it?

  • Can I opt to only sync iPhone 4 via iTunes and NOT iCloud?

    I only use the iCal, Contacts, and Mail parts of MobileMe.  I sync all three via iTunes.  I don't need to worry about any web storage or gallery or other stuff. Because my MacBookPro is early 2008, I'm leery of upgrading to Lion, even though it's nee