dcsimg
A Flash Developer Resource Site

Results 1 to 13 of 13

Thread: Flash Guestbook Help Needed!

  1. #1
    Member
    Join Date
    Apr 2001
    Posts
    63

    Flash Guestbook Help Needed!

    Hey everyone - I hope someone might have an idea of what's going on. I posted awhile back but never heard anything - so I'm trying again.

    I have a flash guestbook that works fine when you view the actual flash file:

    http://www.rickhoeye.com/flash/guestbook/guestbook.swf

    BUT, when I call to it from within my main flash movie, the flash file shows, but won't post any of the info (coming from a php/txt file):

    http://www.rickhoeye.com/music/
    (hit the guestbook link to the left)

    Any help or clue as to what's going on is GREATLY appreciated.

    Thanks!
    -Rick

  2. #2
    Spidey wants his icon back! Defyeler's Avatar
    Join Date
    Jul 2002
    Location
    New York City
    Posts
    255
    what level are you loading your variables on?

    example, in your guestbook, if your variables are loaded into the _root.

    When you load it into another flash clip, in this case your main site, the _root is entirely different than your guestbooks' original _root destination.

    So you have to change where you're pulling the variable from in your var settings of your text box.
    Its never.. wow kool I like it, its always.. ok I made this.. how can it be better?

  3. #3
    Member
    Join Date
    Apr 2001
    Posts
    63
    Thanks for the info. I still have questions I guess then about the variables.

    In the guestbook, all the var's are loaded into the guestbooks root level - but called like for example in the Comments text field's Var is just called Comments, which is referenced in the php with that name as well.

    So do I change it to _root.Comments? or _root.contents.Comments?

    "contents" is the name of my movie clip in my MAIN movie that I'm loading all the movies, including the guestbook into.

    I appreciate the help!!

    Rick

  4. #4
    Spidey wants his icon back! Defyeler's Avatar
    Join Date
    Jul 2002
    Location
    New York City
    Posts
    255
    In your php , the returner you are using after

    echo

    should have _root.content.variableName

    For example, if the variable in the text box is normally 'textofbox'

    it should be

    PHP Code:
    echo "&_root.content.textofbox=this is my text whoopdedoo! &"
    Your other variables should be fine, it just doesn't load the content that is from your php file correct? if that doesn't solve your problem let me know.

    *EDIT*
    to be safe also, put _level0. in front of all the variables in your guestbook text boxes..

    example _level0.comments

    This tells the text box to go to the root of the document for the variable info, adding that little bit won't affect its performace as a stand alone swf either
    Last edited by Defyeler; 12-01-2003 at 08:21 AM.
    Its never.. wow kool I like it, its always.. ok I made this.. how can it be better?

  5. #5
    Member
    Join Date
    Apr 2001
    Posts
    63
    Hey would you mind taking a look at the php & fla? The php file isn't defining the variables like normal. I've added the "&_root.contents." to it and also added the ".level0" before the flash variable, but nothing is happening.

    I TOTALLY appreciate it.

    Rick
    Attached Files Attached Files

  6. #6
    Spidey wants his icon back! Defyeler's Avatar
    Join Date
    Jul 2002
    Location
    New York City
    Posts
    255
    sure np, i'll take a look at it, but right now i'm getting some breakfast, couple hours be ok with u?
    Its never.. wow kool I like it, its always.. ok I made this.. how can it be better?

  7. #7
    Member
    Join Date
    Apr 2001
    Posts
    63
    Absolutely - take your time!

    Thanks again!

    R

  8. #8
    Spidey wants his icon back! Defyeler's Avatar
    Join Date
    Jul 2002
    Location
    New York City
    Posts
    255
    Ok here you go.

    I edited your PHP file and your Fla, alot of stuff was pointing to the _parent and _root sections of the stand alone guestbook, which would not work when loaded into another flash clip.

    To see it work.

    http://www.dkbds.com/test/mygb.html

    here are your files, just upload to your server as is.

    http://www.dkbds.com/test/guestbook.zip

    enjoy
    Its never.. wow kool I like it, its always.. ok I made this.. how can it be better?

  9. #9
    Member
    Join Date
    Apr 2001
    Posts
    63
    Man, I really appreciate the help.
    1st I deleted what was up. Then uploaded your files as is.

    BUT, it still doesn't work.

    http://www.rickhoeye.com/flash/guestbook/guestbook.swf
    (works)

    http://www.rickhoeye.com/music/
    doesn't work when called remotely.

    Here's how the guestbook file is being called from the main movie:

    on (release) {
    _root.contents.loadMovie("http://www.rickhoeye.com/music/flash/guestbook.swf");
    }

    Could that have anything to do with it??

    Rick

  10. #10
    Spidey wants his icon back! Defyeler's Avatar
    Join Date
    Jul 2002
    Location
    New York City
    Posts
    255
    ah i see, the pathing to the directory is now different as well...

    in every single instance where you see

    LoadVariablesNum ("GuestBook.php .... and other variables", 0);

    you have to add the correct path to the guestbook..

    would look like this.

    loadVariablesNum ("http://www.rickhoeye.com/music/flash/GuestBook/GuestBook.php ... other variables", 0);

    see the pathing is incorrect now because when you run it in the guestbook directory, its looking in its own directory for the file..


    When its playing in your music directory, its looking in your MUSIC directory for the php file.

    you have to point it to the correct directory..

    if you are every unsure of pathing, use absolute paths.. example "http://www.rickhoeye.com/music/flash/guestbook/GuestBook.php"
    Last edited by Defyeler; 12-01-2003 at 10:55 AM.
    Its never.. wow kool I like it, its always.. ok I made this.. how can it be better?

  11. #11
    Member
    Join Date
    Apr 2001
    Posts
    63
    Nice! Ok, got it to work.
    I had tried 2 different places for testing purposes, but made sure there is only one now.

    What seemed to be the winner was calling the Guestbook.php with the full path.

    http://www.rickhoeye.com/music/

    Thanks so much for your help!!

    Rick

  12. #12
    Spidey wants his icon back! Defyeler's Avatar
    Join Date
    Jul 2002
    Location
    New York City
    Posts
    255
    anytime anychance for free tickets to your shows? LOL j/k good luck on future endeavors!
    Its never.. wow kool I like it, its always.. ok I made this.. how can it be better?

  13. #13
    Member
    Join Date
    Apr 2001
    Posts
    63
    Hey you bet!!

    Thanks again!

    Rick

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