The forums have permanently moved to forum.kirupa.com. This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.


Results 1 to 6 of 6

Thread: load image from db via php

  1. #1

    load image from db via php

    Hi,

    i am trying to create a slideshow in fmx 2004, at the mo i am doing it with the images in mysql db, then i pull them out via a show image page. Is this the best method or can flash do it better?

    Anyway i can't get this code to load the image:

    function positionIt() {
    this._x = 50;
    this._y = 50;
    }
    myLoadVars = new LoadVars();
    myLoadVars.load("loadImages.php");
    Photos = new Array();
    myLoadVars.onLoad = function (success) {
    if (success) {
    Photos = this.photoIds.split(",");
    this.createEmptyMovieClip("myjpg", 1);
    var link = "showimage.php?ID=";
    link += Photos[0];
    myjpg.onComplete = positionIt();
    myjpg.loadjpg(link);
    }
    };

    any help would be most appreciated.

    thanks

    ash
    Last edited by beforedawn; May 31st, 2004 at 04:23 PM.

  2. #2
    Code:
    loadMovie('phpAddressGoesHere');
    should work

  3. #3
    Hi,

    thanks for the reply.

    I now have this but no joy:

    function positionIt() {
    this._x = 50;
    this._y = 50;
    }

    myLoadVars = new LoadVars();
    myLoadVars.load("loadImages.php");
    Photos = new Array();
    myLoadVars.onLoad = function (success) {
    if (success) {
    Photos = this.photoIds.split(",");
    this.createEmptyMovieClip("myjpg", 1);
    var link = "imagedisplay.php?ID=";
    link += Photos[0];
    myjpg.onComplete = positionIt();
    myjpg.loadMovie(link);
    }
    };

    thanks

    ash

  4. #4
    hi,

    may I know the reason for using database,

    are you saving any data back to database?

    if you just want to take the data and display it, then i think no need of using database and PHP,

    simple XML can do that for you and there are lot of tutorials explaning about that,

    in Flash mx you have one sample file even,
    prathapsimha

  5. #5
    hi,

    yes the slideshow will be updated and the images saved in the db.

    thanks

    ash
    Last edited by beforedawn; June 2nd, 2004 at 04:56 AM.

  6. #6
    Hi,

    I think i have solved the issue. I was pulling the images from a db as a blob and so the link to the files was imagedisplay.php?ID=??, flash doesn't like this so I am using another method.

    thanks

    ash

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012