Using loaded variables in url
I have a text file from which I load a variable XML_path
using:
loadVariablesNum ("get_xml_path.lasso", 0, "POST");
A dynamic text field on the stage with var set to XML_path
displays the variable: 90ZESJAN06
However, when I try:
var my_url = ("
http://myurl.com/flash/" +
XML_path + ".xml");
trace (my_url);
I get:
http://myurl.com/flash/.xml
What am I doing wrong?
Thanks
if you've a dynamic text field called XML_Path, try
var my_url = ("
http://myurl.com/flash/" +
XML_path.text + ".xml");
Similar Messages
-
I am trying to pass w path from an XML file to a URL path so that Flash will load in an image. I have it reading into Flash from the XML file but I dont know how to convert it to a URL.
This loads the XML into a varialbe.
var imageList:XMLList = organInput.organ.(@name==organName).imagePath;
var imagePath:String = imageList;
Then I want to use it as a relative url.
var request:URLRequest = new URLRequest(imagePath);
But it throws an errror. If i put the relative path in manual it works. Anyone know what I am doing wrong?
Thanks.ok I am going to post the code I am using and hope it helps because I am still having trouble. Thank you for looking at this.
import flash.display.MovieClip;
//Button Listeners//
organtrak.esophagus_btn.addEventListener(MouseEvent.CLICK, esophagusButtonCLICK);
organtrak.esophagus_btn.addEventListener(MouseEvent.ROLL_OVER, esohpagusMouseOver);
organtrak.esophagus_btn.addEventListener(MouseEvent.ROLL_OUT, esohpagusMouseOut);
function closewindow(e:MouseEvent):void
trace("Close Activity Window");
questions.gotoAndStop("empty");
function esophagusButtonCLICK(e:MouseEvent):void
trace("esophagus_btn CLICKED!");
questions.gotoAndStop("esophagus");
questions.curtain.play();
organName = "esophagus";
ParseBooks(organList);
imageloader(organName);
questions.close_btn.addEventListener(MouseEvent.CLICK,closewindow);
function esohpagusMouseOver(e:MouseEvent):void
trace("MouseOver Esophagus");
organtrak.esophagus.scaleX = 2;
organtrak.esophagus.scaleY = 2;
organtrak.esophagus.alpha = 1.0; //100% Alpha
organtrak.setChildIndex(organtrak.esophagus, 3);
function esohpagusMouseOut(e:MouseEvent):void
trace("MouseOut Esophagus");
organtrak.esophagus.scaleX = 1;
organtrak.esophagus.scaleY = 1;
organtrak.esophagus.alpha = .5; //50% Alpha
//Image loader function
function imageloader(organName):void
questions.image_window.status_txt.visible = true;
var request:URLRequest = new URLRequest(imagePath);
questions.image_window.UILoader.scaleContent = true;
questions.image_window.UILoader.addEventListener(Event.COMPLETE, completeHandler);
questions.image_window.UILoader.addEventListener(ProgressEvent.PROGRESS, progressHandler);
questions.image_window.UILoader.load(request);
function progressHandler(event:ProgressEvent):void
questions.image_window.status_txt.text = "Percentage Loaded: " + Math.round(event.target.percentLoaded);
//trace("Loading");
function completeHandler(event:Event):void
questions.image_window.status_txt.text = "Image is loaded";
//trace("Loading Done");
questions.image_window.status_txt.visible = false;
//XMLLoader Script//
import flash.net.URLVariables;
var xmlLoader:URLLoader = new URLLoader();
xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
xmlLoader.load(new URLRequest("XML/organtext.xml"));
//organName = "esophogas";
function LoadXML(e:Event):void
XML.ignoreWhitespace = true;
var organList:XML = new XML(e.target.data);
function ParseBooks(organInput:XML):void
trace("XML Output");
trace("------------------------");
var organList:XMLList = organInput.organ.(@name==organName).name;
var descriptionList:XMLList = organInput.organ.(@name==organName).descriptions;
var imageList:XMLList = organInput.organ.(@name==organName).imagePath;
var image2List:XMLList = organInput.organ.(@name==organName).imagePath2;
var videoList:XMLList = organInput.organ.(@name==organName).videoPath;
var imagePath:String = imageList;
trace(imagePath); -
I have a php file that holds a certain variable (the name of
an image). Then I have a SWF that shows the location of the file
and then shows the actual picture itself.
Here is a snippet from the PHP file:
quote:
print("&location=$image");
Below is my action script:
What am I doing wrong? How do I get the variable inside of
the URL? Thanks
----------Action
Script------------------------------------------------------------------Ah nevermind, I can do what I want outside of flash in php.
Doh! -
Use SESSION variable in URL from HTML region
Hello,
I have what looks like a simple question but i've been struggling with it for three days now, and i need your help!
I have a page, with an HTML region. I want to display some links to other pages within the application, so i thought i'd use this:
a href="http://server.xxxx.com:7777/pls/htmldb/f?p=114:13:&SESSION"
But the session ID is not interpreted, and the link doesn;t work. Any idea what's wrong here? or how i should create links with the session id in it?
Thanks!!!! Matt
Message was edited by:
matt_amsterdamMatt,
You've missed off the period (.) off the end, use &SESSION. instead -
Please help with Load Variables / ASP
Hello,
I am using Load Variables to retreive a variable from an ASP
page, (which uses a response.write) to output the variable
getfile.onRelease = function()
myData = new LoadVars();
myData.onLoad = function(success){
if(success) {
getfile_txt.text = this.strString;
} else {
getfile_txt.text = "error";
myData.load("sendFile.asp");
stop();
the problem is that the output says "undefined", but when I
access the .asp page through my web browser I get the expected
result of the variable which is "Test1.Doc"
if any1 can help with this, i would be massivley thankful,
thanks.p.s strString is the variable that I am trying to pass from
the ASP page. -
Using a variable as part of a url
Hi
Thanks for checking in!. I am trying to define one folder in
a url as a variable
//Here is what my code looks like before I try to use a
variable as part of the url. And this works just fine.
var nextImage:String = "events/1.jpg";
this.loaderTarget_mc.loadMovie("loader.swf")
//But when I try define the events folder as a variable I am
having no luck.
var gallery:String = "events";
var nextImage:String = "(gallery)/1.jpg";
this.loaderTarget_mc.loadMovie("loader.swf")
I am hoping what I am doing wrong here will be obvious to
someone who knows more than I do. Any ideas?
Thanks again
ScottUsing variable inside a String Delimeter will make it as
String. So put the variable out side the double code.
var nextImage:String = gallery + "/1.jpg"; -
Assigning loaded variables using loadvard
hi
i am using loadvars to load url encoded data from a php file.
when i trace the output it shows that the variables have been
retrived successfully.
now i need to use the values by assingning then to a
variable. i cant seem to get this going
i am using flash 8 with as2.
myVars.onLoad = function (success) {
if (success) {
trace (" variables loaded ");
ad1id.text = myVars.ad1id;
ad1src.text = myVars.ad1src;
clipid.text = myVars.clipid;
clipsrc.text = myVars.clipsrc;
ad2id.text = myVars.ad2id;
ad2src.text = myVars.ad2src;
} else {
trace (" Error loading variables ");
is the above method used for assigning the variables correct.
ramThe method look fine.
Inside the success if block, you need to trace the data:
trace("myVars:" + myVars);
trace("myVars.ad1id:" myVars.ad1id);
Also send the same inputs to the PHP script via an HTML form
or on the address line and see what is returned. -
I have created a php storing values in a mysql database. I animate I call this php using window.open:
window.open("http://localhost/send_and_update.php?Tid=26&dBA=78 ", "_self");
This works fine, the dataset 26 78 is saved in the database. But now I want to send values from variables in i animate. I try this:
Var time=22
window.open("http://localhost/send_and_update.php?Tid=time&dBA=78 ", "_self");
This won't work. Any suggestion?
Svein-ToreHi Darell!
Now I have tried it, unfortunately it won't work..... The browser gives me
the followoing error:
Unknown column 'time' in 'field list'
This is in fact an error from php, not from animate..... Maybe I have to
do this in a totally different way? Anyone who know how to write data from
animate to a mysql database?
Svein-Tore
2014-02-20 1:39 GMT+01:00 heathrowe <[email protected]>:
Re: Using variables in url created by heathrowe<http://forums.adobe.com/people/heathrowe>in *Edge
Animate CC* - View the full discussion<http://forums.adobe.com/message/6137980#6137980 -
Set "url" in HTTPService using String variable
Hi,
How can I set "url" in HTTPService using String variable (see below). I've tried different formats of string & variable concatenations.
privtate var myurl:String = "http://localhost/";
<mx:HTTPService id="post_submit_service"
url="{myurl+'test.php'}"
method="POST"
resultFormat="text"
result="result_handler(event)"
fault="fault_handler(event)">
<mx:request xmlns="">
</mx:request>
</mx:HTTPService>
Thanks,
ASMtry following:
url="{myurl}test.php" -
Using load how to have vars at end of url
I am trying to use load in AS3 to load another swf. I can not
get it to pass on anything in the url after 8.swf
for testing purposes I removed root.loaderInfo.parameters.cl
and in its place put what it would =
here is my code. I would really appreciate any help that you
might be able to give
import flash.display.*;
import flash.net.URLRequest;
var rect:Shape = new Shape();
rect.graphics.beginFill(0xFFFFFF);
rect.graphics.drawRect(1, 1, 350, 50);
addChild(rect);
var ldr:Loader = new Loader();
ldr.mask = rect;
var url:String = "
http://www.ironnations.com/led-scroller.swf";
var urlReq:URLRequest = new URLRequest(url + "?cl=rainbow");
ldr.load(urlReq);
addChild(ldr);There is a space in front of the URL string: Once I took that out your code worked fine.
var url:String = " http://www.ironnations.com/led-scroller.swf"; -
OSB - Load Resources From URL using proxy
Hi all,
How does one force the OSB to use a proxy server when using the Load Resources From URL option?
I'm trying to create a wsdl resource from an url, but the OSB needs to use a proxy to access the url.
I've tried creating a Proxy Server under System Administration -> Global Resources -> Proxy Servers, but I can't seem to find a place to make it use a proxy server?
How do guys and gals get wsdl files though a proxy?
Thanks!
WilliamHi Milan,
Thanks for your reply.
I tried setting -Dhttp.proxyHost=12.34.56.78 -Dhttp.proxyPort=80 in the startWebLogic.cmd file under the ...\domain\bin folder. But still can't download the wsdl.
Where did you set the property?
thanks again,
William -
Can I Send&Load Variables at the same time using php?
Hi
I have a php file that is using $_GET method to get the "id"
of an item and then a query will search the database and return the
results back. I am using the following code but there is something
wrong. Can anyone help me with this?
myVar = new LoadVars();
myVar.id = "1";
myVar.SendAndLoad("
http://localhost/sports/latest_news.php",myVar,"GET");
//<?php $out = "";
// $out .= "idn" . $i . "&" ;
// $out .= "titlen" . $row['sports_news_title'];
// echo $out;
//?>
myVar.idn
myVar.titlen
myVar.onLoad = function (success)
if (success)
for( var key in this )
//content is the variable name for the text object where the
output text will be displayed
content = this[key];
else
trace (" Error loading variables ");thanks for the fast response.
Its working but i want to display more than one results and I
am using:
myVar.onLoad = function(success)
if (success)
for( var prop in this )
trace (prop + ". " + this[prop]);
//trace(this.idn);
//trace(this.titlen);
else
trace(" Error loading variables ");
when i run the above code i get:
apos;s World Cup campaignidn. 7
apos;s conversionidn. 2
titlen. Bath still sitting pretty
idn. 1
onLoad. [type Function]
id. 1
how can i choose which details to display? -
Using load movie and load variable
Ok i am having a problem with my movie... when i test it
using test movie it is fine but when i preview in HTML or run the
SWF on it own i am having a problem... and i spotted the items i am
having a problem with but problem is i dont know why.
i am loading a movie dynamically in my main movie using load
movie
loadMovie("menu.swf",_root.i_dress2.i_content);
and in the actual movie menu.SWF i am loading a text
dynamically using loadvariable... but i am actually loading it into
the movie that has already been loaded into my main movie... maybe
it i will make sense when you see my line of script that is in the
menu.sef movie....
loadVariables("menu.txt",_root.i_dress2.i_content.arg.maskedText.scrollpage);
so i guess it is like i am loadingthe txt into the text file
after it is loaded into the main movei so that is why it is
referring ot the text field that way...
anyway it works fine when i go thorugh test movie but when i
preview in HTML the text doenst come out...
am i doing this thewrong way.? is there something i am
missing?
Thanks...any help will be appreciated!!You may be hitting a Flash 8 security issue that you cannot
load external
data using file:////path_to_your_movie/youmoviehtml in a web
browser. You
may need to use
http://thedomain.com/yourmovie.html.
Lon Hosford
www.lonhosford.com
May many happy bits flow your way!
"batgirl_Sa" <[email protected]> wrote in
message
news:e2v04c$lq$[email protected]..
Ok i am having a problem with my movie... when i test it
using test movie
it
is fine but when i preview in HTML or run the SWF on it own i
am having a
problem... and i spotted the items i am having a problem with
but problem is
i
dont know why.
i am loading a movie dynamically in my main movie using load
movie
loadMovie("menu.swf",_root.i_dress2.i_content);
and in the actual movie menu.SWF i am loading a text
dynamically using
loadvariable... but i am actually loading it into the movie
that has already
been loaded into my main movie... maybe it i will make sense
when you see my
line of script that is in the menu.sef movie....
loadVariables("menu.txt",_root.i_dress2.i_content.arg.maskedText.scrollpage);
so i guess it is like i am loadingthe txt into the text file after
it isloaded into the main movei so that is why it is referring ot
the text fieldthat way... anyway it works fine when i go thorugh
test movie but when i preview inHTMLthe text doenst come out... am
i doing this thewrong way.? is there something i am missing?
Thanks...any help will be appreciated!! -
Page Specific Persistence using Session Variables
Hi, I have read a lot about using session variables to persist the ReportDocument object across page loads. This works fine if you have just one page open with one report. The problem I am having is I have a web application that makes 30 or 40 different reports available to the user. To simplify the code and make it easier to add new reports I have developed a single template aspx page that can be used to view any of the reports.
My problem is that if the user opens 2 different reports in 2 separate tabs in the browser then the session variable persistence doesn't work because the session variable is available to both tabs.
Is there a way to persist the ReportDocument object which is 'page' specific.
ThanksYour best option is likely to have something that makes the session variable names unique. I've done such things as putting the current datetime in the url as a querystring parameter and appending that to the variable name. On each postback that querystring should persist.
You might be able to use the reportclientdocument object and serialize the report and persist through view state, haven't tried this with inproc ras though. A sample that uses the ras sdk can be found [here|http://wiki.sdn.sap.com/wiki/display/BOBJ/NETRASSDK+Samples] -
Load variables externally?
I am fairly new to flash.
Can anybody give me any advice on how to load variables from
an external file on my website that I can edit with a text editor.
I am making a flash intro to a website that has a pull-down panel
that displays information on new content on the website. It has two
variables in the main actionscript 3 code:
var gotoUrl:URLRequest = new URLRequest("
http://www.website.tld/newcontenturl")
var whatsnewText:String = "There is something new on this
website!"
The first one defines the url that a Go To button will link
to to allow the user to visit new content directly.
The second one defines the message displayed on the panel.
I am looking for a way to load these from a file I can edit
with a text editor like Notepad++ so I don't have to open flash to
update the content.
Can anyone give me any advice on how to do this?I changed something related to what that variable is used
for.
I replaced whatever with
"Text". This is used in an action that changes a dynamic
text field to say what is in the variable. So it would make a text
field say
Text. This part does work because before I tried your code I
had just set the variable in the actionscript with the var action.
instead of whatever I used
"Text"
Maybe you are looking for
-
Unable to install glassfish server in eclipse.
I'm using WinXP SP3 Oracle Enterprise Pack for Eclipse (12.1.1.0.1) Downloaded the oepe-indigo-win32.zip from http://www.oracle.com/technetwork/developer-tools/eclipse/downloads/oepe-12111-1560492.html On the Servers tab, right click New > Server the
-
Unable to find a WSDL that has a definition for service
Dear all I have a very simple composite applicationexposing a web service. When I deploy the application I get: There was an error deploying the composite on soa_server1: Deployment Failed: Unable to find a WSDL that has a definition for service {htt
-
Hi, How can I run an internal order report based on the cost center to which an order is assigned? I'll really apprecation your time and help. Thanks & Regards, Niki Shah.
-
How To Uninstall Background Apps Installed With CC
Hello, I attempted to install the PhotoshopCC onto a Windows OS7 computer - which went drastically wrong. I performed an uninstall - yet that left a background app that now runs even though I have no Adobe applications running. How do you uninstall t
-
Connecting to Datazen server on Azure VM
Hi, I have a problem with connecting to Azure VM. Microsoft Server 2012 is installed on the VM as well as Datazen Enterprise Server. If I try to connect to VM through web browser, Datazen control panel will load and everything works fine. But when