Dynamic text in banner ad??
A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: Dynamic text in banner ad??

  1. #1
    anyone else hear that? flashpipe1's Avatar
    Join Date
    Jan 2003
    Location
    Upstate NY
    Posts
    1,928

    Dynamic text in banner ad??

    I've got a client that I've developed flash and html banner ads for in the past and now they're wondering if I can create a banner ad for them with dynamic text in it. For example, within the graphics of the ad, there would be a place that would say something like "Over XX,XXX copies sold" and that number would auto increment (every few seconds). The tricky part is that they want the number to increment based on a variable number that will be generated on their website, but the banners will be posted to various advertising websites around the web.

    So, having never done this before, I'm thinking it will be some combination of php/javascript on their site to create the auto-incrementing variable and, within the html code of the banner, there would be some sort of javascript (with some Ajax perhaps for the continuous updating) to grab that number from their site and display it.

    Anyone ever done/seen anything like this?? Anyone have any tips/advice? I'm sure it's doable, just a matter of figuring out the easiest/best/most reliable way to do it without spending way more time building it than needed.

    Thanks!!!
    Love like you've never been hurt, live like there's no tomorrow and dance like nobody's watching.

  2. #2
    anyone else hear that? flashpipe1's Avatar
    Join Date
    Jan 2003
    Location
    Upstate NY
    Posts
    1,928
    hmm...nobody?? Seems like it would be pretty straight forward, but maybe I'm getting myself into more than I should...I'll play around with it to see how well it works.
    Love like you've never been hurt, live like there's no tomorrow and dance like nobody's watching.

  3. #3
    Senior Member realMakc's Avatar
    Join Date
    Oct 2002
    Posts
    679
    unless you need this (starting) number to be changing dynamically, you can just put text file on their server with the number, and then use URLLoader to load it. alternatively, you can do whole counter thing as a separate animation that sits on their site, and load it into your banner using Loader. your question is broad and your options are so numerous, that nobody can be bothered to list them all I mean, if your question was more like "I have this file and I try to load it and it does not work and here is the code", one or two people here could pick it up and answer.

  4. #4
    anyone else hear that? flashpipe1's Avatar
    Join Date
    Jan 2003
    Location
    Upstate NY
    Posts
    1,928
    Thanks realMakc. Yeah, I knew it was a pretty broad question. I need to play around with it a bit to see if it's feasible or not, but, I DO need the number to be changing dynamically and it needs to be consistent across all of their banners on all the different sites they have them on...so, they have to be pulled from a separate variable on a separate site that's the kicker.

    Thanks!!

    Quote Originally Posted by realMakc View Post
    unless you need this (starting) number to be changing dynamically, you can just put text file on their server with the number, and then use URLLoader to load it. alternatively, you can do whole counter thing as a separate animation that sits on their site, and load it into your banner using Loader. your question is broad and your options are so numerous, that nobody can be bothered to list them all I mean, if your question was more like "I have this file and I try to load it and it does not work and here is the code", one or two people here could pick it up and answer.
    Love like you've never been hurt, live like there's no tomorrow and dance like nobody's watching.

  5. #5
    Senior Member realMakc's Avatar
    Join Date
    Oct 2002
    Posts
    679
    by dynamic I mean that there is some logic that updates this value. if they can just log in their winscp and edit the file with that number couple of times per day, I do not consider it to be dynamic.

  6. #6
    anyone else hear that? flashpipe1's Avatar
    Join Date
    Jan 2003
    Location
    Upstate NY
    Posts
    1,928
    Yeah, it will be dynamic. It's actually going to be fed from their real-time sales which is going to be pulled from their e-commerce back-end db. They want it to reflect their ACTUAL sales.
    Love like you've never been hurt, live like there's no tomorrow and dance like nobody's watching.

  7. #7
    Moderator
    Join Date
    Feb 2001
    Posts
    13,044
    Hi

    dynamic 1a: when the banner loads, it calls a server for the current count ... but does not update (so if someone stares at the banner for a while, it would not change). Requires crossdomain files for the banner to be able to fetch the value
    dynamic 1b: a php script on the server would fetch the value and stuff it into the embedding. Requires changes to the way the banner is installed on the website
    dynamic 2: like 1a, but the banner would fetch new values every so often (e.g. once every 30 seconds)

  8. #8
    anyone else hear that? flashpipe1's Avatar
    Join Date
    Jan 2003
    Location
    Upstate NY
    Posts
    1,928
    Musicman,

    Yes, this will be dynamic 2, so the banner will have to update dynamically based on the updated variable on the client's site. They initially wanted it updated constantly so it reflected the specific variable value (they're predicting that the counter will be updating every few seconds), but I told them that would create a lot of updating calls that some sites may not want from the banners that they have. That's why I was thinking some sort of Ajax updating might be necessary...

    Thanks for any advice!


    Quote Originally Posted by Musicman View Post
    Hi

    dynamic 1a: when the banner loads, it calls a server for the current count ... but does not update (so if someone stares at the banner for a while, it would not change). Requires crossdomain files for the banner to be able to fetch the value
    dynamic 1b: a php script on the server would fetch the value and stuff it into the embedding. Requires changes to the way the banner is installed on the website
    dynamic 2: like 1a, but the banner would fetch new values every so often (e.g. once every 30 seconds)
    Love like you've never been hurt, live like there's no tomorrow and dance like nobody's watching.

  9. #9
    Senior Member realMakc's Avatar
    Join Date
    Oct 2002
    Posts
    679
    you are making it sound waaaaaay harder than it is.

    here is a very complete code example of how to load the file from server and read the variable from it. I'd say it is even more complete than it has to be, but that's good thing, right?

  10. #10
    anyone else hear that? flashpipe1's Avatar
    Join Date
    Jan 2003
    Location
    Upstate NY
    Posts
    1,928
    Yes, realMakc, that's the way to do it...BUT the variable needs to be grabbed from another site, it has to be updated on a consistent basis and, ideally, done in html, not flash...

    I haven't committed to doing this for them yet, just started looking into what it might take technically, so thanks to ALL you guys for the help and suggestions...still have some testing to do...
    Love like you've never been hurt, live like there's no tomorrow and dance like nobody's watching.

  11. #11
    Senior Member realMakc's Avatar
    Join Date
    Oct 2002
    Posts
    679
    Quote Originally Posted by flashpipe1 View Post
    Yes, realMakc, that's the way to do it...BUT the variable needs to be grabbed from another site
    Youvegottabekiddinme... just change
    PHP Code:
    new URLRequest("urlLoaderExample.txt"); 
    to
    PHP Code:
    new URLRequest("http://thatstupidsite.com/urlLoaderExample.txt"); 
    Quote Originally Posted by flashpipe1 View Post
    and, ideally, done in html, not flash...

  12. #12
    anyone else hear that? flashpipe1's Avatar
    Join Date
    Jan 2003
    Location
    Upstate NY
    Posts
    1,928
    lol...yeah, but I know there are a lot of smart people in here and that's why i put it in the scripting section.
    Thanks for the direction, should be playing around with it today to make sure I can get all the pieces working before I tell the client it can work the way they want it...
    Thanks!
    Love like you've never been hurt, live like there's no tomorrow and dance like nobody's watching.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width


HTML5 Development Center

Poll by Flashkit.com