Re: [Flashcoders] I am stuck

2008-10-18 Thread Christoffer Enedahl
Hmm... I guess it could work. Here is how I see it. Why would you do 
this outside of flash?


Cons:
 The user must have javascript enabled (Often not a problem)
 The remote data must reside on the html server (sort of)
 Data source can be detected by viewing source

Pros:
 You already have coded the system

Usually I call a webservice to fetch my data, or load a remote xml file 
from within flash. Pass in the url in the parameters to the flash.

Cons:
 Using a other domain, you'll have to add/modify a crossdomain.xml file 
on that server.

 Data source can be detected running a special add-in in firefox
Pros:
 The opposite of the first con

/Christoffer

Anthony Pace skrev:

I was sucked in to a project developing a contractor management system...

there were problems with not knowing for sure if the data was being 
returned, and I needed the ability to load data from a remote source so:


   * I had the data be loaded in a script tag as an array,
   * then had the loaded script call a function called load(option),
 that is established in a script tag with static source
   * based on the parameter passed it performs an function with that
 data, and the only thing I need is a timeout timer

does this sound a bit hackish?  I have used it, and it is very 
reliable, allowing for all sorts of params to be passed through GET


I was also thinking that in the future this could be used to load any 
type of data from foriegn sources as all I would need is the innerHTML 
of the tag


Are there better ways to do this that are as reliable?
___
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] I am stuck

2008-10-18 Thread Glen Pike

Hi,

   Loading data remotely, there are lots of options, but if you already 
have a working system, I would stick to it for this project.


   From the sound of things, you are loading HTML into Flash.  If you 
are cunning, you may be able to ensure that the HTML is XHTML and then 
it may be possible to change the back end of the system a bit later on.  
The other thing is that the data not being returned thing sounds like 
a server side problem - with your back end, if your Flash calls a url, 
e.g. getdata.php.  Make sure that getdata.php outputs nicely to your 
browser first, then you can be sure the script is not broken and check 
your Flash  fix any problems there.  If your hosting is rubbish and you 
get 404 or other errors sometimes, then I would change hosting.


   For future reference on Flash-server side comm's - look at:

   XML, which means you can load stuff from anywhere, cross platform, 
etc.  The downside is that XML code is usually bloated and for mobile 
devices, possibly too memory heavy.  The upside is that with AS3 it is 
really easy to parse and manipulate.  XML can work from files, 
webservices, etc... so is a good choice if you are not sure what system 
your code is going to be deployed on and the back end people are 
somewhere else...
  
   AMF Remoting - AMF is a binary format and you need server side code 
to handle the calls. The good news is that there are loads of projects 
which implement this in various languages - PHP, .NET, Java, CF, etc. -  
google AMF remoting and look on the Adobe Devnet site for info...  The 
advantage is that the data is binary so uses less bandwidth than XML, 
but the learning curve is a bit steeper and it is sometimes fiddly to 
set up an AMF connection, because something does not work and it takes 
a while to figure out the first time until you learn the tricks.


   Aral Balkan was doing a really nice system called SWX which used a 
combination of AMF remoting and some code on top which made it lots 
easier to load date.  This was working for AS2, but still undeveloped 
for AS3, so you are possibly a bit stuck if you need the latter - 
swxformat.org


   As for hating the project - yeah, I know that feeling.  You may have 
to take a hit on this one.  Personally, I would be charging more than 
$1000 for 50 hours work, but then your rate may also depend on your 
experience - for projects that entail some learning, I may discount it 
quite a bit, so $1000 may be reasonable.  At the end of the day, if the 
job pays your bills, then you are doing okay, if you get more, then 
lovely, but remember, you said you loved coding, which is sometimes 
frustrating when clients get involved.


   My suggestion here would be to invoke the iron triangle rule - 
this article leads into it nicely:  
http://www.codeodor.com/index.cfm/2008/3/31/Top-6-Non-monetary-Features-I-Want-In-An-Employer/2091


   Basically you need to be firm with your employer, your project has 
features, deadline and cost - the employer does not get to control 
all three, you may need to politely remind them about this.  Having 
worked with them, you may need to tread carefully doing this, but in the 
long run, if you can do this, your relationship with clients will be 
better.  Sometimes, you get crap clients though, so bear this in mind - 
it's not always your fault :)


   Here is a useful article about how to work out your hourly rate:  
http://www.blueflavor.com/blog/2006/apr/25/pricing-project/


   Sorry, this turned into a bit of an essay, but keep your chin up and 
put the crap bits down to experience after you finish the project :)


   Glen
  


--

Glen Pike
01326 218440
www.glenpike.co.uk http://www.glenpike.co.uk

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] I am stuck

2008-10-18 Thread Dave Mennenoh
1000.00? I'd have asked five times that minimum for 50 hours of work or I 
wouldn't have done it - especially in a rush and working in the evenings. 
You're getting like $20 an hour... and you still have to pay taxes on it. 
Not that I haven't done stuff on the cheap before, but it's been a while. If 
you're learning as you go, then certainly cheaper is ok, but I'd still not 
go below $75 an hour.


FWIW, I use AMFPHP / remoting to load data from a DB. It's fast and you get 
native data types.


PS - I think Glen had good stuff to say.


Dave -
www.offroadfire.com
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/ 


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] I am stuck

2008-10-18 Thread Anthony Pace

Hello to the people that responded, especially Glen Pike,

Thanks for the responses; yet, this project is actually ajax (or AJAJ, a 
redundancy I know, considering I am really using Script source renewal) 
not flash, and I know how, actually I am very well versed, in loading 
data from external sources of any protocol with flash if in the same 
domain and sandbox; yet, I am kind of trying to make xss my friend here; 
as well, I am also pretty well versed in using XSS exploits on pages 
too, in case anyone needs a quick pen test of their forums and user 
submission forms for $80.00 to $100.00 bucks, and for an additional 
$100.00 I will help you fix it.  (sorry for the plug)


I know, I know, evil ajax taking over the flashcoders list; yet, I 
figured you guys would know of ways to bypass the CDP (cross domain 
policy) nonsense, and thus help me with my concern as well.  I just 
wanted to know if there were better ways to do this, and if it had been 
done better a thousand times before I attempted it using my xss hackish way.


Regarding the JOB... I totally took a hit in my opinion, and I am glad 
to have it confirmed.  I am the eternal student trying to save dollars 
to go back to school, and that is why I offered my services at a lower rate.


Actually right now, I am okay with the system I have, as it returns data 
very well, and below I have outlined how it works with flash too, and 
has, after about 15 min of testing, allowed me to bypass the whole CDP 
nonsense.  Feelings on CDP... if I am a hacker and I want your data, 
then I am not going to use the browser or flash to get it, I am going to 
use all kinds of leach programs available; therefore, I ask why make it 
difficult for honest developers?


  1. *flash*

 calls js function reloadScript(id,srcURL)

  2. *js*

 reloads script id=toBeReloaded innerHTML content

  3. *script id=toBeReloaded*

 after innerHTML is updated, (php loops to create a JS
 array)unlimited amount of call back functions occur; one of
 which being loaded(option); yet, if you listen to the DOM,
 callback is not required and the content returned can be
 anything... annnthnnngflushed binary
 MP3,IMG,SOUND,VIDEO, STREAMING data... wink wink ;o)

  4. *loaded(option)*

 if(option==1){call flash function to update data table with a
 new array being passed}


I also figured out how to make this load sound and video data from any 
source, bypassing CDP BS, and have as3 import that data as it flushes 
in, and use it as display content; after this project is over, I am 
going to have fun hacking with this.


For now back to this god awful project; which, wouldn't be so god awful 
if the client of my client wasn't being so up tight about the time frame.


Anthony Pace
[EMAIL PROTECTED]
I was the lucky joe that got to go: 
http://www.actionscript.org/resources/articles/761/1/Day-1-at-FITC-Toronto-2008/Page1.html




Glen Pike wrote:

Hi,

   Loading data remotely, there are lots of options, but if you 
already have a working system, I would stick to it for this project.


   From the sound of things, you are loading HTML into Flash.  If you 
are cunning, you may be able to ensure that the HTML is XHTML and then 
it may be possible to change the back end of the system a bit later 
on.  The other thing is that the data not being returned thing 
sounds like a server side problem - with your back end, if your Flash 
calls a url, e.g. getdata.php.  Make sure that getdata.php outputs 
nicely to your browser first, then you can be sure the script is not 
broken and check your Flash  fix any problems there.  If your hosting 
is rubbish and you get 404 or other errors sometimes, then I would 
change hosting.


   For future reference on Flash-server side comm's - look at:

   XML, which means you can load stuff from anywhere, cross platform, 
etc.  The downside is that XML code is usually bloated and for 
mobile devices, possibly too memory heavy.  The upside is that with 
AS3 it is really easy to parse and manipulate.  XML can work from 
files, webservices, etc... so is a good choice if you are not sure 
what system your code is going to be deployed on and the back end 
people are somewhere else...
 AMF Remoting - AMF is a binary format and you need server side 
code to handle the calls. The good news is that there are loads of 
projects which implement this in various languages - PHP, .NET, Java, 
CF, etc. -  google AMF remoting and look on the Adobe Devnet site for 
info...  The advantage is that the data is binary so uses less 
bandwidth than XML, but the learning curve is a bit steeper and it is 
sometimes fiddly to set up an AMF connection, because something does 
not work and it takes a while to figure out the first time until you 
learn the tricks.


   Aral Balkan was doing a really nice system called SWX which used a 
combination of AMF remoting and some code on top which made 

[Flashcoders] I am stuck

2008-10-17 Thread Anthony Pace

I was sucked in to a project developing a contractor management system...

there were problems with not knowing for sure if the data was being 
returned, and I needed the ability to load data from a remote source so:


   * I had the data be loaded in a script tag as an array,
   * then had the loaded script call a function called load(option),
 that is established in a script tag with static source
   * based on the parameter passed it performs an function with that
 data, and the only thing I need is a timeout timer

does this sound a bit hackish?  I have used it, and it is very reliable, 
allowing for all sorts of params to be passed through GET


I was also thinking that in the future this could be used to load any 
type of data from foriegn sources as all I would need is the innerHTML 
of the tag


Are there better ways to do this that are as reliable?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] I am stuck

2008-10-17 Thread Anthony Pace

Does anyone know of a better way to load data from a remote source?

My God I hate this job I am on.  I like coding, but the guy I am working 
for is being pressured to pressure me to move faster.


I am doing this thing in about 3 weeks on my own for a thousand bucks, 
during my weekends and evenings mostly, capping at 50 hrs of work.


Are his expectations reasonable?  Am I just coding slowly?

What do you think?  consider... I designed the DB, designed the 
interface, wrote all the font end and back end code.


How much would you have asked for?

Anthony Pace wrote:

I was sucked in to a project developing a contractor management system...

there were problems with not knowing for sure if the data was being 
returned, and I needed the ability to load data from a remote source so:


   * I had the data be loaded in a script tag as an array,
   * then had the loaded script call a function called load(option),
 that is established in a script tag with static source
   * based on the parameter passed it performs an function with that
 data, and the only thing I need is a timeout timer

does this sound a bit hackish?  I have used it, and it is very 
reliable, allowing for all sorts of params to be passed through GET


I was also thinking that in the future this could be used to load any 
type of data from foriegn sources as all I would need is the innerHTML 
of the tag


Are there better ways to do this that are as reliable?
___
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