IDE :: Pull URL From A Xml File?
Sep 14, 2009I'm trying to pull a URL from an xml file, but have come up against a problem that I cannot solve.
The XML looks like this:
Code:
<photos>
−
<photo>
[Code].....
I'm trying to pull a URL from an xml file, but have come up against a problem that I cannot solve.
The XML looks like this:
Code:
<photos>
−
<photo>
[Code].....
is there a simple way to just pull back a true or false value from an associated javascript file to a flash file? here is what i have:
Code:
var bincheck:Boolean = fscommand("eval", "parent.check_bins(\'"+img+"\')");
if (!bincheck){return false;}
return true;
check_bins(img) is a function in my javascript file that simply iterates through an array, returning false if "img" is found. im simply trying to get the true or false value back into flash, but its not proving that simple. i added a couple alerts so that i could see what the "bincheck" value was, and i keep getting an 'undefined' value for "bincheck" in flash.
EDIT: New problem, post #5 Say I have a flash website made, and to allow for minor information changes to be easily made by someone without flash, they can simply open, edit, and reupload to the webserver a text file that contains that page's info.So, how can I have flash pull text from a file, and always do that every time it's ran (ie, not have to republish a new swf)?
View 4 RepliesWhat I'm trying to do is to get flash to pull the actionscript from an external as file.[code]
View 2 Repliesim able to pull in an xml file, and push all the data in to arrays. Im pulling out this data and performing calculations on it. Now, iv created a varialble called _global.newLocation = _global.percentage*100;
which equals my percentage change, multiplyed by 100. It works because i have used trace and you can see it.
I would like to then take all these newLocations and put these in to an array so i can refer to them by their index but i just cant seem to get it to work?
I am working on a project for college and was wondering does anyone know how to get the autocomplete working in AS3.From what I have read I can only see how to do it wth AS2!I need the autocomplete to pull in suggestions from an XML file!
View 7 RepliesI am trying to dynamically pull up the city and state all within the swf file.
So if a user goes to my site from San Diego, CA. There would be a dynamic box that says San Diego, CA.
I am trying to make a banner like item for a website I am working on, I have 1 external text file 4 external swf's and 1 external .jpg.that I am trying to get to do this:on page load display img1.jpg for 60 seconds and then randomly select a number and then display the file that is associated with that number, for 60 seconds, and do it again, and again until all of the text and swf files have been displayed and then start over from the beginning,Now I can get it to select a random number and then pull up a file that is associated with that number with this code.I have shortened the time to see it work but still no avail.Example random code:
Code:
Movienum = Math.floor(math.random()*5);
if(Movienum == 0) loadVariableNum ("loaded_Text.txt", 0)
if(Movienum == 1) loadVariableNum ("1.swf", 0)[code]...
Now with the SetInterval I tried this and wound up with squat.I am starting to get Desperate.New Example code:
Code:
Movienum = Math.floor(math.random()*5);
function countDown() {
if (Movienum == 0) {[code].....
I'm trying to pull in dynamic text from a txt file and display in a web page. The text works great when I view the .swf, but when I place the .swf in a web page the text no longer appears. I'm using loadVariables("text.txt", ""); in my ActionScript and text.txt is located in the same directory. I have embedded the fonts and I'm using Flash CS5 and I have selected Classic Text/Dynamic Text.
View 2 Repliesim trying to pull attributes from my xml file for use in a dynamic text field but cant seem to get the actionscript dialed in properly. i have a php script which parses the data as attributes rather than nodes...so my actionscript must use these attributes!
[CODE]...
build an image gallery on a site i'm building.The way I have built the site use sactionscript to pull the each different page through as an individual swf file. see: http:[url]....The page im putting the image gallery on is 'Virtual Tour'.When I test this specific page in flash it works fine, however when I view the master flash file and click 'Virtual Tour' then it doesnt pull the images through. Im not sure why this is, as if you view the swf directly then you can see the images do work: http:[url]....
View 4 RepliesI have listbox which load the names from the xml file now i want that when i select the name or item in the list and click on get button it opens the corresponding url (which is in the xml file)...
however it doesnt load the page instead shows textbox and problem loading page error.
I need to pull the XML below into flash.
I need the <name> , and the <coupon><title> and<link> </coupon>
Example display in flash would be.... Apple Bees Trivia Tuesday & BARGO Wednesday Coupon link here
Here is the sample XML...
<merchant>
<logo>Logo link</logo>
<name>Apple Bees</name>
[Code]....
I'm trying to create a pull down menu. Not one that drops down when rolled over but one that drops down when clicked and stays down until an item is selected. Once an item is selected or the menu is clicked out of it retracks again.
My strategy is to create a movie clip for the initial menu that when clicked jumps to another movie clip where ther menu is extracted and houses movie clip buttons that hightlight when rolled over and when clicked redirect to another movie clip related to the button that was selected.
is this the proper way to do this? And second: can you offer some direction for the action script?
I think that you can do this using html but if you have a PDF in your root directory will Flash be able to link to bookmarked pages in that document?
View 2 RepliesI have a script that always returns iframe HTML back to flash. I was looking to get help on how to build some RegEx code to only find the URL. I would only like this substring so I can use it in another script.Here is the iframe code the I want to search for and return the substring:
HTML Code:
<iframe SCROLLING="no" id="myFr" style="width:660px; height:500px; border:0px; margin:0px; padding:0px; overflow:hidden" src="http://www.blabla.net/sdsdsd/?ut=wecsdsd&lang=EN"></iframe>
This is then best O could come up with but unfortunately.... it returns src=" too.
ActionScript Code:
private var _findTheURL:RegExp = /src=u0022(.*)u0022/i;
In CS4, using AS 2.0, I'm using loadMovie to pull in different ads (swfs).This is working great, but one swf is not getting along. It was coded in AS 3.0, and some content beneath masks is not displaying correctly.I obtained the original fla file, but still can't come up with a solution.I tried setting it to 2.0, but then none of the AS works.I don't know Actionscript very well so rewriting the ad's functions is not an option.convert the swf I'm trying to load in? Or an alternative to loadMovie in 2.0?
View 3 RepliesI am using flash CS4, AS2 and have had a client request for something that I'm not sure is possible.
I have created a calculator that calculates the cost savings that my client offers their customers. There are many options available in the calculator and it is quite in depth. At one point there is a pull down menu where the site visitor can choose their product, then enter the amount they pay for it currently. If their product is not listed, the site visitor can choose "other" from the list.
Is it possible that when the client selects "other", the text IN the pull down component for that option could be dynamic, so that the site visitor can enter the name of their product? The product they enter does not need to be submitted anywhere, nor does it need to remain upon that visitor's next visit. It simply needs to be there for the duration of their current session, to help the client keep track of what product they are comparing.
I just started making some simple banners for web sites. I got a new one to do this morning, and I was asked to make a button that says drag/pull here. as you drag/pull down, it reveals the layer below it. Also, as the button reaches halfway, it needs to go all the way automatically as well, so the users don't have to drag all the way down themselves. Is that something I need to do in actionscript
View 3 Replieshow to go about searching for this since I don't know the terms used for it. I am trying to make an interface to use on a website that would have to pull up images and text with no preloading. Think of an online encyclopedia; you put in a word and it pulls up the object/animal/etc with a description. I am looking at needing to pull up thousands of different things; hence the no preloading.
View 2 RepliesI'm using Flash CS4 as my IDE with Actionscript 3 and Flash Player 10. I'm working on a bigger project but the area I'm struggling in is dynamically pulling an image from the flash library (already loaded). I've been finding the same answers to my question all over and they seem to keep producing the same error so apparently I'm just not getting some little detail. I have an image loaded in the library called test1.jpg. I've right clicked on it and selected 'Export for ActionScript' and 'Export in frame 1'. The class is 'MyMc' and the Base class is 'flash.display.BitmapData'. My code is attached.
and it produces the following errors:
quote:
1136: Incorrect number of arguments. Expected 2. 1067: Implicit coercion of a value of type MyMc to an unrelated type flash.display:DisplayObject.
How could I get the XML data in to a text box?[code]...
View 8 Replies1. In mysql db, I created a field called "logo" and made it a 'blob'. Using the BROWSE button in the mysql db I uploaded a 10KB logo. Is that correct? will I be able to pull the 10KB logo from PHP?
2. WHy isn't the image been comming in to flash? Will the code marked in red do it successfully?
[Code]....
3. 'ruth.jpg' is my logo name. Is my code correct in pulling it? echo '<img src="'.$line["logo"].'" alt="ruth" />';
I know how to pull data from a row of an mysql db. But how do I pull the data on the same COLUMN in a MYSQL db? What do I need to send to the server side script?
E.g. The mysql holds 2 field names "COMPANY" and "CONTACT PERSON". How do I pull all the COMPANY names only?
Currently in Flash I am trying to pull in a value based on the querystring. Example..
[Code]...
This works in the main flash actionscript, but I need the querystring in a class constructor that I created. How can I pass the querystring to a separated out actionscript file?
im trying to pull .swf files from MySQL by using PHP, ive set everything in the database up with an ID and licked it properly. Im not sure if the 'type' has to be anything special, right now its just a 'VARCHAR' and when altering the javascript part of it that that flash automatically generated-- in the i tried to echo it out by putting it in the value like
< param name="movie" value="<?php echo $row['video_path']; ?>" />
I am currently designing a set of actionscript charts for my company's website. For the set of charts I have set up right now I'm reading all the data from FlashVars, but as you could guess that's not a very good format for charts...
I'd prefer to use a JSON array of values,
now my question is: Where should I go to start learning about reading from JSON is AS2? I'll hit the books, of course, but this forum is always good when I need to get some advice to dive right in to an urgent project
How do I pull in flashvars in flash. I have a html form with variables with 5 fields.
View 2 RepliesI am running into a frustrating problem at the moment, I want to pull a node from the XML and it has a an attribute of "class", but it automatically gets highlighted to blue because flash thinks its a class.[code]...
View 4 RepliesI've got a section in my code where I am trying to pull up a particular xml node based on an id value I have. When I try to pull it up via the method shown the code stops executing at that point. In other words, the "got here" is traced but neither of the two lines after it or any code below that point in the function seem to get executed. If I take that line out the code executes just fine. I'm using this same xml object in many places and the xml data is fine it is just when I try to use this syntax that it gets confused.
I'm also a bit confused as to why the code just stops. I realize that flash doesn't generally display errors at runtime, but if it doesn't show up as a compile error or warning what is the best way to avoid the code hang up? Also is this the correct way to access the node? I actually am trying to retrieve the team attribute on the same node with an id that I'm using in the xml search query. Should playXML.players.(@id == '18431').@team get me that value? It seems to cause the same behavior any time I try to use that syntax even with other attributes from the player nodes and if I use something like playXML.players.@id it returns all the nodes id attributes.
Code: Select alltrace("got here");
trace(playXML.players.(@id == '18431'));
trace("also got here");
Here is the xml:
Code: Select all<?xml version="1.0" encoding="utf-8"?>
<play>
<players>
<player id="18431" pos="LOT" realpos="OT" name="TT1 Tackle 4" team="1509" number=""/>
[code]....
Edit:I dropped a try/catch statement around this block and that solves the code execution issue but I still can't access the node I want with a given id using the playXML.players.(@id == '18431') style syntax.