RE: [Flashcoders] I have a drag and drop question.
Yes, I did that from the start. -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of allandt bik-elliott (thefieldcomic.com) Sent: donderdag 12 augustus 2010 19:11 To: Flash Coders List Subject: Re: [Flashcoders] I have a drag and drop question. make sure you turn mousechildren to false on all your draggable items to make sure that you're testing against the same object each time a On 12 August 2010 15:11, Cor wrote: > I have given the target object the same name as (possible more then 1) > dragobject(s). > So now I am trying to check them like this: > > If( dragObj.dropTarget.name == dragObj.name){//} > > -Original Message- > From: flashcoders-boun...@chattyfig.figleaf.com > [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Nathan > Mynarcik > Sent: donderdag 12 augustus 2010 16:05 > To: Flash Coders List > Subject: Re: [Flashcoders] I have a drag and drop question. > > So, are you trying to get the name of the object that was dropped? or the > name of what the object that was dropped landed on? > > Nathan Mynarcik > nat...@mynarcik.com > 254.749.2525 > www.mynarcik.com > > > On Thu, Aug 12, 2010 at 8:36 AM, Cor wrote: > > > I have a drag and drop question. > > > > In my Drag_Drop_Question class, I position several images (loaded with > > another class) dynamically on stage. > > These are my targets. > > And I do the same for a bunch of images, which are the objects to drag to > > their target. > > Now every time I drop my dragged image I should get the dropTarget. > > Trace(e.target.dropTarget); // null > > Trace(e.target.dropTarget.parent); // Error #1009 > > > > But they are null or Error #1009. > > > > I did some more tracing of the object and his name: > >trace(e.target.parent.parent.parent.parent.parent.parent, > > e.target.parent.parent.parent.parent.parent.parent.name); > >//[object Stage] null > >trace(e.target.parent.parent.parent.parent.parent, > > e.target.parent.parent.parent.parent.parent.name); > >//[object Main] root1 > >trace(e.target.parent.parent.parent.parent, > > e.target.parent.parent.parent.parent.name); > >//[object MovieClip] instance15 > >trace(e.target.parent.parent.parent, > > e.target.parent.parent.parent.name); > >//[object Sleepvraag] instance121 > >trace(e.target.parent.parent, e.target.parent.parent.name); > >//[object Sprite] instance133 > >trace(e.target.parent, e.target.parent.name); > >//[object Sprite] instance191 > >trace(e.target, e.target.name); > >//[object Image] 7 > > > > Any help is appreciated! > > > > Regards > > Cor > > > > > > > > > > > > > > > > > > Flash_Tiger Mailing ListYahoo! Groups Links > > > > <*> To visit your group on the web, go to: > >http://groups.yahoo.com/group/Flash_tiger/ > > > > <*> Your email settings: > >Individual Email | Traditional > > > > <*> To change settings online go to: > >http://groups.yahoo.com/group/Flash_tiger/join > >(Yahoo! ID required) > > > > <*> To change settings via email: > >flash_tiger-dig...@yahoogroups.com > >flash_tiger-fullfeatu...@yahoogroups.com > > > > <*> To unsubscribe from this group, send an email to: > >flash_tiger-unsubscr...@yahoogroups.com > > > > <*> Your use of Yahoo! Groups is subject to: > >http://docs.yahoo.com/info/terms/ > > > > Geen virus gevonden in het binnenkomende-bericht. > > Gecontroleerd door AVG - www.avg.com > > Versie: 9.0.851 / Virusdatabase: 271.1.1/3061 - datum van uitgifte: > > 08/10/10 > > 20:34:00 > > > > ___ > > Flashcoders mailing list > > Flashcoders@chattyfig.figleaf.com > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > Geen virus gevonden in het binnenkomende-bericht. > Gecontroleerd door AVG - www.avg.com > Versie: 9.0.851 / Virusdatabase: 271.1.1/3063 - datum van uitgifte: > 08/10/10 > 20:34:00 > > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Geen virus gevonden in het binnenkomende-bericht. Gecontroleerd door AVG - www.avg.com Versie: 9.0.851 / Virusdatabase: 271.1.1/3063 - datum van uitgifte: 08/10/10 20:34:00 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] I have a drag and drop question.
make sure you turn mousechildren to false on all your draggable items to make sure that you're testing against the same object each time a On 12 August 2010 15:11, Cor wrote: > I have given the target object the same name as (possible more then 1) > dragobject(s). > So now I am trying to check them like this: > > If( dragObj.dropTarget.name == dragObj.name){//} > > -Original Message- > From: flashcoders-boun...@chattyfig.figleaf.com > [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Nathan > Mynarcik > Sent: donderdag 12 augustus 2010 16:05 > To: Flash Coders List > Subject: Re: [Flashcoders] I have a drag and drop question. > > So, are you trying to get the name of the object that was dropped? or the > name of what the object that was dropped landed on? > > Nathan Mynarcik > nat...@mynarcik.com > 254.749.2525 > www.mynarcik.com > > > On Thu, Aug 12, 2010 at 8:36 AM, Cor wrote: > > > I have a drag and drop question. > > > > In my Drag_Drop_Question class, I position several images (loaded with > > another class) dynamically on stage. > > These are my targets. > > And I do the same for a bunch of images, which are the objects to drag to > > their target. > > Now every time I drop my dragged image I should get the dropTarget. > > Trace(e.target.dropTarget); // null > > Trace(e.target.dropTarget.parent); // Error #1009 > > > > But they are null or Error #1009. > > > > I did some more tracing of the object and his name: > >trace(e.target.parent.parent.parent.parent.parent.parent, > > e.target.parent.parent.parent.parent.parent.parent.name); > >//[object Stage] null > >trace(e.target.parent.parent.parent.parent.parent, > > e.target.parent.parent.parent.parent.parent.name); > >//[object Main] root1 > >trace(e.target.parent.parent.parent.parent, > > e.target.parent.parent.parent.parent.name); > >//[object MovieClip] instance15 > >trace(e.target.parent.parent.parent, > > e.target.parent.parent.parent.name); > >//[object Sleepvraag] instance121 > >trace(e.target.parent.parent, e.target.parent.parent.name); > >//[object Sprite] instance133 > >trace(e.target.parent, e.target.parent.name); > >//[object Sprite] instance191 > >trace(e.target, e.target.name); > >//[object Image] 7 > > > > Any help is appreciated! > > > > Regards > > Cor > > > > > > > > > > > > > > > > > > Flash_Tiger Mailing ListYahoo! Groups Links > > > > <*> To visit your group on the web, go to: > >http://groups.yahoo.com/group/Flash_tiger/ > > > > <*> Your email settings: > >Individual Email | Traditional > > > > <*> To change settings online go to: > >http://groups.yahoo.com/group/Flash_tiger/join > >(Yahoo! ID required) > > > > <*> To change settings via email: > >flash_tiger-dig...@yahoogroups.com > >flash_tiger-fullfeatu...@yahoogroups.com > > > > <*> To unsubscribe from this group, send an email to: > >flash_tiger-unsubscr...@yahoogroups.com > > > > <*> Your use of Yahoo! Groups is subject to: > >http://docs.yahoo.com/info/terms/ > > > > Geen virus gevonden in het binnenkomende-bericht. > > Gecontroleerd door AVG - www.avg.com > > Versie: 9.0.851 / Virusdatabase: 271.1.1/3061 - datum van uitgifte: > > 08/10/10 > > 20:34:00 > > > > ___ > > Flashcoders mailing list > > Flashcoders@chattyfig.figleaf.com > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > Geen virus gevonden in het binnenkomende-bericht. > Gecontroleerd door AVG - www.avg.com > Versie: 9.0.851 / Virusdatabase: 271.1.1/3063 - datum van uitgifte: > 08/10/10 > 20:34:00 > > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Getting the url where my Flash movie was embeded
Maybe you could try a different approach. Although it's not 100% authoritative, the http referrer of the http request made to get your swf could help here. This is data sent by the client (the browser in this case), and might not even be sent to the server, but in almost every case, it is. So, you can check your server's log and filter out requests for your swf. In Apache, at least, the referrer will be logged by default. A little twist to the former could be serving your swf from a server side script. If you are using php, this is quite easy. Instead of giving your users a link to your swf, tell them to link to yourserver.com/your_widget.php. This php file will read and store the referrer and then just return the swf (a simple redirect to your swf will do it). Cheers Juan Pablo Califano 2010/8/12 Pedder > Shit, you're right! > > I realized that i was testing with the debug flash player. I forgot that. > And now all i got is an error number and no error message again. > > Do you have any idea to get the url where my widget was embeded? > > > Am 12.08.2010 um 17:57 schrieb Henrik Andersson: > > > Pedder wrote: >> >>> var search:RegExp = /.+cannot\saccess\s(.+)\./i ; >>> >> >> That will not work for localized error messages in the localized versions >> of the player. >> >> I also have my doubts about it working in non debug players, I think the >> error message is the empty string in those. But I am not sure about that. >> >> There is also the point of the message simply changing in the English >> version at some point. >> >> You really shouldn't try to parse stuff that is meant for display. >> ___ >> Flashcoders mailing list >> Flashcoders@chattyfig.figleaf.com >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >> > > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Getting the url where my Flash movie was embeded
Shit, you're right! I realized that i was testing with the debug flash player. I forgot that. And now all i got is an error number and no error message again. Do you have any idea to get the url where my widget was embeded? Am 12.08.2010 um 17:57 schrieb Henrik Andersson: Pedder wrote: var search:RegExp = /.+cannot\saccess\s(.+)\./i ; That will not work for localized error messages in the localized versions of the player. I also have my doubts about it working in non debug players, I think the error message is the empty string in those. But I am not sure about that. There is also the point of the message simply changing in the English version at some point. You really shouldn't try to parse stuff that is meant for display. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Getting the url where my Flash movie was embeded
Pedder wrote: var search:RegExp = /.+cannot\saccess\s(.+)\./i ; That will not work for localized error messages in the localized versions of the player. I also have my doubts about it working in non debug players, I think the error message is the empty string in those. But I am not sure about that. There is also the point of the message simply changing in the English version at some point. You really shouldn't try to parse stuff that is meant for display. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] I have a drag and drop question.
So, are you trying to get the name of the object that was dropped? or the name of what the object that was dropped landed on? Nathan Mynarcik nat...@mynarcik.com 254.749.2525 www.mynarcik.com On Thu, Aug 12, 2010 at 8:36 AM, Cor wrote: > I have a drag and drop question. > > In my Drag_Drop_Question class, I position several images (loaded with > another class) dynamically on stage. > These are my targets. > And I do the same for a bunch of images, which are the objects to drag to > their target. > Now every time I drop my dragged image I should get the dropTarget. > Trace(e.target.dropTarget); // null > Trace(e.target.dropTarget.parent); // Error #1009 > > But they are null or Error #1009. > > I did some more tracing of the object and his name: >trace(e.target.parent.parent.parent.parent.parent.parent, > e.target.parent.parent.parent.parent.parent.parent.name); >//[object Stage] null >trace(e.target.parent.parent.parent.parent.parent, > e.target.parent.parent.parent.parent.parent.name); >//[object Main] root1 >trace(e.target.parent.parent.parent.parent, > e.target.parent.parent.parent.parent.name); >//[object MovieClip] instance15 >trace(e.target.parent.parent.parent, > e.target.parent.parent.parent.name); >//[object Sleepvraag] instance121 >trace(e.target.parent.parent, e.target.parent.parent.name); >//[object Sprite] instance133 >trace(e.target.parent, e.target.parent.name); >//[object Sprite] instance191 >trace(e.target, e.target.name); >//[object Image] 7 > > Any help is appreciated! > > Regards > Cor > > > > > > > > > Flash_Tiger Mailing ListYahoo! Groups Links > > <*> To visit your group on the web, go to: >http://groups.yahoo.com/group/Flash_tiger/ > > <*> Your email settings: >Individual Email | Traditional > > <*> To change settings online go to: >http://groups.yahoo.com/group/Flash_tiger/join >(Yahoo! ID required) > > <*> To change settings via email: >flash_tiger-dig...@yahoogroups.com >flash_tiger-fullfeatu...@yahoogroups.com > > <*> To unsubscribe from this group, send an email to: >flash_tiger-unsubscr...@yahoogroups.com > > <*> Your use of Yahoo! Groups is subject to: >http://docs.yahoo.com/info/terms/ > > Geen virus gevonden in het binnenkomende-bericht. > Gecontroleerd door AVG - www.avg.com > Versie: 9.0.851 / Virusdatabase: 271.1.1/3061 - datum van uitgifte: > 08/10/10 > 20:34:00 > > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Getting the url where my Flash movie was embeded
The following code requires AS3 script language // Create a regex that searches for a string like "... cannot access (...)". // The part in brackets will be captured and available within the returned Array if the regex matches. // If the regex didn't match null will be returned. var search:RegExp = /.+cannot\saccess\s(.+)\./i ; var matches:Array = String(error.message).match (search) ; // Now check if the regex has matched and if it did then check // if there 2 matches in the Array. match at index 0 is the entire matched String // and match at index 1 is the part captured by the brackets. if (matches && matches.length > 1) { location = matches[1] ; } -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Pedder Sent: donderdag 12 augustus 2010 15:44 To: Flash Coders List Subject: Re: [Flashcoders] Getting the url where my Flash movie was embeded Hello Cor, this is the code is use and it is working fine for me. var location:String = "unable to retrieve window.location" ; try { // try to call javascript to get window.location location = ExternalInterface.call ("window.location.href.toString") ; } catch (error:SecurityError) { /* if Flash vars set like (allowScriptAccess = 'never') or (allowNetworking = 'internal') catch the SecurityError and extract the window.location url out of the error.message */ var search:RegExp = /.+cannot\saccess\s(.+)\./i ; var matches:Array = String(error.message).match (search) ; if (matches && matches.length > 1) { location = matches[1] ; } } I think it is self explaining but don't hesitate to ask if you got question. Cheers... Am 12.08.2010 um 14:34 schrieb Cor: Can yo ushow how you do this: So, i now make the call with a try block and parse the error message with a regex and get my wanted url. Regards Cor -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of allandt bik-elliott (thefieldcomic.com) Sent: donderdag 12 augustus 2010 14:09 To: Flash Coders List Subject: Re: [Flashcoders] Getting the url where my Flash movie was embeded good job mate :) On 12 August 2010 12:54, Pedder wrote: Ok, thank you for your answers. I tried this on a test system and it worked fine. Then i tried this on facebook and got a "Security sandbox violation: external interface caller". Well, the error message says something like "cannot access http://www.facebook.com..."; So, i now make the call with a try block and parse the error message with a regex and get my wanted url. Yeah! Thank you! Chris Am 12.08.2010 um 12:30 schrieb allandt bik-elliott (thefieldcomic.com): or you could do it all from within flash using var:urlPath:String = ExternalInterface.call("window.location.href.toString"); On 12 August 2010 11:29, allandt bik-elliott (thefieldcomic.com) < alla...@gmail.com> wrote: i think your best bet is to write a javascript function that returns window.location.href and then use the ExternalInterface class to call that function within the flash best a On 12 August 2010 10:51, Pedder wrote: Hey all together, i was wondering if i can get the url where my flash movies are embeded. I have a little widget on my page to which i provide an embed code to my users so that they can embed my widget anywhere on the internet. But the problem is that i don't know where the widget is embeded. Some guy told me that he embed it on his blog but i can't find it there and it would be nice if i could have some kind of statistic where and how often my widget is played. But i wasn't able to get the external url (where the code for the widget was embeded). I tried _url and root.loaderInfo.url but that only gives me my own url where the swf file is stored. Any idea? Is there a possiblity to get the url given by some javascript and document.URL? Thank you for your answers. I hope that there is an answer because i'm struggling with this for a couple of weeks now. Cheers. Benjamin ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders G
RE: [Flashcoders] Getting the url where my Flash movie was embeded
The try and catch is... Whoahahahaha. But this dazzles me: var search:RegExp = /.+cannot\saccess\s(.+)\./i ; var matches:Array = String(error.message).match (search) ; if (matches && matches.length > 1) { location = matches[1] ; } -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Pedder Sent: donderdag 12 augustus 2010 15:44 To: Flash Coders List Subject: Re: [Flashcoders] Getting the url where my Flash movie was embeded Hello Cor, this is the code is use and it is working fine for me. var location:String = "unable to retrieve window.location" ; try { // try to call javascript to get window.location location = ExternalInterface.call ("window.location.href.toString") ; } catch (error:SecurityError) { /* if Flash vars set like (allowScriptAccess = 'never') or (allowNetworking = 'internal') catch the SecurityError and extract the window.location url out of the error.message */ var search:RegExp = /.+cannot\saccess\s(.+)\./i ; var matches:Array = String(error.message).match (search) ; if (matches && matches.length > 1) { location = matches[1] ; } } I think it is self explaining but don't hesitate to ask if you got question. Cheers... Am 12.08.2010 um 14:34 schrieb Cor: > Can yo ushow how you do this: > > So, i now make the call with a try block and parse the error message > with a > regex and get my wanted url. > > Regards > Cor > > -Original Message- > From: flashcoders-boun...@chattyfig.figleaf.com > [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of > allandt > bik-elliott (thefieldcomic.com) > Sent: donderdag 12 augustus 2010 14:09 > To: Flash Coders List > Subject: Re: [Flashcoders] Getting the url where my Flash movie was > embeded > > good job mate :) > > On 12 August 2010 12:54, Pedder wrote: > >> Ok, thank you for your answers. >> >> I tried this on a test system and it worked fine. Then i tried this >> on >> facebook and got a "Security sandbox violation: external interface > caller". >> Well, the error message says something like "cannot access >> http://www.facebook.com..."; So, i now make the call with a try >> block and >> parse the error message with a regex and get my wanted url. Yeah! >> >> Thank you! >> Chris >> >> >> Am 12.08.2010 um 12:30 schrieb allandt bik-elliott >> (thefieldcomic.com): >> >> >> or you could do it all from within flash using >>> var:urlPath:String = >>> ExternalInterface.call("window.location.href.toString"); >>> >>> >>> >>> On 12 August 2010 11:29, allandt bik-elliott (thefieldcomic.com) < >>> alla...@gmail.com> wrote: >>> >>> i think your best bet is to write a javascript function that returns window.location.href and then use the ExternalInterface class to call that function within > the flash best a On 12 August 2010 10:51, Pedder wrote: Hey all together, > > i was wondering if i can get the url where my flash movies are > embeded. > I > have a little widget on my page to which i provide an embed code > to my > users > so that they can embed my widget anywhere on the internet. But the > problem > is that i don't know where the widget is embeded. > Some guy told me that he embed it on his blog but i can't find > it there > and it would be nice if i could have some kind of statistic > where and > how > often my widget is played. But i wasn't able to get the external > url > (where > the code for the widget was embeded). > > I tried _url and root.loaderInfo.url but that only gives me my > own url > where the swf file is stored. > > Any idea? Is there a possiblity to get the url given by some > javascript > and document.URL? > > Thank you for your answers. I hope that there is an answer > because i'm > struggling with this for a couple of weeks now. > > Cheers. > Benjamin > > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > ___ >>> Flashcoders mailing list >>> Flashcoders@chattyfig.figleaf.com >>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >>> >> >> >> ___ >> Flashcoders mailing list >> Flashcoders@chattyfig.figleaf.com >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >> > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/l
RE: [Flashcoders] I have a drag and drop question.
I have given the target object the same name as (possible more then 1) dragobject(s). So now I am trying to check them like this: If( dragObj.dropTarget.name == dragObj.name){//} -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Nathan Mynarcik Sent: donderdag 12 augustus 2010 16:05 To: Flash Coders List Subject: Re: [Flashcoders] I have a drag and drop question. So, are you trying to get the name of the object that was dropped? or the name of what the object that was dropped landed on? Nathan Mynarcik nat...@mynarcik.com 254.749.2525 www.mynarcik.com On Thu, Aug 12, 2010 at 8:36 AM, Cor wrote: > I have a drag and drop question. > > In my Drag_Drop_Question class, I position several images (loaded with > another class) dynamically on stage. > These are my targets. > And I do the same for a bunch of images, which are the objects to drag to > their target. > Now every time I drop my dragged image I should get the dropTarget. > Trace(e.target.dropTarget); // null > Trace(e.target.dropTarget.parent); // Error #1009 > > But they are null or Error #1009. > > I did some more tracing of the object and his name: >trace(e.target.parent.parent.parent.parent.parent.parent, > e.target.parent.parent.parent.parent.parent.parent.name); >//[object Stage] null >trace(e.target.parent.parent.parent.parent.parent, > e.target.parent.parent.parent.parent.parent.name); >//[object Main] root1 >trace(e.target.parent.parent.parent.parent, > e.target.parent.parent.parent.parent.name); >//[object MovieClip] instance15 >trace(e.target.parent.parent.parent, > e.target.parent.parent.parent.name); >//[object Sleepvraag] instance121 >trace(e.target.parent.parent, e.target.parent.parent.name); >//[object Sprite] instance133 >trace(e.target.parent, e.target.parent.name); >//[object Sprite] instance191 >trace(e.target, e.target.name); >//[object Image] 7 > > Any help is appreciated! > > Regards > Cor > > > > > > > > > Flash_Tiger Mailing ListYahoo! Groups Links > > <*> To visit your group on the web, go to: >http://groups.yahoo.com/group/Flash_tiger/ > > <*> Your email settings: >Individual Email | Traditional > > <*> To change settings online go to: >http://groups.yahoo.com/group/Flash_tiger/join >(Yahoo! ID required) > > <*> To change settings via email: >flash_tiger-dig...@yahoogroups.com >flash_tiger-fullfeatu...@yahoogroups.com > > <*> To unsubscribe from this group, send an email to: >flash_tiger-unsubscr...@yahoogroups.com > > <*> Your use of Yahoo! Groups is subject to: >http://docs.yahoo.com/info/terms/ > > Geen virus gevonden in het binnenkomende-bericht. > Gecontroleerd door AVG - www.avg.com > Versie: 9.0.851 / Virusdatabase: 271.1.1/3061 - datum van uitgifte: > 08/10/10 > 20:34:00 > > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Geen virus gevonden in het binnenkomende-bericht. Gecontroleerd door AVG - www.avg.com Versie: 9.0.851 / Virusdatabase: 271.1.1/3063 - datum van uitgifte: 08/10/10 20:34:00 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Getting the url where my Flash movie was embeded
Hello Cor, this is the code is use and it is working fine for me. var location:String = "unable to retrieve window.location" ; try { // try to call javascript to get window.location location = ExternalInterface.call ("window.location.href.toString") ; } catch (error:SecurityError) { /* if Flash vars set like (allowScriptAccess = 'never') or (allowNetworking = 'internal') catch the SecurityError and extract the window.location url out of the error.message */ var search:RegExp = /.+cannot\saccess\s(.+)\./i ; var matches:Array = String(error.message).match (search) ; if (matches && matches.length > 1) { location = matches[1] ; } } I think it is self explaining but don't hesitate to ask if you got question. Cheers... Am 12.08.2010 um 14:34 schrieb Cor: Can yo ushow how you do this: So, i now make the call with a try block and parse the error message with a regex and get my wanted url. Regards Cor -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of allandt bik-elliott (thefieldcomic.com) Sent: donderdag 12 augustus 2010 14:09 To: Flash Coders List Subject: Re: [Flashcoders] Getting the url where my Flash movie was embeded good job mate :) On 12 August 2010 12:54, Pedder wrote: Ok, thank you for your answers. I tried this on a test system and it worked fine. Then i tried this on facebook and got a "Security sandbox violation: external interface caller". Well, the error message says something like "cannot access http://www.facebook.com..."; So, i now make the call with a try block and parse the error message with a regex and get my wanted url. Yeah! Thank you! Chris Am 12.08.2010 um 12:30 schrieb allandt bik-elliott (thefieldcomic.com): or you could do it all from within flash using var:urlPath:String = ExternalInterface.call("window.location.href.toString"); On 12 August 2010 11:29, allandt bik-elliott (thefieldcomic.com) < alla...@gmail.com> wrote: i think your best bet is to write a javascript function that returns window.location.href and then use the ExternalInterface class to call that function within the flash best a On 12 August 2010 10:51, Pedder wrote: Hey all together, i was wondering if i can get the url where my flash movies are embeded. I have a little widget on my page to which i provide an embed code to my users so that they can embed my widget anywhere on the internet. But the problem is that i don't know where the widget is embeded. Some guy told me that he embed it on his blog but i can't find it there and it would be nice if i could have some kind of statistic where and how often my widget is played. But i wasn't able to get the external url (where the code for the widget was embeded). I tried _url and root.loaderInfo.url but that only gives me my own url where the swf file is stored. Any idea? Is there a possiblity to get the url given by some javascript and document.URL? Thank you for your answers. I hope that there is an answer because i'm struggling with this for a couple of weeks now. Cheers. Benjamin ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Geen virus gevonden in het binnenkomende-bericht. Gecontroleerd door AVG - www.avg.com Versie: 9.0.851 / Virusdatabase: 271.1.1/3063 - datum van uitgifte: 08/10/10 20:34:00 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] I have a drag and drop question.
I have a drag and drop question. In my Drag_Drop_Question class, I position several images (loaded with another class) dynamically on stage. These are my targets. And I do the same for a bunch of images, which are the objects to drag to their target. Now every time I drop my dragged image I should get the dropTarget. Trace(e.target.dropTarget); // null Trace(e.target.dropTarget.parent); // Error #1009 But they are null or Error #1009. I did some more tracing of the object and his name: trace(e.target.parent.parent.parent.parent.parent.parent, e.target.parent.parent.parent.parent.parent.parent.name); //[object Stage] null trace(e.target.parent.parent.parent.parent.parent, e.target.parent.parent.parent.parent.parent.name); //[object Main] root1 trace(e.target.parent.parent.parent.parent, e.target.parent.parent.parent.parent.name); //[object MovieClip] instance15 trace(e.target.parent.parent.parent, e.target.parent.parent.parent.name); //[object Sleepvraag] instance121 trace(e.target.parent.parent, e.target.parent.parent.name); //[object Sprite] instance133 trace(e.target.parent, e.target.parent.name); //[object Sprite] instance191 trace(e.target, e.target.name); //[object Image] 7 Any help is appreciated! Regards Cor Flash_Tiger Mailing ListYahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/Flash_tiger/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/Flash_tiger/join (Yahoo! ID required) <*> To change settings via email: flash_tiger-dig...@yahoogroups.com flash_tiger-fullfeatu...@yahoogroups.com <*> To unsubscribe from this group, send an email to: flash_tiger-unsubscr...@yahoogroups.com <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ Geen virus gevonden in het binnenkomende-bericht. Gecontroleerd door AVG - www.avg.com Versie: 9.0.851 / Virusdatabase: 271.1.1/3061 - datum van uitgifte: 08/10/10 20:34:00 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Getting the url where my Flash movie was embeded
Can yo ushow how you do this: So, i now make the call with a try block and parse the error message with a regex and get my wanted url. Regards Cor -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of allandt bik-elliott (thefieldcomic.com) Sent: donderdag 12 augustus 2010 14:09 To: Flash Coders List Subject: Re: [Flashcoders] Getting the url where my Flash movie was embeded good job mate :) On 12 August 2010 12:54, Pedder wrote: > Ok, thank you for your answers. > > I tried this on a test system and it worked fine. Then i tried this on > facebook and got a "Security sandbox violation: external interface caller". > Well, the error message says something like "cannot access > http://www.facebook.com..."; So, i now make the call with a try block and > parse the error message with a regex and get my wanted url. Yeah! > > Thank you! > Chris > > > Am 12.08.2010 um 12:30 schrieb allandt bik-elliott (thefieldcomic.com): > > > or you could do it all from within flash using >> var:urlPath:String = >> ExternalInterface.call("window.location.href.toString"); >> >> >> >> On 12 August 2010 11:29, allandt bik-elliott (thefieldcomic.com) < >> alla...@gmail.com> wrote: >> >> i think your best bet is to write a javascript function that returns >>> window.location.href >>> and then use the ExternalInterface class to call that function within the >>> flash >>> >>> best >>> a >>> >>> On 12 August 2010 10:51, Pedder wrote: >>> >>> Hey all together, i was wondering if i can get the url where my flash movies are embeded. I have a little widget on my page to which i provide an embed code to my users so that they can embed my widget anywhere on the internet. But the problem is that i don't know where the widget is embeded. Some guy told me that he embed it on his blog but i can't find it there and it would be nice if i could have some kind of statistic where and how often my widget is played. But i wasn't able to get the external url (where the code for the widget was embeded). I tried _url and root.loaderInfo.url but that only gives me my own url where the swf file is stored. Any idea? Is there a possiblity to get the url given by some javascript and document.URL? Thank you for your answers. I hope that there is an answer because i'm struggling with this for a couple of weeks now. Cheers. Benjamin ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >>> >>> ___ >> Flashcoders mailing list >> Flashcoders@chattyfig.figleaf.com >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >> > > > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Geen virus gevonden in het binnenkomende-bericht. Gecontroleerd door AVG - www.avg.com Versie: 9.0.851 / Virusdatabase: 271.1.1/3063 - datum van uitgifte: 08/10/10 20:34:00 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Getting the url where my Flash movie was embeded
good job mate :) On 12 August 2010 12:54, Pedder wrote: > Ok, thank you for your answers. > > I tried this on a test system and it worked fine. Then i tried this on > facebook and got a "Security sandbox violation: external interface caller". > Well, the error message says something like "cannot access > http://www.facebook.com..."; So, i now make the call with a try block and > parse the error message with a regex and get my wanted url. Yeah! > > Thank you! > Chris > > > Am 12.08.2010 um 12:30 schrieb allandt bik-elliott (thefieldcomic.com): > > > or you could do it all from within flash using >> var:urlPath:String = >> ExternalInterface.call(“window.location.href.toString”); >> >> >> >> On 12 August 2010 11:29, allandt bik-elliott (thefieldcomic.com) < >> alla...@gmail.com> wrote: >> >> i think your best bet is to write a javascript function that returns >>> window.location.href >>> and then use the ExternalInterface class to call that function within the >>> flash >>> >>> best >>> a >>> >>> On 12 August 2010 10:51, Pedder wrote: >>> >>> Hey all together, i was wondering if i can get the url where my flash movies are embeded. I have a little widget on my page to which i provide an embed code to my users so that they can embed my widget anywhere on the internet. But the problem is that i don't know where the widget is embeded. Some guy told me that he embed it on his blog but i can't find it there and it would be nice if i could have some kind of statistic where and how often my widget is played. But i wasn't able to get the external url (where the code for the widget was embeded). I tried _url and root.loaderInfo.url but that only gives me my own url where the swf file is stored. Any idea? Is there a possiblity to get the url given by some javascript and document.URL? Thank you for your answers. I hope that there is an answer because i'm struggling with this for a couple of weeks now. Cheers. Benjamin ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >>> >>> ___ >> Flashcoders mailing list >> Flashcoders@chattyfig.figleaf.com >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >> > > > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Getting the url where my Flash movie was embeded
Ok, thank you for your answers. I tried this on a test system and it worked fine. Then i tried this on facebook and got a "Security sandbox violation: external interface caller". Well, the error message says something like "cannot access http://www.facebook.com ..." So, i now make the call with a try block and parse the error message with a regex and get my wanted url. Yeah! Thank you! Chris Am 12.08.2010 um 12:30 schrieb allandt bik-elliott (thefieldcomic.com): or you could do it all from within flash using var:urlPath:String = ExternalInterface.call(“window.location.href.toString”); On 12 August 2010 11:29, allandt bik-elliott (thefieldcomic.com) < alla...@gmail.com> wrote: i think your best bet is to write a javascript function that returns window.location.href and then use the ExternalInterface class to call that function within the flash best a On 12 August 2010 10:51, Pedder wrote: Hey all together, i was wondering if i can get the url where my flash movies are embeded. I have a little widget on my page to which i provide an embed code to my users so that they can embed my widget anywhere on the internet. But the problem is that i don't know where the widget is embeded. Some guy told me that he embed it on his blog but i can't find it there and it would be nice if i could have some kind of statistic where and how often my widget is played. But i wasn't able to get the external url (where the code for the widget was embeded). I tried _url and root.loaderInfo.url but that only gives me my own url where the swf file is stored. Any idea? Is there a possiblity to get the url given by some javascript and document.URL? Thank you for your answers. I hope that there is an answer because i'm struggling with this for a couple of weeks now. Cheers. Benjamin ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Getting the url where my Flash movie was embeded
or you could do it all from within flash using var:urlPath:String = ExternalInterface.call(“window.location.href.toString”); On 12 August 2010 11:29, allandt bik-elliott (thefieldcomic.com) < alla...@gmail.com> wrote: > i think your best bet is to write a javascript function that returns > window.location.href > and then use the ExternalInterface class to call that function within the > flash > > best > a > > On 12 August 2010 10:51, Pedder wrote: > >> Hey all together, >> >> i was wondering if i can get the url where my flash movies are embeded. I >> have a little widget on my page to which i provide an embed code to my users >> so that they can embed my widget anywhere on the internet. But the problem >> is that i don't know where the widget is embeded. >> Some guy told me that he embed it on his blog but i can't find it there >> and it would be nice if i could have some kind of statistic where and how >> often my widget is played. But i wasn't able to get the external url (where >> the code for the widget was embeded). >> >> I tried _url and root.loaderInfo.url but that only gives me my own url >> where the swf file is stored. >> >> Any idea? Is there a possiblity to get the url given by some javascript >> and document.URL? >> >> Thank you for your answers. I hope that there is an answer because i'm >> struggling with this for a couple of weeks now. >> >> Cheers. >> Benjamin >> >> ___ >> Flashcoders mailing list >> Flashcoders@chattyfig.figleaf.com >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >> > > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Getting the url where my Flash movie was embeded
i think your best bet is to write a javascript function that returns window.location.href and then use the ExternalInterface class to call that function within the flash best a On 12 August 2010 10:51, Pedder wrote: > Hey all together, > > i was wondering if i can get the url where my flash movies are embeded. I > have a little widget on my page to which i provide an embed code to my users > so that they can embed my widget anywhere on the internet. But the problem > is that i don't know where the widget is embeded. > Some guy told me that he embed it on his blog but i can't find it there and > it would be nice if i could have some kind of statistic where and how often > my widget is played. But i wasn't able to get the external url (where the > code for the widget was embeded). > > I tried _url and root.loaderInfo.url but that only gives me my own url > where the swf file is stored. > > Any idea? Is there a possiblity to get the url given by some javascript and > document.URL? > > Thank you for your answers. I hope that there is an answer because i'm > struggling with this for a couple of weeks now. > > Cheers. > Benjamin > > ___ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Getting the url where my Flash movie was embeded
Hey all together, i was wondering if i can get the url where my flash movies are embeded. I have a little widget on my page to which i provide an embed code to my users so that they can embed my widget anywhere on the internet. But the problem is that i don't know where the widget is embeded. Some guy told me that he embed it on his blog but i can't find it there and it would be nice if i could have some kind of statistic where and how often my widget is played. But i wasn't able to get the external url (where the code for the widget was embeded). I tried _url and root.loaderInfo.url but that only gives me my own url where the swf file is stored. Any idea? Is there a possiblity to get the url given by some javascript and document.URL? Thank you for your answers. I hope that there is an answer because i'm struggling with this for a couple of weeks now. Cheers. Benjamin ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders