WEB Actionscript/Flash crew: How do i make a page redirect

Discussion in 'OT Technology' started by Ricky, Jan 6, 2009.

  1. Ricky

    Ricky █▄ █▄█ █▄ ▀█▄

    Joined:
    Jun 17, 2005
    Messages:
    38,767
    Likes Received:
    6
    Alright got that issue working :o. It was a stupid error because i don't know much flash/actionscript :o

    Anyways i have a new problem :o.

    I have this php script which is very basic and just does the simple uploading crap. I have a small variable of the file name it uploads. I would like to pass that on to my flash page. Ultimatly i'd want to create some sort of box which would pop up or something and have the links to the variables (or the links to the upload urls).

    Anyways is there a way i can post this variables into AS3? I've been looking into URLVariables but have been having a little bit of a hard time

    If that's a little too complicated, maybe it passing the php variables to another php page, which i can then link to? I have no idea what's best :o

    This is what i got so far and its not really wokring out :o

    as3:
    php:
     
    Last edited: Jan 8, 2009
  2. 95vr4

    95vr4 OT Supporter

    Joined:
    Oct 6, 2004
    Messages:
    2,513
    Likes Received:
    0
    Location:
    Weddington, NC
    pretty slick uploader :cool:. What is it?

    I don't know a lick of actionscript, but I've used swfupload before and the handlers were in javascript files, one of which was a function named something like "uploadSucccess" ..... were you could easily do a redirect with js
     
  3. Ractoon

    Ractoon Shibumi in progress...

    Joined:
    Apr 30, 2001
    Messages:
    256
    Likes Received:
    0
    If you're using AS3, can't you just put:

    var url:String = "http://www.your-page.com";
    navigateToURL(new URLRequest(url));

    instead of "Files successfully uploaded"?

    Or am I missing something?

    Link for both AS2 and AS3 code snippets here
     
  4. SmugZombie

    SmugZombie OT Supporter

    Joined:
    Aug 2, 2006
    Messages:
    3,783
    Likes Received:
    0
    Location:
    Purgatory
    Id like to see the source first
     
  5. Ricky

    Ricky █▄ █▄█ █▄ ▀█▄

    Joined:
    Jun 17, 2005
    Messages:
    38,767
    Likes Received:
    6
    I dont fucking understand this shit :o

    Im suualyl good at fixing simple things like this but it doesnt make sense.

    There are 2 places where it should echo the "file sucessfully uploaded". One in the php file (which i managed to edit to use the rand () funciton). and one in the action script.

    I edited both to something completely random and its still showing up as "file sucessfully uploaded". I checked the fla file. I checked all the other files and nothing :squint:

    I emptied cache and al that other crap too. what gives ?
     
  6. 95vr4

    95vr4 OT Supporter

    Joined:
    Oct 6, 2004
    Messages:
    2,513
    Likes Received:
    0
    Location:
    Weddington, NC
    is there a reason you can't post the source? One of the flash guys here could probably have it fixed in 30 seconds.

    Personally, if I were you I'd use swfupload. You could have it setup and working in 10 minutes using their sample scripts. Uses a combination of javascript and flash. It's a piece of cake to use and you don't have to touch the flash just the js. Has a bunch of cool optional features too, like simultaneous thumbnail creation ------> http://demo.swfupload.org/v220beta4/applicationdemo/index.php

    http://swfupload.org
     
  7. Ricky

    Ricky █▄ █▄█ █▄ ▀█▄

    Joined:
    Jun 17, 2005
    Messages:
    38,767
    Likes Received:
    6
  8. fishbulb

    fishbulb Active Member

    Joined:
    Oct 29, 2001
    Messages:
    6,848
    Likes Received:
    4
    Location:
    md
    You changed that line to asdf and recompiled the swf and it still shows the old message?
     
  9. 95vr4

    95vr4 OT Supporter

    Joined:
    Oct 6, 2004
    Messages:
    2,513
    Likes Received:
    0
    Location:
    Weddington, NC
    I just uploaded the solution :hs:
     
  10. Ricky

    Ricky █▄ █▄█ █▄ ▀█▄

    Joined:
    Jun 17, 2005
    Messages:
    38,767
    Likes Received:
    6
    why would i have to recompile the swf if its an actionscript outside the fla file ?
     
  11. Ricky

    Ricky █▄ █▄█ █▄ ▀█▄

    Joined:
    Jun 17, 2005
    Messages:
    38,767
    Likes Received:
    6
    :rofl:

    I paid 12 bucks for this. Im going to get it to work :squint:
     
  12. 95vr4

    95vr4 OT Supporter

    Joined:
    Oct 6, 2004
    Messages:
    2,513
    Likes Received:
    0
    Location:
    Weddington, NC
    about what it's worth :mamoru:.

    Took me about an hour to get it running in my app, auto generating thumbnails, saving files, inserting filenames/userID's into mysql AND it uses Ajax :eek3:

    but suit yourself....have fun debugging your $12 script :rofl:
     
  13. Ricky

    Ricky █▄ █▄█ █▄ ▀█▄

    Joined:
    Jun 17, 2005
    Messages:
    38,767
    Likes Received:
    6
    wtf

    i made the change a long time ago. then later on i changed it agian

    Yet it still has the old version still there. It has to be something related to flash cache or something

    edit: tried on a VM. it still isnt updating. wtf?

    i ftpd on the VM too and it is changed there but isnt showing what its supposed to
     
    Last edited: Jan 8, 2009
  14. fishbulb

    fishbulb Active Member

    Joined:
    Oct 29, 2001
    Messages:
    6,848
    Likes Received:
    4
    Location:
    md
    Because that's how flash works, it compiles all referenced .as files into the swf?

    I must be really dense today and not understanding the scenario
     
  15. Ricky

    Ricky █▄ █▄█ █▄ ▀█▄

    Joined:
    Jun 17, 2005
    Messages:
    38,767
    Likes Received:
    6
    ahh i see. so i have to recompile each time?

    i thought the way flash works was it was using the action scripts kind of like how it'd use an xml file :o

    alright i'll try that.

    thanks :)
     
  16. Ricky

    Ricky █▄ █▄█ █▄ ▀█▄

    Joined:
    Jun 17, 2005
    Messages:
    38,767
    Likes Received:
    6
    got it working :bowdown:

    i spent countless hours programming shit without realizing that i had to recompile it each time :o
     

Share This Page