ActionScript 2.0 :: GetURL From Xml Array
Oct 6, 2007i am still learning actionscript and i am tryin to make a dynamic xml menu. i have stored the url links in the xml file, but i cannot get the getURL function to work.
[Code]....
i am still learning actionscript and i am tryin to make a dynamic xml menu. i have stored the url links in the xml file, but i cannot get the getURL function to work.
[Code]....
I'm trying to get the code below to work, but no such luck:
Code:
var newsAry = new Array("news/040720.html");
for(i=1; i<=newsAry.length; i++) {
this["btn" + i].index = i;
this["btn" + i].onRelease = function() {
getURL("javascript:openNewWindow(" + newsAry[this.index - 1] + ",'newswin','height=400,width=450,toolbar=no,scrollbars=yes')");
}}
I'm trying to get the 'newsAry' Array to work in the javascript getURL action. When I use a regular html page in there the page works just fine.
I've created a 'flashvars' tag in my embed code (aid=test), which I simply wish to add to the end a GetUrl statement, contained in within a button (which is on the first level of the flash movie). This is the code I've added to the button...
on (release) { getURL("http://www.platinumselect.com?id="+aid);}
But this doesnt seem to work!? Is there anything else I need to do?
How i can use the function getURL with quotes? The reason that i need to quotes, is tu put a parameter to another function in Adobe Director.[code]...
View 1 RepliesHow do I use the getURL function in AS3 ?
View 1 RepliesXML test file
<Slides>
<slideNode linkURL="www.cnet.com" jpegURL="images/test1.jpg">test 1</slideNode>
<slideNode linkURL="www.zdnet.com" jpegURL="images/test2.jpg">test 2</slideNode>
<slideNode linkURL="www.pcmag.com" jpegURL="images/test3.jpg">test 3</slideNode>
<slideNode linkURL="www.newegg.com" jpegURL="images/test4.jpg">test 4</slideNode>
</Slides>
In the browser, www.cnet.com, does not work. The value it outputs is: file:///C:/Documents%20and%20Setting...w/www.cnet.com
ActionScript
----------------
slides_xml = new XML();
slides_xml.onLoad = startSlideShow;
slides_xml.load("slides.xml");
slides_xml.ignoreWhite = true;
[code]....
I want 2 open an image in a blank window, when user clicks on the button.I used the following coding to the button:
on (Press) {
getURL("www.domainname.com, "_blank");
}
But the above code is not working , when i click on it.
how to get variable from php and use its value to properly link button in flash?
example:
index.php contains variable VAR1 with value TEST
i need to crate flash with following button
on (release) {
getURL("http://www.test.com/index.php?VAR1=<<here goes the value of the VAR1 from php, which is 'test'>> , "_self");
I am customising a Template Monster template that has a flash menu.When I changed the getURL code (using AS2) of my flash menu buttons they work for an external URL but do nothing in my site. EG.THIS WORKSgetURL("index.html");THIS DOESNTI have everything in the same root folder and the animated menu bar works perfectly in-situ, just wont go from page to page.
View 2 RepliesI have a pre built flash navigation menu. I am trying to add a getURL code to the buttons. The code looks like this:
function butnClick(event:MouseEvent):void {
if (event.target.num == 0) { // For the 1st button:
// Add your button click actions here[code]............
Im getting syntax errors and I know its wrong but thats the only way I know how to write it so far.
I am using Flash CS3, AS 2.0 and I have a button with -
on (release) {
getURL ("http://www.axiomaudio.com/store.html", _blank)
}
This is a small banner in an HTML page and I want it to open in the same window instead of opening a new window. I have tried using _self) instead of _blank) but it still opens a new window.
Are there known issues regarding the getURL command in Firefox 3.5?I made a very simple flash movie with some getURL commands and they work in IE7 and IE8 but not in Firefox 3.5.[code]I just tested in Opera (9.24) and it doesn't work either...
View 1 RepliesSo we have some web-based training that we are making. Using CS4 to publish to Flash 7 and then the page is running in IE 6. (Got to love them corporate policies!) We have some resource documents for the users to download. Usually we make them pdfs and use getURL() and the files work just fine. However, this time we have a file that we want to keep as a .doc type. The code is:
[Code]...
getURL('http://www.google.com',_blank);
The above can open google.com,but how to fetch data from server side(PHP) on localhost?
I read it's possible to call any javascript [URL] so why would I need doFscommand ?
View 1 RepliesI want to add getURL() to flash xml gallery images.
at present my script is loading external images fine. but i need to give images hyperlink. [code]...
I've created a login form in Flash that should post to a php login script on a different server.
I've given one input text field a variable name of user (for the username)
I've given the other input text field a variable name of pass (for the password)
I'm using the following AS applied to a button:
Code:
on (release) {
getURL("http://www.website.com/login.php?username="+ user +"&password="+ pass);
}
[Code].....
I log in just fine to the site... If I attach the full code to the script I log in just fine... why is it that passing the variables is not working with getURL action script?
I've tried to accomplish this using several different scripts but I get the same result with everything I do.
I have modified simple photo gallery tutorial through XML at [URL] click on a thumb and an image scrolls in. Now I'm trying to add a link to the image - but can't get the url from the xml to the image.
Here's the XML-file (pics.xml)
[XML]
<?xml version="1.0" encoding="utf-8"?>
<images><image>
<pics>pics/utrechtmedia.jpg</pics>
<sites>sites/utrechtmedia.jpg</sites>
[Code] .....
I am loading in some text which is stored in a text object with the var name of jslink
I also have one button which upon press I would like to get the url of "jslink"
I'm having trouble getting urls to work with an XML document I'm pulling into flash.
The XML looks like this:
[CODE]<items>
<item>
[code].....
I would like to put getURL on all mc on the stage, I put the script like this
Code:
var _root.url_array:Array = new Array("url1","url2","url3")
for (var mc in this) {
var i:Number = 0;
[Code]....
the problem when I click on mc, it go to same url, how can I it different.
I did a quick search to find how to load a swf into an already playing swf with a getURL action. Is this possible? Like loading a jpg but I want to load a swf. Does that make sense?Say I have an empty mc in my swf and want to call a swf from an absolute address, like
getURL ("http://www.subquark.com/projects/demoA.swf", myEmptyMC);
I have not tried it yet 'cause I'm at work (no flash here) but I was talking to someone . . . about creating a logo once and then just calling it from one location (site by subQuark). That way I only need to update it in one place for html sites (as I do now) or for all flash sites (which I do per site now).
I have most of the basics down in actionscripting. I want to learn a little bit more on if else statements. I have an issue right now that I am pretty sure needs to use the if else statement.
What I have is an FLV playing in a browser. When that FLV is done playing, I want it to getURL to a different location. So basically when the FLV is done it goes to the next HTML page.
I attempted and got this far :
[AS]
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
[Code].....
My client's site exists on both http:// and http://www. and I have a flash navigation system on the site. All links are absolute values and work fine from the www subdomain but do not seem to work from the http:// domain. It seems strange to me as the links are absolute paths...
View 2 RepliesI developed a portable video player thats similar to YouTube's video player where you pass a video's info and the video loads and plays. The player can
also be embedded on your own personal site using the embed tags. My problem is this, everything with playing / loading the video works fine. But I've got a link on the Flash thats hard coded to a url and links off using getUrl like so:
getUrl('http://www.site.com', '_self')
Now this works if the HTML and SWF are in the same location (ie both local, or both on the hosting server) but for some reason it doesn't work in the embed mode when the player swf is located on one server and the HTML that's loading the SWF is on another server. XML loads fine, videos load, images load, but the gerUrl does not work...doesn't go anywhere. Also, I've got my crossdomain xml file setup to accept all domains using the * option.
I have a intro for a website using a FLV. I set two cue points ("start","end"). What I am trying to do seems very simple (when I started,LOL), at the end of the FLV have it go to another web page using the "end" cue point. Here is what I have:
[Code]...
I just was notified by a web viewer using Internet Explorer that some of my site functionality is no longer working properly in their browser. I have looked into the problem, and found that in IE (both Windows and Mac), my getURL functions don't work.On an actions layer, here is an exerpt of my code:
Code:
//-----------------------------
buttonAll.onRelease = function() {
switch (p) {
[code]....
Depending on the frame of the inner movie clip, the button goes to different html pages. This has always worked before, but perhaps now needs a workaround due to recent IE updates. A secondary problem i might also mention, has recently caused troubles in IE as well. I have an image on a page with a javascript link to open a swf file in a new window. This works fine in Firefox, but comes up with a page not found in IE, where it had previously worked.
Code:
<a onclick="popup = window.open('http://www.page.com/flash001.swf', ' ', 'height=480,width=650,scrollbars=0,resizable=0'); return false" href="http://www.page.com/flash001.swf" target="_blank"><img src="/files/Images/Features/Journeys/Story_Image/flashimglink.jpg" border="0"></a>
I have a flash banner that is a simple animation and some text, and at the top layer an invisible hit area button that has the following AS on it...
Code:
on (release) {
getURL(url, "_self");
[code]....
I can't seem to get the buttons I have created in flash to open in the same window.. I've tried
1. leaving it with no target
2. on (release) {
getURL("[URL]");
targetPath("_self")
}
3. on (release) {
getURL("[URL]", "_self");
}
I have made a menu in flash . I have a frameset on my page . I want the button to open the link in a specific frame (my frames are bannerframe , leftmenu , rightmenu , bodyframe) . The menu is in the "leftmenu" frame. But whenever i use this :
Code:
getURL ("xyz.html", "bodyframe")
the page opens in a new window .. ( i have tried in all browsers chrome firefox IE etc. ) ....