A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: How does Flash intercept and display a database item?

  1. #1
    Junior Member
    Join Date
    Apr 2014
    Posts
    9

    How does Flash intercept and display a database item?

    My .fla has a text field called _root.inspiration <inspiration>

    First I don't understand this notation. (see attachment).

    How is this passed to the .swf. I'm fairly sure it's coming from the database, but is this handled by the action script? Strictly by the php?

    My problem is that it's simply not showing up. It works well enough on another site but I no longer have the .fla file which is current.

    Paul
    Attached Images Attached Images

  2. #2
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi Paul,

    Flash does not read directly from the db. php will read the db and then pass the data over to flash.
    Your img and inpsiration text is coming from draw_history.php

    you can visit that here, http://www.drawaprayer.com/draw_history.php

    you should see this "logged=0&imgurl=dapheartforfatherday.jpg&insp=Dra w Hearts for Fathers!"

    it is obviously getting the image as the page loads it, but not passing "" to the text field

    http://www.drawaprayer.com/drawnow.php

  3. #3
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi Paul,

    I figured out why your inspiration text is not laoding, in the fla find this line

    _level0.inspiration = "<P ALIGN='CENTER'><B>inspiration: <FONT COLOR='#FF0000'><I>" + this.insp.toString() + "</I></FONT></B></P>";

    and replace it with _level0.inspiration.text =

    I fyou wish to send me the latest fla, I can fix it for you
    Last edited by fruitbeard; 06-12-2014 at 05:56 PM.

  4. #4
    Junior Member
    Join Date
    Apr 2014
    Posts
    9
    Interesting.

    We were having problems with this entire operation on a shared host, so we signed up for a dedicated host, and had the Godaddy Expert Hands team copy everything from thecreativeme.com to drawaprayer.com. The obvious lesson here is that they couldn't account for code that was hard-coded with references in the back-end.

    I think this is one of those spinouts. And I wonder what ELSE didn't get changed. Especially references to this.insp.toString, or this.whatever.

    Now (and for everyone reading this thread), HOW do I even FIND this string in .fla?

    I want to try it out under your kind, navigating hand and mentorship.

    Paul

  5. #5
    Senior Member
    Join Date
    Nov 2001
    Posts
    1,145
    When it comes to communicating with the backend - .net, php, etc. - Flash .swf is like html. Flash has to go through the browser just like html. In flash you submit data through form submissions. The backend just gets a regular form submission post. Flash also receives data exactly like html, usually through xml or querystring data.

  6. #6
    Senior Member
    Join Date
    Aug 2012
    Posts
    115
    Think he mean say crash player no read db, sever lang read db then send on.

Tags for this Thread

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