ActionScript 3.0 :: XML File Not Reading In Properly When Linked Offside?
Dec 20, 2009
it is my first time reading in XML files into my Flash project. I have it working to an extent, as it will read in the file correctly and all that, and I though that I was finally ready to publish it. I copied all of the concerned files over to my server, and it will work perfectly fine when I view the flash from the uploaded link directly (right on my server in the folder I created it in).
My problem arises when I try to publish my project on another website, by just embedding the .swf directly. The project works perfectly until I click the tab that will read in the XML file, at that point it will just hang and not load it in properly. Since it was my first time using XML, I played around with a template a bit to learn it. Anyway, here is what I put (Well, example of what I put)
Code:
flashmo_page1.load_xml("http://mywebsite123456.com/directory/flash/flashmo_197_page_1.xml");
I though that linking directly to my file on my website would make it work, but it still hangs.
View 3 Replies
Similar Posts:
Dec 29, 2010
I am trying to import an xml file with multiple sections of HTML. It looks like:
<?xml version="1.0" encoding="utf-8"?>
<htmlcontent>
<application>
<title>Site Deployment</title>
[Code].....
Whenever flash sees an html tag such as <p> or <img src=""> it stops reading the xml file at that point. I currently have it working with each application in its own xml file, but that is messy and I would rather it all be in one place.
View 2 Replies
Sep 30, 2010
Basically, I have alot of text that needs to contain underlines and all that good formatting stuff that flash text can't do. So I created a dynamic scrolling text box, loaded in an external txt document containing all the right HTML tags for flash. But for some reason the flash cuts off the text. It won't show all the text I have. I noticed that it seems to be cutting it off in SOME (not all) areas where I have a hyperlink.
View 1 Replies
Sep 17, 2010
to get a proper content of the following xml-node:
Code:
<item>
<![CDATA[about
[code]....
what is the correct way in as3 to get the content so that the " " linebreak stays intact?
View 1 Replies
Sep 29, 2010
Basically, I have alot of text that needs to contain underlines and all that good formatting stuff that flash text can't do. So I created a dynamic scrolling text box, loaded in an external txt document containing all the right HTML tags for flash. But for some reason the flash cuts off the text. It won't show all the text I have. I noticed that it seems to be cutting it off in SOME (not all) areas where I have a hyperlink.
View 5 Replies
Nov 29, 2011
How can find out the linked url of the image in the flash of a website? I looked for the image url some time. but couldn't find itif find the linked url of the image, and i want to alter an image linked url address. where is the code in?
View 3 Replies
Jul 27, 2009
On the mxmlc command line, I can include paths to RSL files. I can choose to link these RSLs at runtime by setting
-static-link-runtime-shared-libraries=false What if I need to link to some rsls and embed (static-link) other rsls? Is there a way to set the link settings for each rsl?
View 1 Replies
Jan 26, 2010
Sounds simple enough. I have a number of swfs (quiz01.swf, quiz02.swf.....) all linked to one quiz.as file. The quizes in turn are loaded by another swf, Main.swf. I need to get the name of the specific quiz that is loaded, so I can identify an external xml file.
Tried using the "loaderURL" in the as, but it gives the name of the Main.swf. How can I just get the name of the swf that is associated with the quiz.as file?
View 5 Replies
Jan 20, 2010
I am wondering if it is possible to use random file access for reading and writing data to file in Actionscipt 3.0 similar to that what is in Visual Basic?
View 1 Replies
May 16, 2005
I turn to you for help, dear sweet Kirupa Forumites. First, let me explain the problem: I have a flash file reading an external text file for the content. Everything works perfectly for nearly everyone - you click a menu button, and the content text comes up fine. However, a couple of people have found that the text shows up as "undefined". I have checked the player versions of the people where it doesn't work, and it is the same as for those where it does work, so that ain't the problem.
I don't understand why it works perfectly for nearly everyone, but a small number of people have this "undefined" text problem. It seems to be a problem with loading the external text file, but I don't know why. I have a main flash movie, and load the text in the first frame, using the following:
var my_content = new LoadVars();
my_content.load("content.txt");
my_content.onLoad = function(success){
if (success){
[Code]...
I then have a couple of dynamic text boxes in the main movie - one called ErrorText (for displaying an error message to the user) and one called ContentText (for displaying the content). I use an external menu swf which jumps to a specific frame in the main movie, depending on which button is clicked. Actionscript on the main movie frame for the first button does the following, with the other frames similarly configured:
ContentText.htmlText = my_content.content1;
stop();
My external text file is properly configured (content1=blah blah&content2=other blah blah) etc.
Does anyone have any advice on how I can solve this particular weird problem??
View 3 Replies
Aug 18, 2011
i need to create objects with a unique name with a loop in a way that i could get this...
var n1:node=new node(12);
var n2:node=new node(22);
var n3:node=new node(32);
[code].......
View 1 Replies
Jun 11, 2011
Which is preferred and why: keeping the AS in the Flash file itself, or linking to the .as with the Flash file. I've seen both done. Is it just a matter of preference?
View 4 Replies
Aug 6, 2010
I have Flash CS3. I have created a flash file. If I click on the SWF file I have no problems opening it It plays. It looks nice I'm the man.However, now when I try to publish it, the HTML file will not work. It says "windows cannot find this file,you have typed the location correctly".I am double clicking directly on the file and not typing anything, in fact I was considering checking on Ebay to see if I could upgrade my PC to have eyes.The feature has worked previously, which leads me to the conclusion that something else has changed. I have tried using the publish setting, I have also tried using Dreamweaver to embed the file, and have also tried manually inserting the necessary code after seeing some on a website.
View 4 Replies
Feb 23, 2011
I have a FLA file that has a AS file linked via the document class.
How do I remove the link from the documnet class and the place an import on the timeline to do the same thing ?
View 4 Replies
Jan 3, 2010
I am working with a Flash template that includes a window linking to an XML document. We are trying to have three scrollable columns instead of what we have now which is the one block of text provided through the XML document.
View 21 Replies
May 18, 2010
im trying to make a website based on flash.and im trying to link flash to XML.And here is my problem.I have a layer called "Pages", and im working in one of the pages.I made a timeline, which also had few more pages (5 to be exact).I want to load 1 linked image (as in you click on the image and then load something) on each of the 5 layer based on XML File, and when its clicked it loads on a new page in the "MAIN" site. If thats possible. How would I make that happen?
View 3 Replies
Jan 22, 2010
I got a problem, there I have two movie clips each is linked with action script file. The first movie clip "level screen" has a loop (code is not shown there) in it's code which addChild a lot of same icons (but each has different number) and add them to array levelArray. Then when I click a icon, for example one with nmber 31, it addChild the other movie clip "main screen" and send it a variable "levelNumber" with value 31, so mainScreen could then addChild a level 31. Below is the code for levelScreen checking what icon is being clicked and taking right actions. However first I will write how i imagined this to work step-by-step
1. The timer activates the loop over and over again, so when it comes to end, it starts again.
2. The loop loops through array called levelArray, in which all icons are stored.
3. Inside the loop it first defines a variable checkIcon which is the icon at which the loop is.
4. Now there the things get complicated, I want to add a MouseEvent listener to icon, if it would be triggered the function "onLevelButtonClick" should be executed, and the I want to remove the listener again, so I wont have 1000 listeners on same icon after some time.
5. And the function dispatch event which add main screen and send it a variable levelNumber, which should be number of icon clicked.
[code]...
View 7 Replies
Apr 6, 2009
I am dynamically loading external SWFs in a Main Fla in response to clicks on a menu.
The loading code is standard and works fine for all of the SWFs except one. When I try to load it I get the following error: Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.
I am certain that the URL to the problem SWF is correct. The SWF itself doesn't load any other SWFs or images. The problem SWF is linked to an external class file and compiled with it. i.e. in the properties panel of the main timeline of the problem SWF's Fla I have entered the path to the external class.
1. there is no problem compiling this SWF with the class (it works fine by itself)2. if I remove the external class from the properties panel and don't use it the resulting SWF imports without a problem into the Main Fla mentioned before So the problem seems to be the fact that the external class is linked in the properties panel. Is this a path problem?
View 3 Replies
Dec 9, 2008
I have a tricky problem. I've been working on a flash quiz that uses a xml file to generate questions in a random order. Got that working fine. The Fla parses open the file and loads the nodes into dynamic text boxes.
[Code]...
View 1 Replies
Aug 28, 2010
i've been all afternoon trying to figure out a solution to my problem, and I can't seem to find it, or cannot implement it. Let me lay it out for you: I have an actionscript file linked to a movieclip. (movieclip:skate class linked: generic_skate).I have it set up that way so I can create an array of skates easily (i'm using a for loop to create them), and each skate has its own attributes (name, description, price and the image that is supposed to go on the deck)In the stage, i have three text boxes, one for the price, other for the name, and another one for the description.In the generic_skate class, I'm handling all the mouse events (in this case mouseOver and mouseOut.
What i want to accomplish is: when the user hovers over a skate, the info shows up in the text fields and when he hovers out, the info goes away. My problem: Since I'm doing all the mouse interaction in the class file, my guess is that I have to access the stage to get to the text boxes that are placed there to change its info or somehow create a "middle" man to do all the handling.
View 5 Replies
Oct 19, 2009
I would like to have two applications communicate with each other. One app is a Flash running the browser and the other one is another app of ours that is distributed as *.exe file. We need the C/C++ application to read some info out of the SOL file, that is written by the Flash app.
Any other mean that can be used to read the SOL file from a C/C++ application? How often is the format of the SOL file being changed ?
View 1 Replies
Apr 22, 2010
What I have so far...sure there is a better way to do this and as I learn AS3 I will figure it out. The following is what I put together where I now have three instances of the segmented thumbnail button that shows an image when cliked on. What I figure out why it only reads the one xml file.
My XML files: images, images_a, images_b
<images><image full="images/full/image1.jpg" thumb="images/thumb/image1.jpg" /> <image full="images/full/image2.jpg" thumb="images/thumb/image2.jpg" /> <image
[code].....
View 4 Replies
Apr 23, 2010
I'm trying to read a url from an xml file and attach an onRelease event to a movieclip that opens the url when clicked.
Code:
var thelink = getValue(findNode(i, "link")).toString();
var thelink2 = "../news/Press Releases/testpdf.pdf";
if (thelink <> "")
{
tempMC.bat.onRelease=function(){ getURL(thelink); }
}
If I use the "thelink" variable as input to the getURL function, I get a "Page not found" error.If I use the "thelink2", it works as expected.When I look in the debugger, "thelink" and "thelink2" are identical!Here is the code for the findNode function. I've had no problems before with this code, so I don't think the problem is there.
Code:
function findNode(node, nodeName)
{
if (node.nodeName==nodeName)
[code]....
View 2 Replies
May 18, 2010
I was wondering if there was a way to have a flash file read its own flash name and use it as a variable within that swf. ie, 05.swf. I would want 05 to be a variable with the page.
View 2 Replies
Nov 4, 2010
I have a couple variables coming from PHP. So for example if my PHP looks like this:
PHP Code:
$qry = "Select * from memory";
$result = mysql_query($qry);
echo "memory=";
while($resultset = mysql_fetch_array($result)){
echo $resultset['name'].";".$resultset['memory'].",";
For this the output from the PHP file would look like this:
memory=Person2;Memory2,Person1;Memory1,
So basically the comma represents a new record in the database. So basically in my text field I'd like the following result to happen:
Memory: Memory2
From: Person2
Memory: Memory1
From: Person1
So take the first record and display it like I've shown and then have a couple break lines (not sure how to accomplish this either) and display the next record that was separated by the comma.I have the following AS code which works for one variable but I have more then one like above:
ActionScript Code:
files = new Array();
lv = new LoadVars();
lv.onLoad = function() {
[code]....
View 4 Replies
Sep 16, 2008
i'm trying to read a txt file (well actually, the file has a different extension but it's a simple txt file). i have a path in that file that points to a jpg that i want to load. if that path has a plus sign (+) in it, the actionscript reads it as a space!
View 2 Replies
Oct 24, 2011
I am changing the flashvars variables v1=value&v2=value ect then after the flash movie runs I am changing the variables externally by javascript, so far so good.when flash first loads it reads the vars correctly.when I try to read them ( after the change ) it keeps reading the old values.[code]everything works except I cannot seem to read the changed FlashVars.
View 1 Replies
Feb 9, 2009
I am making a random name chooser for a class (using an array to read from 28 names). I was wondering if it is possible for flash to read an array from a notepad file. [code]Is there a way to make it so that instead of having to edit the Fla file to edit the names, I can just make a notepad file with the array and _root.NumberOfStudents variable so that it can be edited from year to year easily?
View 3 Replies
Mar 5, 2012
I remember that I tried it on my friend's laptop and it worked. I am using a trial version of flash and is a beginner?
View 4 Replies
May 31, 2010
How to read data from XML file in flex?
View 4 Replies