[Flashcoders] Re: getting XML response body when HTTP status is not 200
Another thought: AS3 seems to have a generic Socket class. Is there anything like this in AS2? Thanks, Vishal On 4/28/07, Vishal Kapur <[EMAIL PROTECTED]> wrote: I am loading an XML response from a web service using XML.load(). The web service is defined such that when a request is made with parameters that are not in the bounds of the application, it will return an XML response with an error code/message. This response will have an HTTP header status of 400 (Bad Request). When I use XML.load(), however, I find that the XML in the body of the error response does not get loaded into the XML object. It looks like whenever the HTTP response comes back with a status that indicates an error, the body of the response is thrown away. I would like to be able to get the body of the response in all cases. Does anyone know of a way around this? Or is there another class that is more appropriate for what I am trying to do? Thanks, Vishal ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] determinign whether a flv is done playing back
Check out NetStream.onStatus(). On 4/28/07, nik crosina <[EMAIL PROTECTED]> wrote: Hi All, I got a question which is very easy I guess. I want to play a video clip on frame one, and once that is finished move on to the next item on the timeline. I am getting the clip to play with the following script (I need to set an absolute path as it is a DVD-ROM, using Zinc. here is what I got so far: var videoPath = mdm.Application.path+"data/av/IntroClip.flv" var nc:NetConnection = new NetConnection(); nc.connect(null); var ns:NetStream = new NetStream(nc); IntroClip_video.attachVideo (ns); ns.play (videoPath); Is there something like playDone, or media.stopped. Is it a listener I looking for? Thanks, Nik Crosina ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] getting XML response body when HTTP status is not 200
I am loading an XML response from a web service using XML.load(). The web service is defined such that when a request is made with parameters that are not in the bounds of the application, it will return an XML response with an error code/message. This response will have an HTTP header status of 400 (Bad Request). When I use XML.load(), however, I find that the XML in the body of the error response does not get loaded into the XML object. It looks like whenever the HTTP response comes back with a status that indicates an error, the body of the response is thrown away. I would like to be able to get the body of the response in all cases. Does anyone know of a way around this? Or is there another class that is more appropriate for what I am trying to do? Thanks, Vishal ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] determining which object is displayed at agivenpoint
Ok. This is what I was missing. Thanks to Karina and Erik for pointing out that you need to compare the entire parent chain of two objects to figure out which one is being rendered above the other. The only thing to add is that in addition to checking depths, the _visible property needs to be checked for the parent chain for each object (so if _visible is false anywhere in the parent chain, I consider that object to be invisible). This works in all cases except for some TextFields, where the bounding box of the textfield object is bigger than the area actually occupied by the text. This can be solved with a custom hitTest() implementation that uses Textfield.textWidth and .textHeight to get the bounding box of the displayed text. An interesting corollary is that this method would be a way to implement onRollOver for TextFields (if that ever proves useful to anyone). Steven, I'm not familiar with the class you're referring to. Could you send the link to it? I'm always looking to improve the simplicity and efficiency of my code... -- Vishal On 2/8/07, Steven Sacks | BLITZ <[EMAIL PROTECTED]> wrote: I think the class I wrote works well enough, I actually pulled it out of an app I'm working on with complex rollovers like that. Why not consider my way? It's simple, easy and, most importantly, it works. It hardly takes any processing power, too. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] determining which object is displayed at agivenpoint
It looks like you spent some time on this response, I really appreciate that. As I mentioned in my first mail, depth, _visible and _alpha are the properties I'm checking right now to resolve conflicts. So my code looks very similar to your code below. This works sometimes, but I've run into cases where there are 2 movieclips for which hitTest() is true, _visible is true, _alpha is 100, and the depths are identical. One of the movieclips is obscured behind the other; there must be some way to distinguish them. Are there any other properties on movieclips (maybe hidden ones) that might be of use? The Flash runtime must be doing this internally for onRollOver event firing; anyone know how this works? Thanks, Vishal On 2/7/07, Karina Steffens <[EMAIL PROTECTED]> wrote: Ok, I see your problem, so lets think what else you can do with the hitTest approach... First of all, you can set the shape flag to true, so that the hit test will only return true if there's something there (as opposed to the entire bounding rect). Then you can test for _alpha (you might want to test for _visible also), thus eliminating invisible buttons, such as your big rectangle that obscures the rest. Finally, checking for different depths - I recently discovered that if you loop through a clip, it starts at the highest depth, even on the same layer: for (var i in _root) { trace(i + " " +_root[i].getDepth()); } $version clip3 -16379 clip2 -16381 clip1 -16383 So now you know which one has the highest depth: clip3, which also comes first in the loop. At this point, you can break the loop. If you need to go deeper, you can then recurse within that clip, and see if it has any child mcs, which one of those scores the highest hitTest and if that one has any children - etc. Here's some quick&dirty code: for (var i in _root) { trace(i + " " +_root[i].getDepth()); } _root.onEnterFrame = function() { for (var i in this) { var clip = this[i]; if (!(clip instanceof MovieClip)) { continue; } if (clip._alpha == 0 || clip._visible == 0) { continue; } if (clip.hitTest(_root._xmouse, _root._ymouse, true)) { trace(clip); break; } } }; On the timeline, I placed three circular clips overlapping eachother, so that clip1 is at the lowest depth and clip3 at the highest. I made clip3 invisible by setting it's alpha to 0. After moving my mouse over the clips, starting from the third, the trace result was: $version clip3 -16379 clip2 -16381 clip1 -16383 _level0.clip2 _level0.clip2 _level0.clip2 _level0.clip2 _level0.clip2 _level0.clip2 _level0.clip2 _level0.clip1 _level0.clip1 _level0.clip1 Each time the trace picked out the highest visible part of a clip, thus resolving any conflicts. Hope this helps to point you in the right direction. Karina > -Original Message- > From: Vishal Kapur [mailto:[EMAIL PROTECTED] > Sent: 07 February 2007 20:29 > To: Flashcoders mailing list > Subject: Re: [Flashcoders] determining which object is > displayed at agivenpoint > > To respond to the recent activity on this thread: > Erik, the core functionality that I need really does need to > be comprehensive and fairly generic: so, given any 3rd party > swf which I don't have a priori knowledge of, determine which > object is currently underneath the mouse. It needs to work > for any movieclip or TextField object. It's proprietary so I > can't really disclose why I need it. > You mention that implementing this would be process > intensive: this is ok to start. The way I would like to > tackle this problem is to get it working functionally, and > worry about performance later. > > Karina, Jason, the approaches you are suggesting of looping > through all the movieclips and calling hitTest() on each one > is exactly what my first approach was (see my first email in > this thread). The problem is that very often multiple > movieclips will return hitTest()==true for a given mouse > position (clips at different depths, clips obscuring others, > etc). That's what I meant by "2 conflicting objects" in my > first mail. I'm trying to find an algorithm to resolve conflicts. > > There is another approach which Erik mentioned, which is to > define/override the onRollOver callback for every object that > I care about, and set some variable that keeps track of the > last object that invoked onRollOver. I have tried this > before, and I ditched it because I couldn't find a way to get > TextField objects to invoke an onRollOver callback (or to > otherwise respond to a 'roll over' event). > Any ideas on this? > >
Re: [Flashcoders] determining which object is displayed at agivenpoint
To respond to the recent activity on this thread: Erik, the core functionality that I need really does need to be comprehensive and fairly generic: so, given any 3rd party swf which I don't have a priori knowledge of, determine which object is currently underneath the mouse. It needs to work for any movieclip or TextField object. It's proprietary so I can't really disclose why I need it. You mention that implementing this would be process intensive: this is ok to start. The way I would like to tackle this problem is to get it working functionally, and worry about performance later. Karina, Jason, the approaches you are suggesting of looping through all the movieclips and calling hitTest() on each one is exactly what my first approach was (see my first email in this thread). The problem is that very often multiple movieclips will return hitTest()==true for a given mouse position (clips at different depths, clips obscuring others, etc). That's what I meant by "2 conflicting objects" in my first mail. I'm trying to find an algorithm to resolve conflicts. There is another approach which Erik mentioned, which is to define/override the onRollOver callback for every object that I care about, and set some variable that keeps track of the last object that invoked onRollOver. I have tried this before, and I ditched it because I couldn't find a way to get TextField objects to invoke an onRollOver callback (or to otherwise respond to a 'roll over' event). Any ideas on this? Thanks, Vishal On 2/7/07, Jason Boyd <[EMAIL PROTECTED]> wrote: I've been following this thread and am just curious -- everyone seems to be assuming that looping through all clips and doing hitTest() is inefficient, but presumably this is exactly what the Flash player is doing with every mouse move. Is there some good reason to assume the Flash player is doing this internally much more efficiently than the function exposed through AS as hitTest()? Without a priori knowledge, I'd recommend trying this, and if it doesnt turn out to noticeably slow anything, you're done. On 2/7/07, Karina Steffens <[EMAIL PROTECTED]> wrote: > > Hi Vishal, > > I apologise ahead if I'm being dense here, but nobody seems to have > mentioned the obvious solution: > Looping through the mcs in your third party flash movie and checking for > hit-test with the mouse position. > > var hit_array:Array = []; > for (var i:String in target_mc){ > var mc:MovieClip = target_mc[i]; > if (!mc instanceof MovieClip){ > //not a movie clip - ignore > continue; > } > //Check for hit test > if (target_mc[i].hitTest(_root._xmouse, _root._ymouse, true) > hit_array.push(target_mc); > } > } > > At the end of it you have an array of all the movie clips that "scored" a > hit test. > > This code is just off the top of my head, an thoroughly untested. Also > Depending on the structure of your flash movie, you will probably want to > delve deeper and test for a hit within each movie clip that you encounter. > It's also not very efficient, especially if you have to do recursion, so I > wouldn't recommend doing it too often. (don't use onMouseMove but rather > an > enterFrame event, an interval or some kind of once-off event - depending > on > your application). > > Alternatively, if you already know which objects should be tested, you can > do this more efficiently by hard-coding them manually into an array and > looping within the array to check for a hit test. Not pretty, but should > work. > > And finally, something that occurred to me while writing this post, you > could try temporarily switching off the _visible property of the > overlapping > clip just before checking for _droptarget - and then switching it on > again. > This might be the least processor-intensive way of doing this. > > Cheers, > Karina > > > > > > > -Original Message- > > From: Vishal Kapur [mailto:[EMAIL PROTECTED] > > Sent: 07 February 2007 01:26 > > To: Flashcoders mailing list > > Subject: Re: [Flashcoders] determining which object is > > displayed at agivenpoint > > > > Ok, got it. Thanks for the suggestion. I tried this but it > > doesn't work with the third-party flash movie I am looking > > at. They have an movie clip with _alpha set to 0 that covers > > the stage at a depth higher than all other visible elements. > > As a result _droptarget is always set to that object. What I > > need is something that takes into account visibility. > > > > Any other thoughts on this? > > > > -- Vishal > > > > > > On 2/6/07, Mike Mountain <[EMAIL PROTECTED]> wrote: > > > What he
Re: [Flashcoders] determining which object is displayed at a givenpoint
I should have clarified: in the original problem with 2 conflicting objects, _alpha is also set to 100 for both objects. On 2/6/07, Alain Rousseau <[EMAIL PROTECTED]> wrote: You have your answer in your question ! :) the _alpha is set to 0, thus invisible but still with a _visible = true property. So check for also the _alpha value, not only the _visible value Vishal Kapur wrote: > Ok, got it. Thanks for the suggestion. I tried this but it doesn't > work with the third-party flash movie I am looking at. They have an > movie clip with _alpha set to 0 that covers the stage at a depth > higher than all other visible elements. As a result _droptarget is > always set to that object. What I need is something that takes into > account visibility. > > Any other thoughts on this? > > -- Vishal > > > On 2/6/07, Mike Mountain <[EMAIL PROTECTED]> wrote: >> What he's saying is that _droptarget will tell you exactly what is at >> the top under the users mouse - but in order to use it you have to use >> startDrag to fool it in to working. Maybe you could drag an invisible >> clip around or something. >> >> M >> >> > -Original Message- >> > From: [EMAIL PROTECTED] >> > [mailto:[EMAIL PROTECTED] On Behalf >> > Of Vishal Kapur >> > Sent: 06 February 2007 16:03 >> > To: Flashcoders mailing list >> > Subject: Re: [Flashcoders] determining which object is >> > displayed at a givenpoint >> > >> > I don't understand what you're suggesting. The user is not >> > dragging the movieclip. >> > >> > The idea is to write a function with a signature like: >> > function getObjectAtPoint(xmouse:Number, ymouse:Number):Object >> >> >> ECM Systems Ltd, Ellifoot Park, Burstwick, East Yorkshire HU12 9DZ >> Tel: 01964 672000 >> Fax: 01964 671102 >> Registered in England no. 01646471 >> The information contained within this email expresses the views of >> the sender and not necessarily those of the company. It is private >> and confidential and may be legally privileged. It is intended solely >> for those authorised to receive it. If you are not the intended >> recipient you are hereby notified that any disclosure, copying, >> distribution or action taken in reliance on its contents is strictly >> prohibited and may be unlawful. If you have received this email in >> error, please telephone us immediately on 01964 672000 or email a >> reply to highlight the error and then delete it from your system. >> This email may contain links to web-sites, the contents of which ECM >> Systems Ltd have no control over and can accept no responsibility >> for. Any attachments have been virus-checked before transmission; >> however, recipients are strongly advised to carry out their own virus >> checking as ECM Systems Ltd do not warrant that such attachments are >> virus-free. Please note that this email has been created in the >> knowledge that Internet email is not a secure communications medium. >> We advise that you understand and observe this lack of security when >> emailing us. >> >> ECM Systems Ltd, Ellifoot Park, Burstwick, East Yorkshire HU12 9DZ >> >> Tel: 01964 672000 >> Fax: 01964 671102 >> >> Registered in England no. 01646471 >> >> The information contained within this email expresses the views of >> the sender and not necessarily those of the company. >> It is private and confidential and may be legally privileged. It is >> intended solely for those authorised to receive it. If you are >> not the intended recipient you are hereby notified that any >> disclosure, copying, distribution or action taken in reliance on its >> contents is strictly prohibited and may be unlawful. If you have >> received this email in error, please telephone us immediately >> on 01964 672000 or email a reply to highlight the error and then >> delete it from your system. This email may contain links to >> web-sites, the contents of which ECM Systems Ltd have no control over >> and can accept no responsibility for. Any >> attachments have been virus-checked before transmission; however, >> recipients are strongly advised to carry out their own >> virus checking as ECM Systems Ltd do not warrant that such >> attachments are virus-free. >> Please note that this email has been created in the knowledge that >> Internet email is not a secure communications medium. >> We advise that you understand and observe this lack of security when >> emailing us. >> >> >> >>
Re: [Flashcoders] determining which object is displayed at a givenpoint
Ok, got it. Thanks for the suggestion. I tried this but it doesn't work with the third-party flash movie I am looking at. They have an movie clip with _alpha set to 0 that covers the stage at a depth higher than all other visible elements. As a result _droptarget is always set to that object. What I need is something that takes into account visibility. Any other thoughts on this? -- Vishal On 2/6/07, Mike Mountain <[EMAIL PROTECTED]> wrote: What he's saying is that _droptarget will tell you exactly what is at the top under the users mouse - but in order to use it you have to use startDrag to fool it in to working. Maybe you could drag an invisible clip around or something. M > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf > Of Vishal Kapur > Sent: 06 February 2007 16:03 > To: Flashcoders mailing list > Subject: Re: [Flashcoders] determining which object is > displayed at a givenpoint > > I don't understand what you're suggesting. The user is not > dragging the movieclip. > > The idea is to write a function with a signature like: > function getObjectAtPoint(xmouse:Number, ymouse:Number):Object ECM Systems Ltd, Ellifoot Park, Burstwick, East Yorkshire HU12 9DZ Tel: 01964 672000 Fax: 01964 671102 Registered in England no. 01646471 The information contained within this email expresses the views of the sender and not necessarily those of the company. It is private and confidential and may be legally privileged. It is intended solely for those authorised to receive it. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or action taken in reliance on its contents is strictly prohibited and may be unlawful. If you have received this email in error, please telephone us immediately on 01964 672000 or email a reply to highlight the error and then delete it from your system. This email may contain links to web-sites, the contents of which ECM Systems Ltd have no control over and can accept no responsibility for. Any attachments have been virus-checked before transmission; however, recipients are strongly advised to carry out their own virus checking as ECM Systems Ltd do not warrant that such attachments are virus-free. Please note that this email has been created in the knowledge that Internet email is not a secure communications medium. We advise that you understand and observe this lack of security when emailing us. ECM Systems Ltd, Ellifoot Park, Burstwick, East Yorkshire HU12 9DZ Tel: 01964 672000 Fax: 01964 671102 Registered in England no. 01646471 The information contained within this email expresses the views of the sender and not necessarily those of the company. It is private and confidential and may be legally privileged. It is intended solely for those authorised to receive it. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or action taken in reliance on its contents is strictly prohibited and may be unlawful. If you have received this email in error, please telephone us immediately on 01964 672000 or email a reply to highlight the error and then delete it from your system. This email may contain links to web-sites, the contents of which ECM Systems Ltd have no control over and can accept no responsibility for. Any attachments have been virus-checked before transmission; however, recipients are strongly advised to carry out their own virus checking as ECM Systems Ltd do not warrant that such attachments are virus-free. Please note that this email has been created in the knowledge that Internet email is not a secure communications medium. We advise that you understand and observe this lack of security when emailing us. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] determining which object is displayed at a given point
I don't understand what you're suggesting. The user is not dragging the movieclip. The idea is to write a function with a signature like: function getObjectAtPoint(xmouse:Number, ymouse:Number):Object On 2/5/07, Erik Bianchi <[EMAIL PROTECTED]> wrote: Been a while but I believe the solution you need is startDrag with _droptarget. Note you must use startDrag otherwise _droptarget isn't set. -erik -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Vishal Kapur Sent: Monday, February 05, 2007 4:52 PM To: Flashcoders mailing list Subject: [Flashcoders] determining which object is displayed at a given point I am trying to solve the following problem: given the coordinates of a point in a flash movie, determine the targetPath of the object that is currently displayed at that point. In simple cases I have been able to do this by looping through a list of possible target objects and calling hitTest() on each one. However, issues arise when there are multiple objects for which hitTest() returns true. This can happen with hidden objects, or more often, objects sitting on layers that aren't currently visible. Sometimes I can compare the depth of 2 conflicting objects, and I assume whichever one has a larger depth is rendered in front of the other. This doesn't always work, however. I am debugging a case where there are two objects that return hitTest()=true, have identical depths, have identical bounding boxes, and both have _visible set to true. Only one of them is actually visible to the user at any given time, however. What other properties of a movieclip can be checked to determine if it's really the one that the user can currently see? Or is there a better way to do this, rather than using hitTest()? Let me know if I can clarify. Thanks, Vishal ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] ExternalInterface.call -> javascript error
Also have you checked that the allowScriptAccess parameter on the object tag is set appropriately (i.e., 'sameDomain' or 'always', depending on your case). -- Vishal On 1/23/07, Nick Zotta <[EMAIL PROTECTED]> wrote: Hello flashcoders, Does anyone know the cause of the javascript error: "Object doesn't support this property or method" when using ExternalInterface.call() to comunicate between Flash and Javascript? My javascript function is triggered, but before executing its actions, a javascript error popup appears with the message :"Object doesn't support this property or method". Even if the javascript function is blank (nothing to execute), the javascript error still appears. No javascript error in Firefox or Opera, but only in IE (6 and 7). I get this error both locally and on the webserver. All the tests were made with FlashPlayer 9. Thanks a lot, Nick ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Re: set and retrieve a netstream property
You could also set a new property on the NetStream instance. For ex., in your code replace: var vidDuration = Math.ceil(obj.duration); with: this.vidDuration = Math.ceil(obj.duration); You can then access the value via something like: myNSObj.vidDuration. -- Vishal On 1/30/07, jason vancleave <[EMAIL PROTECTED]> wrote: You just need to declare var vidDuration outside the metaDataInfo function for it to remain persistent in the instance of the Class containing it. class WhateverClass{ var vidDuration:Number; public function metaDataInfo(obj:Object) { times = obj.keyframes.times; vidDuration = Math.ceil(obj.duration); // pass duration value to another function durationTime(vidDuration); positions = obj.keyframes.filepositions; }; public function getDuration():Number{ return vidDuration; } } ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] determining which object is displayed at a given point
I am trying to solve the following problem: given the coordinates of a point in a flash movie, determine the targetPath of the object that is currently displayed at that point. In simple cases I have been able to do this by looping through a list of possible target objects and calling hitTest() on each one. However, issues arise when there are multiple objects for which hitTest() returns true. This can happen with hidden objects, or more often, objects sitting on layers that aren't currently visible. Sometimes I can compare the depth of 2 conflicting objects, and I assume whichever one has a larger depth is rendered in front of the other. This doesn't always work, however. I am debugging a case where there are two objects that return hitTest()=true, have identical depths, have identical bounding boxes, and both have _visible set to true. Only one of them is actually visible to the user at any given time, however. What other properties of a movieclip can be checked to determine if it's really the one that the user can currently see? Or is there a better way to do this, rather than using hitTest()? Let me know if I can clarify. Thanks, Vishal ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Q:Check if FLV netstream is playing without resorting to globals
Define an onStatus() callback for the netstream object. This handler will be invoked every time the status of the stream changes (buffering, playing, stopped, etc). See Flash help for details on the status codes. -- Vishal On 12/21/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Hi Can someone tell me if there is a way to check if a Netstream object is playing? I don't want to use globals Jim bBachalo [e] jbach at bitstream.ca [c] 416.668.0034 [w] www.bitstream.ca "...all improvisation is life in search of a style." - Bruce Mau,'LifeStyle' ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Detect Security Settings
Check out the "Flash Player Trust Configuration files" section of: http://www.adobe.com/devnet/flash/articles/fplayer8_security_04.html The configuration file could be updated by your install program. -- Vishal On 12/5/06, Holth, Daniel C. <[EMAIL PROTECTED]> wrote: Is there a way to detect a user's global security settings? As in, if they have 'Always Allow' or 'Always Ask' checked. Is there a way to change these settings without being connected to the internet? We are developing an application that runs off a CD and our users are getting errors that "x.swf is trying to communicate with y.html". We have found some ways to eliminate this, but there are still instances in the course (due to third party apps) that this still occurs. We are planning on adding instructions on how to change their settings, but we would prefer to only show these instructions if the user actually needs to change them. Thanks -Dan This e-mail and its attachments are intended only for the use of the addressee(s) and may contain privileged, confidential or proprietary information. If you are not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution, displaying, copying, or use of this information is strictly prohibited. If you have received this communication in error, please inform the sender immediately and delete and destroy any record of this message. Thank you. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Loading various FLVs using external Javascript controls
Check out ExternalInterface in Flash8 for invoking actionscript from JS. On 12/12/06, Christopher Whiteford <[EMAIL PROTECTED]> wrote: Has anyone come across an example where external javascript is controlling which flv a player loads and plays? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] [JOB] Visual Designer - San Francisco, CA
Note: please send all submissions for this position to J.J. at [EMAIL PROTECTED] Company: Truveo, Inc., an AOL company. Title: Visual Designer Location: San Francisco, California Salary: Commensurate with experience Company Description: Opportunities are currently available with the Truveo video search group for exceptional individuals with a passion for technology and product development. Truveo is currently building the next generation of search technology for the fast-growing market for online video. Truveo, which was founded in early 2004, was an early pioneer of many of the video indexing and search technologies that are now experiencing widespread adoption in the market. The Truveo team, which includes PhDs and seasoned technologists from institutions such as MIT, Stanford, CMU, Caltech, and Bell Labs, among others, is recognized as one of the industry's premier video search technology groups. In December 2005, Truveo was acquired by AOL, and the Truveo team is currently responsible for AOL's video search products and technology initiatives. Over the past 12 months, adoption of our technology offerings has seen significant growth. Today, through our network of syndication partners and across the AOL web properties, our video search platform reaches more users than any other video search network on the web. We are currently looking for exceptional and passionate individuals to join us in this unique opportunity to be at the forefront of the online video revolution. Position Description: Truveo is looking for a visual designer with a strong understanding of web technologies and an excellent sense of graphic design, layout, color, and style. You will be responsible for all stages of design on one or more of Truveo's consumer-facing products. You must have the ability to successfully collaborate with other designers, product managers and engineers to develop innovative, user-friendly, best-of-breed products. The ideal candidate for this position will have a solid understanding of user-center design principles, strong HTML abilities, excellent visual design skills, great technical know-how, and proven expertise in doing web design with great attention to detail. Required skills: * BA/BS or above in design related field; strong technical background a plus. * 2+ years experience designing outstanding web-based products for a consumer-oriented website. * Expert HTML knowledge. * Solid CSS and Javascript skills preferred. * Experience with Actionscript and Flash development a plus. * Familiarity with tools such as Adobe Photoshop. * Knowledge of HCI principles and web design best practices. * Please send URLs for an online portfolio in addition to resume and cover letter. Submissions without a portfolio included will not be considered. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Re: simulating mouse clicks
So I was able to get this to work for a large majority of cases by handling the following special cases: 1) Clicking a row in a List, code snippet: listObj.selectedIndex = theObjToClick.__dataIdx; listObj.dispatchEvent( {type:"change", target:listObj, name:"change"} ); 2) Clicking a Menu item, code snippet: menuObj.onRowRelease(theObjToClick.__dataIdx); The "__dataIdx" property indicates the index in the data provider array that 'theObjToClick' corresponds to. For all other types of objects, invoke onPress/onRelease on theObjToClick. I got the key insights here from the source code for an open source tool called 'AutoTestFlash' (http://tiago.webstartpoint.net/flash/). This is working for me so far without limitations, although I would not call it generic without further testing. -- Vishal On 10/20/06, Kevin Aebig <[EMAIL PROTECTED]> wrote: I'm assuming that you have something other than the pointer acting like it has control in the same way as the cursor. I've done this before for some specific circumstances and it required hit collision detection and checking for every possible scenario. - Check for onPress and onRelease and onClick (custom handler) - Check for dispatchEvent - Add either a listener to the mouse, or to UIEventDispatcher It's not a complete solution, but generally it should take care of a lot of circumstances. !k -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Vishal Kapur Sent: Thursday, October 19, 2006 12:16 PM To: Flashcoders mailing list Subject: [Flashcoders] Re: simulating mouse clicks I'll ask the question a different way: what are all the ways that a mouse click event can be handled in a flash movie? (other than defining an onPress/onRelease callback) -- Vishal On 10/17/06, Vishal Kapur <[EMAIL PROTECTED]> wrote: > I'm trying to solve the problem of generically simulating mouse clicks > in a running flash movie. So, I'd like to be able to write a > function that when invoked with the targetPath of the flash object to > be clicked, would be able to simulate a mouse click on that object as > if a user had actually clicked it. I should also mention that the > technique needs to work with arbitrary 3rd-party flash movies (so I > don't have control to change the code). > > The simplest thing to try is just to try to invoke the > onPress/onRelease callbacks on the target object. This works > sometimes. However, in some cases it doesn't quite simulate a real > mouse click. In particular, I seem to have trouble simulating clicks > on components (in a List component, for example, the selected row will > get highlighted but the handler that does further processing and > refreshes the UI doesn't seem to get called). > > Currently I am (sort of) working around this by getting the > coordinates of the center of the target object and using the Win32 > api's to move the mouse pointer and simulate the windows mouse down/up > events. As you can imagine this is not truly generic (doesn't handle > scrollbars, movielclips obscured by other objects, etc). > > Any thoughts on this? Anyone with previous experience with this or > ideas on a better way to generically simulate a click event in flash? > > Thanks, > Vishal > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Re: simulating mouse clicks
I'll ask the question a different way: what are all the ways that a mouse click event can be handled in a flash movie? (other than defining an onPress/onRelease callback) -- Vishal On 10/17/06, Vishal Kapur <[EMAIL PROTECTED]> wrote: I'm trying to solve the problem of generically simulating mouse clicks in a running flash movie. So, I'd like to be able to write a function that when invoked with the targetPath of the flash object to be clicked, would be able to simulate a mouse click on that object as if a user had actually clicked it. I should also mention that the technique needs to work with arbitrary 3rd-party flash movies (so I don't have control to change the code). The simplest thing to try is just to try to invoke the onPress/onRelease callbacks on the target object. This works sometimes. However, in some cases it doesn't quite simulate a real mouse click. In particular, I seem to have trouble simulating clicks on components (in a List component, for example, the selected row will get highlighted but the handler that does further processing and refreshes the UI doesn't seem to get called). Currently I am (sort of) working around this by getting the coordinates of the center of the target object and using the Win32 api's to move the mouse pointer and simulate the windows mouse down/up events. As you can imagine this is not truly generic (doesn't handle scrollbars, movielclips obscured by other objects, etc). Any thoughts on this? Anyone with previous experience with this or ideas on a better way to generically simulate a click event in flash? Thanks, Vishal ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] tracing function calls
Thanks, these are all very useful suggestions. Unfortunately the 3rd-party swf did seem to break when I tried loading it into my own flash movie so xray may not work for me. xflas2 is interesting in that having a general reflection API would be useful in other contexts. -- Vishal On 9/29/06, John Grden <[EMAIL PROTECTED]> wrote: and xray uses Hans class resolver ;) I've had this situation before as well, and what I did was create a base flash movie that loaded the 3rd parties SWF in. Xray was in the library and ready to inspect their swf. THe only problem with that is something might break since now, that swf isn't at _level0. For that, you might try setting _lockroot = true on the swf that's loaded and go from there. On 9/29/06, Hans Wichman <[EMAIL PROTECTED]> wrote: > > Hi, > there are different options, i think as2lib has some kind of AOP > mechanisms, > allowing you to add aspects to your code, eg a logging aspect. Not > entirely > sure about this but i think in this case it would come down to walking the > global tree, through all classes (assuming everything is as2), walking > through all functions in all classes and wrapping them the way Ray did > below. > > If you'd use xflas2 (osflash.org/xflas2) with this, the classfinder and > functionfinder would already have been provided, and you could set a > FunctionHandler on the FunctionFinder which does the wrapping for you. I > am > working on having xflas2 provide the functionality you mention out of the > box, but for now, you'd have to add it yourself. > The nice thing with xflas2 though is that you could use: > Logger.markEntry(arguments); > instead of >trace("{function: prop args: "+arguments+"}"); > > and it would trace for example ClassA.methodA called from > ClassB.methodBwith arguments (1,2,3,4) > > Since I havent gotten to doing myself yet, I can't tell what kind of > problems you'll encounter and if its possible at all:) > Another great tool to inspect your movie would be Xray ofcourse ( > osflash.org/xray). > > greetz > JC > > On 9/29/06, Ray Chuan <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > try this: > > > > function wrapper(obj:Object, prop:String):Void { > > var f:Function = Function(obj[prop]); > > obj[prop] = function() { > >trace("{function: prop args: "+arguments+"}"); > >return f.apply(obj, arguments); > > } > > } > > > > Let's say you want to "wrap" around the function Kite.fly: > > > > wrapper(Kite, "fly"); > > > > You could easily write something that wraps every method. > > > > On 9/28/06, Vishal Kapur <[EMAIL PROTECTED]> wrote: > > > I am trying to debug a third-party flash movie (so I don't have direct > > > access to the code, but I can ask them to add small snippets). What I > > > would like to be able to do is to trace the name of a function/method > > > and the arguments it is passed upon invocation of that function. I > > > need to be able to do that in a non-intrusive and generic way. > > > > > > Wondering what people's thoughts are on this. I can see a couple of > > > potential ways this could be done: one, override some internal > > > function that is used to make function calls; two, use a function like > > > __resolve() that would get called when any defined function is > > > invoked. Anybody know if such things exist? Or if there is some > > > other, simpler way which I'm missing? > > > > > > Thanks, > > > Vishal > > > ___ > > > Flashcoders@chattyfig.figleaf.com > > > To change your subscription options or search the archive: > > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > > > > > Brought to you by Fig Leaf Software > > > Premier Authorized Adobe Consulting and Training > > > http://www.figleaf.com > > > http://training.figleaf.com > > > > > > > > > -- > > Cheers, > > Ray Chuan > > ___ > > Flashcoders@chattyfig.figleaf.com > > To change your subscription options or search the archive: > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > > > Brought to you by Fig Leaf Software > > Premier Authorized Adobe Consulting and Training > > http://www.figleaf.com > > http://training.figleaf.com > > > ___ > Flashcoders@chattyfig.figleaf.com > To change your subsc
[Flashcoders] simulating mouse clicks
I'm trying to solve the problem of generically simulating mouse clicks in a running flash movie. So, I'd like to be able to write a function that when invoked with the targetPath of the flash object to be clicked, would be able to simulate a mouse click on that object as if a user had actually clicked it. I should also mention that the technique needs to work with arbitrary 3rd-party flash movies (so I don't have control to change the code). The simplest thing to try is just to try to invoke the onPress/onRelease callbacks on the target object. This works sometimes. However, in some cases it doesn't quite simulate a real mouse click. In particular, I seem to have trouble simulating clicks on components (in a List component, for example, the selected row will get highlighted but the handler that does further processing and refreshes the UI doesn't seem to get called). Currently I am (sort of) working around this by getting the coordinates of the center of the target object and using the Win32 api's to move the mouse pointer and simulate the windows mouse down/up events. As you can imagine this is not truly generic (doesn't handle scrollbars, movielclips obscured by other objects, etc). Any thoughts on this? Anyone with previous experience with this or ideas on a better way to generically simulate a click event in flash? Thanks, Vishal ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] tracing function calls
I am trying to debug a third-party flash movie (so I don't have direct access to the code, but I can ask them to add small snippets). What I would like to be able to do is to trace the name of a function/method and the arguments it is passed upon invocation of that function. I need to be able to do that in a non-intrusive and generic way. Wondering what people's thoughts are on this. I can see a couple of potential ways this could be done: one, override some internal function that is used to make function calls; two, use a function like __resolve() that would get called when any defined function is invoked. Anybody know if such things exist? Or if there is some other, simpler way which I'm missing? Thanks, Vishal ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] external links from flash on myspace.com
I am writing a flash application that has links to external websites ("external" meaning outside the domain where the SWF is being hosted). I'd like this application to be insertable on sites like myspace. Myspace recently added a restriction that prevents flash applications from opening any url's in the browser. They are doing this by: 1) strongly encouraging users to upgrade to Flash 9; 2) Using a new feature in flash 9 that lets the site hosting a flash application to prevent flash-browser communication-- they do this by inserting "allowNetworking=internal" in the tag. Does anyone know of a workaround to this? What are people's experiences with the allowNetworking property? Thanks, Vishal ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Netstream status
Check out the NetStream.onStatus callback. The flash 8 help documentation is pretty comprehensive in describing the status codes, etc. -- Vishal On 8/24/06, Bo Parker <[EMAIL PROTECTED]> wrote: I have an swf that is utilizing video. I also have a set of tweens that are happening in the background of the swf. What I want to accomplish is that when I press the pause button, the tweens pause as well as the flv video. I am using fuse to control the tweens and have no problem pausing them, the issue is checking the status of the flv. My code for the flv pause is quite simple: - var nc:NetConnection = new NetConnection(); nc.connect (null); var ns:NetStream = new NetStream(nc); mainVideo.attachVideo(ns); ns.play("home.flv"); //Video Controls controls2.rewind.onRelease = function() { ns.seek(0); Fuse.startRecent(); }; controls2.play.onRelease = function() { ns.pause(); //_root.pauseAllTweens() Fuse.pauseAll(); }; -- I need to check the status of "ns" to see if it is playing or paused and created an if statement that if the state is "play" then for Fuse.pauseAll(); else if the state is "pause" the Fuse.playAll(); I'm having trouble finding a starting place. Can someone point me in the right direction? Thanks, -- Bo Parker, AIGA Bo Co. Design 650 W Vickery Suite 130 Fort Worth, Texas 76104 817.332.4700 phone 817.332.4710 facsimile ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] XML RPC and cross-domain / Flash8
Yes, in Flash 8 you need to explicitly grant permissions for cross-domain data loading. By default, flash looks for the 'crossdomain.xml' file in the root directory of the server from which you are loading data. If you want to grant permissions to a specific sub-directory, put crossdomain.xml in that directory on the server and use System.security.loadPolicyFile() to tell flash where to find it. -- Vishal On 8/15/06, keitai guy <[EMAIL PROTECTED]> wrote: hi list - did Flash8 change the policy for movies accessing data across domains? i have a swf that i want to read XML from a friends website. can i just ask him to place a cross-domain.xml file there, or do i have to write a proxy server on my domain to go and suck the data from his site? tx! /dc ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] crossdomain
Yes, this would need to be configured for every machine where you intend to run the local swf. If you have some sort of install script, you could create a FlashPlayerTrust configuration file to set the trusted paths (the link in my previous email has details on where that needs to go, etc). -- Vishal On 8/9/06, jcanistrum <[EMAIL PROTECTED]> wrote: I´m reading but I fell I´m going to have problems since I´d like to have and app running as an .exe in the desktop loading these banners inside and the way it was shown there the settings would have to be set for each manchine the runs, is that true ? 2006/8/9, Vishal Kapur <[EMAIL PROTECTED]>: > > crossdomain.xml is not used when loading one swf into another. Have > you added the path to your local swf to the Global Settings manager as > a trusted local swf? See: > http://www.adobe.com/devnet/flash/articles/fplayer8_security_04.html > for details. > > -- Vishal > > On 8/9/06, jcanistrum <[EMAIL PROTECTED]> wrote: > > hi All, > > > > I´m new to security domain questions > > > > I´doing an small test to load content into one loader component, the > test is > > runnig in a local machine but try to load an swf from my web site > > http://www.mvirtual.com.br/flashker/banners/banner0.swf' > > > > if you try in the browser it loads fine > > > > in web site folder where it resides I have > > > > * > > - > > > > * > > > > the action actioscript for the test is > > > > *System.security.allowDomain( "*" ); > > > > myBt.onRelease = function () > > { > > bannerLoader.contentPath = " > > http://www.mvirtual.com.br/flashker/banners/banner0.swf";; > > };* > > > > and I get the error > > > > Security Sandbox Violation *** > > SecurityDomain 'http://www.mvirtual.com.br/flashker/banners/banner0.swf' > > > > tried to access incompatible context 'file:///XXX/bannerTest.swf'* > > > > What am I doing wrong ? > > > > I´m getting confused about the security settings in the local file which > > tries to load the web content versus those ones in web to be loaded. > > > > thanks in advance for any help, ideas, directions > > > > -- > > João Carlos > > ___ > > Flashcoders@chattyfig.figleaf.com > > To change your subscription options or search the archive: > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > > > Brought to you by Fig Leaf Software > > Premier Authorized Adobe Consulting and Training > > http://www.figleaf.com > > http://training.figleaf.com > > > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com > -- João Carlos ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] crossdomain
crossdomain.xml is not used when loading one swf into another. Have you added the path to your local swf to the Global Settings manager as a trusted local swf? See: http://www.adobe.com/devnet/flash/articles/fplayer8_security_04.html for details. -- Vishal On 8/9/06, jcanistrum <[EMAIL PROTECTED]> wrote: hi All, I´m new to security domain questions I´doing an small test to load content into one loader component, the test is runnig in a local machine but try to load an swf from my web site http://www.mvirtual.com.br/flashker/banners/banner0.swf' if you try in the browser it loads fine in web site folder where it resides I have * - * the action actioscript for the test is *System.security.allowDomain( "*" ); myBt.onRelease = function () { bannerLoader.contentPath = " http://www.mvirtual.com.br/flashker/banners/banner0.swf";; };* and I get the error Security Sandbox Violation *** SecurityDomain 'http://www.mvirtual.com.br/flashker/banners/banner0.swf' tried to access incompatible context 'file:///XXX/bannerTest.swf'* What am I doing wrong ? I´m getting confused about the security settings in the local file which tries to load the web content versus those ones in web to be loaded. thanks in advance for any help, ideas, directions -- João Carlos ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Security Violation with FLV loading using NetConnection
Cedric, I ran into this issue several months back and after discussions with Macromedia development it turns out this is a bug in the flash player. The first thing to understand is that when one SWF is loaded into another, all the 'relative URL's" in the remote swf (in your case B.swf) will be evaluated relative to the base URL of the loading swf (in your case A.swf). In the case where the loading swf is a local swf, this behavior doesn't work so well. So the bug as I understand it is that the "null" being passed into NetConnection.connect is being treated as a relative URL by A.swf, and is internally being appended to the "base URL" of A.swf (which is a local filesystem path). When the connection is attempted, A.swf thinks B.swf is trying to open a connection to some local path, which is restricted by flash's security, hence the security violation message. I was told that the bug is fixed in Flash Player 9, so you may want to try that and see if that fixes your issue. Also, if you can run A.swf remotely (i.e., serve it from the mydomain.com server) instead of locally, that would get around this issue as well. -- Vishal On 8/2/06, Cedric Muller <[EMAIL PROTECTED]> wrote: A.swf: (local, on HD) loads in B.swf (remote, on www.mydomain.com/dir/B.swf) using a MovieClipLoader B.swf starts a NetConnection to stream a FLV (from same domain, www.mydomain.com/dir/files/movies/any.flv) This works nicely if I compile B.swf and test (I see the FLV being played) now, if I upload B.swf on 'www.mydomain.com/dir/B.swf' and launch A.swf from the local drive, this just fails with the following DUMB message: *** Security Violation *** Connection interrupted with null - forbidden operation from www.mydomain.com/dir/B.swf -- distant SWF files don't have access to local files. I am in a localTrusted sandbox, and using MovieClipLoader + allowDomain always went fine for me. here is all the code in B.swf: var netConn = new NetConnection(); netConn.connect(null); var netStream = new NetStream(netConn); var link = "http://www.mydomain.com/dir/files/movies/any.flv";; netStream.onStatus = function(info) { } this.video_player.attachVideo(netStream); this.video_player.smoothing = true; netStream.setBufferTime(5); netStream.play(link); (nb: this is the basic code for loading FLVs by creating a local stream) How can I deal with 'null' ? null is required for streaming FLV files without connecting to a FMS (ex FCS) server (see live docs) netConn.connect(null) but then it fails the whole thing of course, I did System.security.allowDomain("*"); What SHOULD I consider now ? I am suspecting the connect method to pass the argument whatever it is ... by passing 'null' Flash still tries to establish a connection, hence my problem. I was thinking someone did hack the NetConnection class (but I couldn't find any hacked NetConnection), what else ? thanks in advance, Cedric ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] ExternalInterface, embed tag and IE
I have tried giving the embed tag an id attribute as well, with no change. I guess no one has tried this before? It seems possible that this is a bug/enhancement for the Flash team. In terms of why I can't use an object tag, I should have clarified that I do not have control over the HTML source. Not sure why they third-party that did develop the HTML chose to use , but the guess is that it's a little bit less code to get cross-browser compatibility (instead of using with an sub-tag). Thanks, Vishal On 8/1/06, Geoff Stearns <[EMAIL PROTECTED]> wrote: the short answer is you probably just need to give the embed tag an Id attribute. the long answer is: why can't you use an object tag? that makes absolutely no sense at all. even more: you should be using a Javascript solution like SWFObject anyway, since that will skip the 'click to activate' stuff and handle your plugin detection and all that for you. On Jul 31, 2006, at 9:57 PM, Vishal Kapur wrote: > Hello, > > I am trying to use ExternalInterface on a flash movie loaded via an > tag in Internet Explorer. (For specific reasons I do not want > to use the tag and I can't use firefox). I have set > allowScriptAccess="always" and I have specified the 'name' attribute. > However, when I try to call an AS function from javascript on this > object I get an error like "Object does not support this property or > method." > > My embed tag looks something like: > >type="application/x-shockwave-flash" > src="testMovie.swf" > allowScriptAccess="always" > > > The AS function I want to call is exposed via > ExternalInterface.addCallback(). Also I do not have the issue if I > use an tag to load the swf. > > Has anyone faced this issue before? Any thoughts/pointers would be > appreciated. > > Thanks, > Vishal > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] ExternalInterface, embed tag and IE
Hello, I am trying to use ExternalInterface on a flash movie loaded via an tag in Internet Explorer. (For specific reasons I do not want to use the tag and I can't use firefox). I have set allowScriptAccess="always" and I have specified the 'name' attribute. However, when I try to call an AS function from javascript on this object I get an error like "Object does not support this property or method." My embed tag looks something like: The AS function I want to call is exposed via ExternalInterface.addCallback(). Also I do not have the issue if I use an tag to load the swf. Has anyone faced this issue before? Any thoughts/pointers would be appreciated. Thanks, Vishal ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com