ActionScript 3.0 :: XML Read From Dynamic Or Web Location

Jan 23, 2009

I am working on a site which uses a flash menu I was handed. The flash menu uses an xml file to generate, it works fine as long as one stays at the top-level dir of the site, say [URL]. When someone enters a page, say [URL] the menu stops working, being unable to read the xml which is hardcoded to be in the same directory as the page it's called from (menu.xml is in /).

I must say that the locations visible to the browser are not real, everything non-top level in [URL] is just mod-rewrite, thus none of the directories test or page really exist. I can see the reason why flash looks in the same directory as the one the client requested for the file (instead of looking at the same dir locally in example).

So the two solutions I thought of:
1. Is there a file_exists function i could use to make the flash recurse upper-level directories until the menu finds the xml file? as in:
var menufile = menu.xml
while (!file_exists(menu.xml)) {
menufile = '../' + menufile
}
Obviously this is not real code

2. Is there a way to open the xml from a web location and not from a static path relative to the swf itself?

View 1 Replies


Similar Posts:


ActionScript 2.0 :: Read _x Location From A String?

Feb 19, 2011

I am playing with the Photo Gallery and trying to find the _x location of the tmumbnails

Code:
I could run a for loop i.e. X = 1 to 10
xlocation = "_level0.thumbnail_mc.t"+X+"._x";
trace (xlocation)

[Code]....

Any way of finding the x location of a range of thumbnails

View 2 Replies

ActionScript 2.0 :: CS3 - Dynamic Images Work In One Location, Not Another

Aug 25, 2009

I have a .swf that rotates through dynamically loaded images, like a banner of sorts. It secures the image names by loadVars-ing a text file. All this works fine and dandy on our test site -- everything functions flawlessy.

However, when we move the same set of files (same html page, same directory layout, same text file, same swf, same images) to another site, it doesn't work -- the swf runs, but it fails to load the images.

I'm told that this new site is on the same server, so it shouldn't be an issue of server settings.

View 1 Replies

ActionScript 2.0 :: Updating A Dynamic Text Box Location

Jan 22, 2009

on my onEnterFrame function, I just want to keep updating a Dynamic Text Box location. It's giving me more trouble than I anticipated, and the solution is probably very easy. I have spent 30 minutes (give or take) on trying to figure it out, but to no avail. This is what I have at onEnterFrame:

ActionScript Code:
_root.HPnum._y += _y - 60;
_root.HPnum._x = _x + 20;

Fairly simple, it's in the as code file that I want it to track. What happens is, it does get moved, but I cannot see it anywhere.

View 8 Replies

ActionScript 2.0 :: Loading A Dynamic Location By Html Var?

Aug 20, 2008

i have some problem...how can i load location from var in html?this is the html code that load the flash

Code:
<div align="center" id="flashcontent" class="virtual">This content requires <a href="http://www.adobe.com/go/getflashplayer/">Adobe Flash Player 9</a> and a browser with

[code]......

View 2 Replies

ActionScript 3.0 :: Dynamic Read-Only Var?

Nov 24, 2010

I'm creating a dynamic object containing multiple arbitrary properties. Developers can then iterate the object to get the properties and values, but i don't want them to be able to change the values.So... given a Dynamic object, is it possible to assign a dynamic property so that the property is only written once and thereafter is read-only?I triedobj["foobar"] = get function() { return "snafu" };

View 5 Replies

ActionScript 2.0 :: Read The Value In Dynamic Textbox?

Jul 17, 2009

For my problem, i using 5 random generated number and display it in a dynamic textbox, then i computed the 5 number using a formula and put the result in another dynamic textbox (name it as text_string). Then i create a button that function as to read the value in the text_string text box, for example, if the number is 5 then gotosomewhere, else terminated. Therefore, no matter what the result is the flash still terminated, it seems that the button unable to read the value in the text_string text box.

This is my code:
var newNumber:Number = Math.floor(Math.random()*3+2);
var newNumber2:Number = Math.floor(Math.random()*3+2);

[code].....

View 1 Replies

ActionScript 1/2 :: Make An Object Tween From Its Starting Location To The Location Of A Mouse Click?

Apr 27, 2009

I am trying to make an object tween from its starting location to the location of a mouse click. I have a script, but it has a very annoying ease to it.I would LIKE the object to mantain a certain speed during while traveling from its starting location to the mouse click location.

View 16 Replies

Professional :: Button File Opens In Saved Location / But Won't Open In New Location

Aug 21, 2011

I created a simple button that displays an error messeage: "error opening 'url" when I test the movie, but does play and opens in browser after publishing. However, it won't open in the browser in a different location. I pasted the html code in a web page but it doesn't work there nor opens in the browser in a differnet location from where it was originally published and saved. Why is that?

View 13 Replies

ActionScript 3.0 :: Dynamic Content (read And SQL Server)

Sep 27, 2007

Does AS3 handle connecting to SQL servers and using it's data or do you need an intermediary such as JavaScript to pass information to and from Flash?

View 5 Replies

ActionScript 3.0 :: Read/edit All Dynamic Texts At Once?

Nov 11, 2009

I have a flash that reads all it's content from an XML file, alot of dynamic texts, it's in AS2 and it uses Dynamic text variables to assign the text from XML to the dynamic text.

Now I'm migrating it to AS3, I can't use Dynamic text variables any more, I know I can assign it manually one by one, but I have more than 200 movies to migrate, and it would take a lot of time to do it.I thought of one solution: If I can read all the dynamic texts in the whole movie at once, I can build a nice loop to read them one by one and assign the text from XML to it's respective texts.

View 4 Replies

ActionScript 3.0 :: Dynamic Text Read Sideway

May 17, 2011

I'm trying to make a text scrollable. It is a dynamic text. The problem is that instead of reading up and down, [code...

View 2 Replies

IDE :: Dynamic TextFields To Read Everyday From Array 365

Feb 18, 2009

I have flash file with 5 dynamic textfields which reads everyday from an array 365 (year) inside the file what I want is to read from an xml file instead.

The first layer contains this code the arrays:
function make365() {
arr1[49] = "05:30"
arr2[49] = "12:35"
arr3[49] = "13:10"
arr4[49] = "15:55"
arr5[49] = "18:20"
[Code] .....

The stage contains 5 dynamic textfields each one named respectively quote1 ,quote2 ,quote3, quote4 and quote5. How can I make the function 365() reads from an xml file instead.?

View 1 Replies

ActionScript 3.0 :: Read Numbers For A Dynamic Text Box?

Mar 16, 2009

I have created a dynamic text box (named "numberString") inside a movieclip "circle" which is on the stage. Anyways, I have 24 frames in movieclip "circle", with numbers from 1-24 on different frames. These numbers are in "numberString".Since the animation allows the numbers to continually play over and over again, and thus the numbers are always changing, I was wondering: how can I 'read' the number that is playing when I, say, roll over it? I know the script for the roll over, but I can't figure out an efficient way to find out what number is playing when I put my mouse over it.

View 6 Replies

ActionScript 3.0 :: Dynamic Textfields That Read Xml-file?

Mar 24, 2011

I have a project with 4 movie clips. Inside each clip there are dynamic textfields that read xml-file. My intention is to view each clip(alpha 100%) for 10-15secs at a time. My question is how can I view only the clips that have content in their xml?

Lets call the movie clips mc1-4. If I only have text to view in the first two mc's how do I construct some sort of IF structure:IF mc3 doesn't have content to view, view mc1 instead of it and then mc2 and so on.

All the movie clips read the same xml-file they just view different content from it. For example: mc1 reads 10 first nodes(with its childs), mc2 reads 11-20 and so on. That is why I want to know because it is stupid to show empty tables.

View 1 Replies

ActionScript 3.0 :: Can't Get The Script Working To Read Dynamic Text?

Jul 17, 2009

ok, i have been working with this text to load in dynamic text fields. what I have is a movieclip called 'textInfo' inside this two dynamic text fields called 'headerTex1' and 'headerText2' where I want the text to load into from the XML file.the text should appear next to image that rotate on menu which has 25 images on the menu.What I am getting confused with is do I need to repeat the script 25 times with 25 differently labeled movieclips and text fileds,this is the script;

Code:
Code:
var textInfo:TextInfo = new TextInfo();

[code].....

View 9 Replies

ActionScript 3.0 :: Can't Get Script Working To Read Dynamic Text?

Jul 17, 2009

i have been working with this text to load in dynamic text fields. what I have is a movieclip called 'textInfo' inside this two dynamic text fields called 'headerTex1' and 'headerText2' where I want the text to load into from the XML file.

the text should appear next to image that rotate on menu which has 25 images on the menu.

What I am getting confused with is do I need to repeat the script 25 times with 25 differently labeled movieclips and text fileds,

[Code]..

View 14 Replies

ActionScript 3.0 :: Make A Dynamic Text Field READ-ONLY?

Oct 13, 2010

Basically I have a Dynamic Text Field, whose value should be derived from a database, BUT should not be allowed to be modified by a user! The same issue applies to an Input Field.

View 4 Replies

ActionScript 3.0 :: Dynamic Movieclips - Read From XML And Display Text With Links

Aug 1, 2010

I am wrtiting a code which later on will read from XML and display text with links. Below is my code.

[Code]....

my problem is with the mouse events. When I test the movie, only the last link change on mouseover and on mouseout event, not every movieclip.

View 0 Replies

ActionScript 3.0 :: Can Spam Read Text Inside A Dynamic Textbox

Oct 9, 2009

i think i read an article before about google or some SE teaming up with the Adobe Flash Developers in an effort to include flash pages into search results by allowing the text inside SWFs to be read by the SEs... not really sure about the details, but its something to that extent..

that's good news but what i would like to know is if spam bots can do the same and read text inside an SWF file?for example, if i have an SWF file with a dynamic textbox that has some text that contains an email address, will spam bots be able to read it?if this is the case, then i will just make the email address an image..but the benefits of having the email address inside a dynamic textbox is that it's selectable; making it easier for visitors to just copy the address as opposed to having to look at the image and type it manually...

View 1 Replies

ActionScript 3.0 :: Loader.loaderURL Returns "wrong" Location. [[DYNAMIC]]/9?

Feb 3, 2011

I have an issue where I am watching the value of: loaderInfo.url and sometimes it returns the url of my file just fine, example "path/myfile.swf and it is all good. Other times it will return path/myotherfile//[[DYNAMIC]]/9I found the following URL that explain it a bit

View 3 Replies

ActionScript 2.0 :: Move MC From One Location (x / Y) To Another Location

Feb 16, 2005

How can I move my MC from one location (x, y) to another location (x1, y1) wirh action script..?.. and I would like to have my motion tween rounded to (x,y) so it will look sharp.

View 8 Replies

Xml :: Flash - What Does Get Read From An Nonexistent XML Tag Read By Action Script 3

Aug 4, 2011

As the title says, suppose I have an hypothetical XML containing this:

[Code]....

I can check if a certain speech has a bg change by simply doing this:

if(bgs[i])
{
//true!
}

what should I compare in the case of sounds, I've tried many, like:

[Code]....

View 2 Replies

ActionScript 2.0 :: Basic Preloader - Dynamic Text Box Which Should Read The Variable "_root.loadText"

Jun 22, 2010

I admit I'm fairly new to flash, but I've almost finished an entire RPG battle system complete with music [etc. etc.] - but my problem is trying to add a preloader.. I have a basic page which says "Loading" and has a Dynamic text box below which should read the Variable "_root.loadText". In the first frame I have this code:

[Code]...

and in the second just "_root.gotoAndPlay(1);" for the updating process. I'm sure that's all okay. But when I export it, then upload the swf file to somewhere like SwfCabin to show people for testing purposes, they have to wait on just a blank white screen for 1~3 minutes.. -note: I use both Adobe flash CS3 [at home] and Macromedia Flash 8 [at school] - I can stick to just CS3 if needed.

View 2 Replies

Flex :: Read Dynamic Form Child Data In Flex?

Jul 20, 2010

I created a form dynamically by adding each component in action script,now i want to get back the text/data entered in to that each component dynamically?[code]...

View 2 Replies

Linux :: Intercept A Request To Read A Particular File And Instead Generate The Apparent Output Of That File Read Programatically

Mar 31, 2010

A friend of mine has a Flash Action script running on a LAMP server that currently reads an xml config file. He's asked me if it's possible to remove the xml file, and replace it somehow with a system (lets call it an 'auto xml generator') that intercepts the request to read that file and generates an output, so it appears to all intents and purposes as if the file still exists and contains the contents that has actually been returned from our auto xml generator'

View 3 Replies

Flash :: Read A Http Response Body When Tyring To Read Http Via Tcp Socket?

Feb 19, 2011

So I want to read http streams using flash tcp sockets. I do not really need the http header at all - all I need is body which contains flv. so how to read http response body into byte array using flash sockets?

View 1 Replies

ActionScript 2.0 :: Read Txt File - Script Dynamic Text Length According To Text Length?

Feb 5, 2010

do anyone know how to script the dynamic text length to the amount of text in the text file instead of manually drag it to the length?

Code:
myLoadVars_lv = new LoadVars();
myLoadVars_lv.onLoad = function(success) {

[code].....

View 0 Replies

Accessing A Location In One SWF From Another SWF?

Jul 11, 2009

I have a series of swfs that I've connected via loadmovie. This works well with I press the NEXT button, but not the PREVIOUS button. The PREVIOUS button starts at the beginning of the called movie. I need it to start at a specific location. Is that doable? If yes, how? I tried adding the gotoandplay after the call to the swf, but no luck.

View 2 Replies

Get Location With Flash?

Oct 28, 2010

is it possible to show my Town (find by IP) / Town of my Provider in Flash File?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved