i have values in loop.php generate link "page.php?id=1" "page.php?id=2" ecc.
i need pass value of "id" actionscript3, read link page.php this:
var myvars:urlvariables = new urlvariables(); myvars.flashvar = "myvalue"; var myrequest:urlrequest = new urlrequest("page.php"); myrequest.method = urlrequestmethod.post; myrequest.data = myvars; var myloader:urlloader = new urlloader(); myloader.addeventlistener(event.complete, completehandler); myloader.load(myrequest); function completehandler(e:event){ var receivevars:urlvariables = new urlvariables(e.target.data); vartxt1.text = receivevars.phpvar1; the problem change link in actionscript this:
var myrequest:urlrequest = new urlrequest("page.php?id=1"); but problem is static link, , if value changing "4", link working value of "1".
i have think maybe write .xml value, , put actionscript read file...practically:
page.php?id=1 => page.xml.php (writing xml) => redirect page-with-swf-file.html and when i'm on page-with-swf-file.html read page.xml.php "id", , load rest of data need.
is there easier way of doing go-forward go-back...?
is page.php valid link well? off top of head, ways it:
- flash contacts page.php, , returns array of values (id=1, id=2...)
- flash contacts page returns array of values
- flash controls generates variables (i.e. in loop
"page?id=" + i) - flash starts "page?id=1" , in return, php tells next page
- php passes values flash vars when writing embed code swf
- php writes values xml files, , flash loads it
Comments
Post a Comment