Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder sea4me's Avatar
    Join Date
    Jan 2009
    Location
    Damn, I don't know...
    Posts
    390
    Thanks
    11
    Thanked 28 Times in 27 Posts

    Question Actionscript 2.0 get URL parameter...

    Hi!

    I'm trying to get a URL parameter in my flash...
    The parameter is a xml url...

    Code:
    	testXML = new XML();
    	testXML.load(_global.xmlurl);
    I tried every code I can find on the web and couldn't find a solution so I turned to CF...

    I also tried var _theParameterFromURL:String = String(_root.loaderInfo.parameters.xmlurl); but it didn't work...

    Here is my HTML:

    Code:
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="590" height="300" id="test" align="middle">
    <param name="allowScriptAccess" value="sameDomain" />
    <param name="movie" value="test.swf?xmlurl=data.xml" />
    <param name="menu" value="false" />
    <param name="quality" value="high" />
    <param name="bgcolor" value="#ffffff" />
    <param name="Flashvars" value="&xmlurl=data.xml">
    <embed src="test.swf?xmlurl=data.xml" menu="false" quality="high" bgcolor="#000000" width="590" height="300" name="test" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
    </object>
    Any help would be greatly appreciated!!

  • #2
    Regular Coder sea4me's Avatar
    Join Date
    Jan 2009
    Location
    Damn, I don't know...
    Posts
    390
    Thanks
    11
    Thanked 28 Times in 27 Posts
    anyone??

  • #3
    Regular Coder sea4me's Avatar
    Join Date
    Jan 2009
    Location
    Damn, I don't know...
    Posts
    390
    Thanks
    11
    Thanked 28 Times in 27 Posts
    Too noob of a question?? lol Guaranteed thanks for anyone that solves the problem :P

  • #4
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    The variables are made available in the main timeline without the _global prefix.

    Code:
    testXML = new XML();
    	testXML.load(xmlurl);
    This should work, another option is if you want to grab the data and then pass it to a function, just declare another variable to get the value of xmlurl and run with it.

    Code:
    var datasource = xmlurl;
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.

  • Users who have thanked gnomeontherun for this post:

    sea4me (06-28-2009)

  • #5
    Regular Coder sea4me's Avatar
    Join Date
    Jan 2009
    Location
    Damn, I don't know...
    Posts
    390
    Thanks
    11
    Thanked 28 Times in 27 Posts
    Thank you!!

    I did that and then I removed <param name="Flashvars" value="&xmlurl=data.xml"> and it worked


  •  

    Posting Permissions

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