Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash








Problems Loading External Data


I've got two problems.. Please bear with me as it's kind of my first time using flash... ^.^;
1. I need to load some text from an external txt file, but it doesn't seem to work quite right.
In a test (this is for a project, and since it's inundated with things I've been using test files before trying code in the main file), I've set up a dynamic text box, multiline, named it 'vampinfo'. Then I wrote this action script, put it on the stage, and it says this:
loadVariables("vamp_info.txt", vampinfo, "GET");
Obviously supposed to read in info from the file 'vamp_info.txt'.
I also set the text box to have a black border.
When I test the movie, the black border flashes quickly, but no text ever shows up, and the output gives me this:
Error opening URL "file:///G|/vamp_info.txt?my%5Fmcl=%5Bobject+Object%5D"
each time it loops the movie. I'm not sure if it's having problems because of code, or if it's having problems reading from my flash drive. It's a small movie, so I haven't had to send it to the desktop to work from it, like the main project. But then again, it didn't work when altered for the project and that was all on the main drive...
On the other hand, might it be because i haven't figured out how to pull out the information...? I mean, in the next example for this, since it's a movie clip, it's got lines like these: artist = artistdatamc.artist1
since the text file has lines like &artist1=Yaddda Yadda Yadda. The Vamp. text has a &name= lsjfldskj line...
Also, if a file is in another folder, how do you write the path for that...? ^.^;;; (deeply embarrassed) The project has most of the text files ordered into different folders for organisation, so... (the files referenced so far are all in the root, of course. :P But for later...)

Oh, also, we (it's a group project) asked another professor for help, and while she suggested using this:
_root.createEmptyMovieClip("artistdatamc", _root.getNextHighestDepth());
loadVariables("data2.txt", artistdatamc);

artist = artistdatamc.artist1
artist = artistdatamc.artist2
artist = artistdatamc.artist3
artist = artistdatamc.artist4

But that hasn't worked in the main project, either.

2. The other item I'm having trouble with is getting an external swf to load into a movie clip. There will be a little scrolling line of thumbnails, but they're different based on which section you're in, so yeah.
We tried this, but of course, it didn't seem to do anything:
createClassObject(mx.controls.Loader, "loader", 5);
loader.contentPath = "screenslider_interactive.swf";


Thanks in advance, and sorry for these probably being pretty elementary, or something. Just got stuck being 'lead programmer' for the group before they decided what language to use... ^.^;;;




ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 03-17-2006, 07:23 AM


View Complete Forum Thread with Replies

Sponsored Links:

Loading External Data
hi there,

i have en empty mc containing a textfield. by pushing a button an external text file is loaded. so far so good. by pushing another button an image is loaded into the same mc.
the problem is, after loading the img, it's not possible to load the text again.
has anyone an idea how this could work or do i have to use different empty mcs?

every help appreciated

View Replies !    View Related
Loading External Data
I made a movie, that loads external swf files, but when i published it o the web, it crashes and after the forth movie it restarts

what should i do?

View Replies !    View Related
Loading External Data
on (release) {
_root.holdermc.loadMovie("mov1.swf");
}

As you can see.... I am loading an external swf into my movie clip instance holdermc. Is it important to unload this mov1.swf before loading another external file into the holdermc? It seems as though everything is working fine without unloading the external swf. Although I'm wondering if after I load a new movie clip into the holdermc if the previously loaded clip still remains behind the presently loaded clip. If this is the case... after loading multiple movie clips the website could require alot of memory.

Just wanted to know if I should unload the external swf after loading it, or if it was not necessary.

Thanx,
p2studios.com

View Replies !    View Related
Loading Data From External .txt
Hi there!

Can someone tell my why if I try to load data from an external .txt the tags b and strong doesn´t work in MX2004?

I can not see the text between these tags but the rest of the file loads well.

Thanx in advance.

Les.-

View Replies !    View Related
Loading External Data
I have an external text file that will have two variables and look like this:

&months=January,February,...&days=Sunday,Monday,.. .

I am using loadVars to load the textfile in. When it is done loading, I want to load each of the of the 2 variables into an array so I have an array for months and array for days. Can anyone help me with this.

Thanks... Bubba

View Replies !    View Related
External Data Loading
I've found myself with the need to create a myspace style music player. When users visit a bands page the bands songs should be retrieved from the database and loaded.

What is the easiest way to do this, there is a variable, $uid, on the profile page that can be used to find the tracks needed. But what is the best way to get them into flash. Users will probably have three or four tracks so the data might be a little large.

Thanks in advance

View Replies !    View Related
External Data Loading
I create a image gallery, but i have only know (loadMovie) command, how we load external data (images or html files ) using XML way? Slide through images? count number of images loaded?

View Replies !    View Related
Loading External SWF Data
Hi,
I have written a script to load an external swf. That swf loads many images from its own loader. I'd like to be able to access its loading process. I have written these lines to do that but it gives me loading completed after loading the swf file not its data:


ActionScript Code:
var loader:Loader =new Loader();
var req:URLRequest = new URLRequest("MyFile.swf")

//the red loader
var outLine:Sprite= new Sprite();
var inLine:Sprite= new Sprite();

var g:int=0;

var obj:MovieClip = new MovieClip();

loader.load(req);         
loader.contentLoaderInfo.addEventListener(Event.OPEN,startLoading);
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,ProgressLoading);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,completeLoading);

addChild(outLine);
outLine.addChild(inLine);

function startLoading(e:Event):void{
    //draw the loader
    outLine.graphics.lineStyle(1,0xB70908);
    outLine.graphics.drawRect(0, 0, 100, 10);
                       
    outLine.x=130;
    outLine.y=300; 

}

function ProgressLoading(e:ProgressEvent):void{
    if(e.bytesLoaded == e.bytesTotal){
        g++;
    }
    //draw the progress loader
    var sum:int=(g)*100;
    inLine.graphics.lineStyle(1,0xB70908);
    inLine.graphics.beginFill(0xB70908,1);
    inLine.graphics.drawRect(0, 0, sum, 10);
    inLine.graphics.endFill();
                       
    inLine.x=0;
    inLine.y=0;
           
}

function completeLoading(event:Event):void {
        removeChild(outLine);
    obj = event.target.content.myItems; // myItems is a public class in the external swf

        trace(obj.anyValue); // anyValue is public variable in myItem class
   
}

If I tried to access any member of obj, it gives me null but if I put this code in button event function and wait for a second and try to access it, it gives a successful value. So, I need to link this loader to the external swf loader.

I will be very grateful if some one can help me.

Thanks,

View Replies !    View Related
Loading External Data XML Or CSV?
Having done loads of it in the first few years of this century, I've not done much Flash in the past few years, been focused on PHP/MySQL Development.

Anyway, I now need to use the data from a MySQL database offline in a Flash executable so I'm jumping back in with AS3. There are several tables involved and I can write a script to export the data to whatever format is best.

XML or CSV?

Should I get it all into one file with all the data or is it possible to do the quivalent of joined queries once the data is in Flash?

I don't need a full explanation at this stage, I'm just interested in some opinions so that I hopefully set off in the right direction.

View Replies !    View Related
Loading External Data Using XML
Hello can any one give me a hand...

I making an application for our architecture that will be able to load images using an external XML file that can be updated rather quick when we go to meet other clients to show them our work...

Here are my issues:::

I have two nav systems a main nav and a sub nav


inside the subNav_mc I have 5 more movie clips labels sub0_mc - sub4_mc

I also have a thumbNail_mc which contains 10 thumb nail movieclip they are labels
th0_mc - th9_mc

on the main stage sits a empty movie clip called mainPhoto_mc

Besides that it does not work the xml does not populate the strip and the subNav onRelase function does not work either...

here is the .as code::

/*----------------------------------------------------------------
variable declarations
----------------------------------------------------------------*/
var photos_xml:XML;

//I have added these two var for the large movieclip loader
var photoLoader_mcl:MovieClipLoader;
// have created to use in cae I decide to use it in the transition for the main photo
var photoLoaderListener:Object;
//created transition manager


/*----------------------------------------------------------------
instantiate variables
----------------------------------------------------------------*/
photos_xml = new XML();
photos_xml.ignoreWhite=true;

photoLoader_mcl = new MovieClipLoader();
//created in case I decide to use a transition on the main photo
photoLoaderListener = new Object();




/*----------------------------------------------------------------
functions
----------------------------------------------------------------*/
this.populateThumb = function(i:Number):Void
{
trace("::populateThumb::");s
//var xpos:Number =0;
//var numofPhotos = photos_xml.firstChild.childNodes.length;
//for (var i:Number = 0; i < numofPhotos, i++)
//{
var numOfGrandkids = photos_xml.firstChild.childNodes.firstChild.childNodes.length;
for (var jj:Number = 0; jj < numOfGrandkids; jj ++)
{
var photoData:Object = new Object();
photoData.photo = photos_xml.firstChild.childNodes.firstChild.childNodes[jj].attributes.photo;
photoData.thumb = photos_xml.firstChild.childNodes.firstChild.childNodes[jj].attributes.thumb;
thumbNav_mc.loadClip("linkage identifier", "thumbnail" + i + "_" + jj + "_mc", thumbNav_mc.getNextHighestDepth(), photoData);
//Create a loadMovie for the larger Image
photoLoader_mcl.loadClip("photos/lg/"+p_photo+".jpg",photoHolder_mc.mainPhoto_mc);
}
//}
}

/*----------------------------------------------------------------
event handlers
----------------------------------------------------------------*/
photos_xml.onLoad = function(p_success:Boolean):Void
{
subNav_mc.sub0_mc.onRelease = function():Void
{
if (p_success)
{

trace("::photos xml Loaded::");
trace("::over::")
populateThumb(0);
}
else
{
trace("::photos xm Error::");
}
}
subNav_mc.sub1_mc.onRelease = function():Void
{
if (p_success)
{

trace("::photos xml Loaded::");
populateThumb(1);
}
else
{
trace("::photos xm Error::");
}
}
subNav_mc.sub2_mc.onRelease = function():Void
{
if (p_success)
{

trace("::photos xml Loaded::");
populateThumb(2);
}
else
{
trace("::photos xm Error::");
}
}
subNav_mc.sub3_mc.onRelease = function():Void
{
if (p_success)
{

trace("::photos xml Loaded::");
populateThumb(3);
}
else
{
trace("::photos xm Error::");
}
}
subNav_mc.sub4_mc.onRelease = function():Void
{
if (p_success)
{

trace("::photos xml Loaded::");
populateThumb(4);
}
else
{
trace("::photos xm Error::");
}
}
}

photoLoaderLisetner.onLoadProgress = function(target_mc:MovieClip,bytesLoaded:Number,bytesTotal:Number):Void
{
trace("::onLoadProgress::");
photoHolder_mc.mainPhoto_mc._alpha=Math.round(bytesLoaded/bytesTotal*100);
}

photoLoaderListener.onLoadComplete = function(p_target:MovieClip):Void
{
trace("::onLoadComplete::");
var mainPhotoTransitionManager:TransitionManager;
mainPhotoTransitionManager = new TransitionManager("mainPhoto_mc");
mainPhotoTransitionManager.startTransition
({
type:Wipe,
direction:transition.IN,
duration:0.75,
easing:Regular.easeOut,
startPoint:2,
});
}

transitionListener.allTransitionsInDone = function ():Void
{
trace(":: allTransitionsInDone ::");

TransitionManager.start(folderHolder_mc.mainPhoto_mc, {type:Photo, direction:Transition.IN, duration:0.25, easing: None.easeNone});
}
/*----------------------------------------------------------------
run immediately
----------------------------------------------------------------*/
photos_xml.load("photos.xml");

thumbLoader_mcl.addListener(thumbLoaderListener);

thumbLoader_mcl.loadClip("photos/sm/" + this.photo +".jpg", photoThumb_mc);

photoLoader_mcl.addListener(photoLoaderListener);

mainPhotoTransitionManager.addEventListener("allTransitionsInDone", transitionListener);



thanks for the help!!!!!








Attach Code

/*----------------------------------------------------------------
variable declarations
----------------------------------------------------------------*/
var photos_xml:XML;

//I have added these two var for the large movieclip loader
var photoLoader_mcl:MovieClipLoader;
// have created to use in cae I decide to use it in the transition for the main photo
var photoLoaderListener:Object;
//created transition manager


/*----------------------------------------------------------------
instantiate variables
----------------------------------------------------------------*/
photos_xml = new XML();
photos_xml.ignoreWhite=true;

photoLoader_mcl = new MovieClipLoader();
//created in case I decide to use a transition on the main photo
photoLoaderListener = new Object();




/*----------------------------------------------------------------
functions
----------------------------------------------------------------*/
this.populateThumb = function(i:Number):Void
{
trace("::populateThumb::");s
//var xpos:Number =0;
//var numofPhotos = photos_xml.firstChild.childNodes.length;
//for (var i:Number = 0; i < numofPhotos, i++)
//{
var numOfGrandkids = photos_xml.firstChild.childNodes[i].firstChild.childNodes.length;
for (var jj:Number = 0; jj < numOfGrandkids; jj ++)
{
var photoData:Object = new Object();
photoData.photo = photos_xml.firstChild.childNodes[i].firstChild.childNodes[jj].attributes.photo;
photoData.thumb = photos_xml.firstChild.childNodes[i].firstChild.childNodes[jj].attributes.thumb;
thumbNav_mc.loadClip("linkage identifier", "thumbnail" + i + "_" + jj + "_mc", thumbNav_mc.getNextHighestDepth(), photoData);
//Create a loadMovie for the larger Image
photoLoader_mcl.loadClip("photos/lg/"+p_photo+".jpg",photoHolder_mc.mainPhoto_mc);
}
//}
}

/*----------------------------------------------------------------
event handlers
----------------------------------------------------------------*/
photos_xml.onLoad = function(p_success:Boolean):Void
{
subNav_mc.sub0_mc.onRelease = function():Void
{
if (p_success)
{

trace("::photos xml Loaded::");
trace("::over::")
populateThumb(0);
}
else
{
trace("::photos xm Error::");
}
}
subNav_mc.sub1_mc.onRelease = function():Void
{
if (p_success)
{

trace("::photos xml Loaded::");
populateThumb(1);
}
else
{
trace("::photos xm Error::");
}
}
subNav_mc.sub2_mc.onRelease = function():Void
{
if (p_success)
{

trace("::photos xml Loaded::");
populateThumb(2);
}
else
{
trace("::photos xm Error::");
}
}
subNav_mc.sub3_mc.onRelease = function():Void
{
if (p_success)
{

trace("::photos xml Loaded::");
populateThumb(3);
}
else
{
trace("::photos xm Error::");
}
}
subNav_mc.sub4_mc.onRelease = function():Void
{
if (p_success)
{

trace("::photos xml Loaded::");
populateThumb(4);
}
else
{
trace("::photos xm Error::");
}
}
}

photoLoaderLisetner.onLoadProgress = function(target_mc:MovieClip,bytesLoaded:Number,bytesTotal:Number):Void
{
trace("::onLoadProgress::");
photoHolder_mc.mainPhoto_mc._alpha=Math.round(bytesLoaded/bytesTotal*100);
}

photoLoaderListener.onLoadComplete = function(p_target:MovieClip):Void
{
trace("::onLoadComplete::");
var mainPhotoTransitionManager:TransitionManager;
mainPhotoTransitionManager = new TransitionManager("mainPhoto_mc");
mainPhotoTransitionManager.startTransition
({
type:Wipe,
direction:transition.IN,
duration:0.75,
easing:Regular.easeOut,
startPoint:2,
});
}

transitionListener.allTransitionsInDone = function ():Void
{
trace(":: allTransitionsInDone ::");

TransitionManager.start(folderHolder_mc.mainPhoto_mc, {type:Photo, direction:Transition.IN, duration:0.25, easing: None.easeNone});
}
/*----------------------------------------------------------------
run immediately
----------------------------------------------------------------*/
photos_xml.load("photos.xml");

thumbLoader_mcl.addListener(thumbLoaderListener);

thumbLoader_mcl.loadClip("photos/sm/" + this.photo +".jpg", photoThumb_mc);

photoLoader_mcl.addListener(photoLoaderListener);

mainPhotoTransitionManager.addEventListener("allTransitionsInDone", transitionListener);

View Replies !    View Related
Loading Data From External Php
hey guys,

i just tried to figure out how to load data from an external php-file.
i tried to do it with crossdomain.xml file but it just works with external .swf to load in.
is there any tricky way to make that work ???
there always appears a security sandbox exception though i have located the crossdomain.xml in the root folder.
as i said there is no problem with external .swf but .php files.

any help is appreciated

View Replies !    View Related
Loading External Data
Hi
I have been using using external files for a while, but just upgrated to MX2004...

Now, instead of just printing the value of the file I'm getting this first for a second:
_level0.variablename


I also see that it happens in the tutorial on this site:
http://www.kirupa.com/developer/mx/externaldata.htm

Why does this happen and How can I stop it?

Thanks
Helen

View Replies !    View Related
Loading External Data
I have an external text file that will have two variables and look like this:

&months=January,February,...&days=Sunday,Monday,.. .

I am using loadVars to load the textfile in. When it is done loading, I want to load each of the of the 2 variables into an array so I have an array for months and array for days. Can anyone help me with this.

Thanks... Bubba

View Replies !    View Related
Loading External Data (MX)
Ok, lets see if i can explain this right. I have been trying to make a movie that loads different information from an external file each day. I name the external files according the the date that i want it to be imported (example: 200667, for today)

Ive been able to make the .getYear(), .getMonth(), .getDate() work to make the date in the above format.
xmlData.load(" ");<-- now when i write in the url to load the external file is there a way that i can write it so that it will update itself to the correct date so that i dont have to update it manually myself?

I hope i explained it ok, Thanks for any help if possible.

Justin

View Replies !    View Related
Loading Data From External Xml
i'm trying to load information from a remote location xml file (its on a different server). When i tested it in sandbox, it works perfectly fine, but once i uploaded it online, nothing seems to be working...

Code:
var a1 = new XML();
a1.onLoad = function(success){

if (success){
longdate1 = a1.firstChild.childNodes[1].firstChild;
}

}
a1.load("http://chire.org/ikilledme/rss/atom.xml");
I have tried adding

Code:
System.security.allowDomain("http://my.domain.com")
but it doesnt make a difference. the index.html and file.swf are located in the same directory (eg. http://my.domain.com/index.html and http://my.domain.com/file.swf)

i've deduced that the XML data is never loaded, since nothing in the the 'success' function is performed. I cannot edit the remote xml file since it does not belong to me and is a generated rss file. Thx in advance for any help.

View Replies !    View Related
Loading Data From External Php
hey guys,

i just tried to figure out how to load data from an external php-file.
i tried to do it with crossdomain.xml file but it just works with external .swf to load in.
is there any tricky way to make that work ???
there always appears a security sandbox exception though i have located the crossdomain.xml in the root folder.
as i said there is no problem with external .swf but .php files.

any help is appreciated

View Replies !    View Related
Loading Data From External Source
Is there a way to load data from an external source w/o using the XML object? XML would add an unneeded level of complexity
its so simple in other languages

View Replies !    View Related
Loading Data From External Txt File
Hey everyone --

I wrote a dynamic menu builder in Flash that takes in a whole slew of variables from an external text file. It's posted at http://speed.doit.wisc.edu/~scferman/dmb/ (swf, fla, and txt files) if you want to take a look. Briefly, I have a loop running to make sure it gets to the end of the external variable file before the menus are built. Here are several problems I've encountered in trying to use this menu system. These problems seem to occur MOSTLY when the code is used on an HTML page with a lot of other stuff on it.

1. Variables don't always appear to get loaded... sometimes the text labels (which are strings stored in those external variables) don't appear.

2. Sometimes the entire thing doesn't show up in Netscape. specifically, Netscape 4.7 on a laptop, slower connection.

3. I'm using a getBounds() technique to track if the mouse is over a button (not using the on (rollover) on a button) but that seems to be a little jumpy.... it seems as if my mouse pointer position isn't registered as quickly as I'd like, so the sub menus sometimes don't disappear when I roll off, or mousem movement within a single sub menu sometimes causes that sub menu to disappear even though I'm technically still on the sub menu.

4. Positioning of duplicated movie clips looks fine in Flash but sometimes has gaps or is slightly off when used in an HTML page with a bunch of other stuff.

If anyone has a chance or wants to help alleviate my extreme frustration, these are the issues I'm having. I sincerely appreciate any advice you can give! And if you want further documentation on how I built this, or if you want to use it, please let me know, it's yours!

Thanks in advance!
Shannon

View Replies !    View Related
Pre-Loader For Loading External Data
Flashers UNITE: It is I "XAVIERDBZ" once again seeking your phenominal support:

Almost all my files are loadd into a moview externally. Some of them has deleays for they are a little bigger.

I need to know how to create a preloader - that will run ntil all external files are loaded. Please could you give me the code.




THank you guys so much..

View Replies !    View Related
Status Bar For Loading External Data
I'm not one to ask questions often, but I've spent the last 2 days looking for some tutorial like this and its hard for me to put into words EXACTLY what it would be called, so i'll point you to the url:

http://www.vw.com/phaeton/mini/flash.htm

if you hit the Gallery section and click one of the images on the nav bar to the left a load bar pops up showing the status of the images its downloading... does anyone have a tutorial for something like that? I see it in alot of movies but can never really find any information on it.

Anyone? Purty Please?

View Replies !    View Related
Status Bar For Loading External Data
I'm not one to ask questions often, but I've spent the last 2 days looking for some tutorial like this and its hard for me to put into words EXACTLY what it would be called, so i'll point you to the url:

http://www.vw.com/phaeton/mini/flash.htm

if you hit the Gallery section and click one of the images on the nav bar to the left a load bar pops up showing the status of the images its downloading... does anyone have a tutorial for something like that? I see it in alot of movies but can never really find any information on it.

Anyone? Purty Please?

View Replies !    View Related
Loading External Data Into Components
how can i load data into a component (scroll pane)

i have the component that displays a movieclip from a library and then that movieclip has the code to load a swf.

But what happens is that the component doesn't display it and can't recognise the size properties of the external swf.

Is it impossible to load external data like that into a component.

View Replies !    View Related
Loading From A External Data Source
Here is my code simple as it is. I have the TXT file in the same directory as the SWF. I keep getting a trace message of "undefinde"
here is the code.

fscommand("fullscreen", "true");
loadVariables("names.txt", this.MOVanim.movTxt.GRFXtxt.tData);
trace (tdata);
stop();

View Replies !    View Related
Loading External Data Into Flash
i know flash can load in variables from server side script such as say php, but is it possible to specify certain varibles as a flash document is opened like example.swf?var1=true
i doubt there is but wouldnt it be usefull for dynamic pages?

View Replies !    View Related
Loading External Data Onto Scrollpane
Hi,

I am developing an application using macromedia flash mx 2004 component, scrollpane.

The design is a follows.
The left scrollpane is loading a external swf, nav.swf
The right scrollpane is loading another external swf, slide1.swf

If i click on the left scrollpane, selecting the button, the right scrollpane should load the data that is relevant.

The button code :
on(release)
{
_root.ScrollPane.contentPath("slide1.swf");
}

but it fails to load.
can anyone help me?

View Replies !    View Related
External Data Loading Problem
I was pretty big into flash in versions 3, 4 and early 5 but I haven't used it in ages. I bought flash mx 2004 a little whlie ago and have been using it off and on again. Here's my problem: I was using this as a guide to load exteral text files.
http://www.flashkit.com/movies/Scrip...8012/index.php
I have everything the same, that I can tell, with the exception of the text file name. There are 3 frames, all with actions. The dynamic text field is in a movie clip of its own. There are 3 frames and they look like this:
Frame 1:

Code:
strRet = new Array();
var myTxT = new LoadVars();
myTxT.load("cont.txt");

Frame 2:

Code:
if (myTxT.loaded) {
nextFrame();
} else {
gotoAndPlay(3);
}

Frame 3:

Code:
myStr = myTxT.toString();
if (myStr.lastIndexOf("=") == myStr.length-1) {
myStr = myStr.substr(0,myStr.length-1);
}
strRet = myStr.split("%0A");
for (i=0; i<strRet.length; i++) {
myField += unescape(strRet[i]);
}

When I publish and view the movie..."undefined" appears before my text. So if my text file only says "This is text." what is actually printed is "undefinedThis is text."

Any ideas?

View Replies !    View Related
Actionscript For Loading External Data
Hello actionscript gods.

I'm trying to control a buttons' visibility in one flash movie by using a checkbox component from another flash movie located at the same domain but in a seperate html file.

The purpose is to give a client access and control over the data that controls components in the main flash movie.

How would the actionscript for the button on the main flash file be formated?

Thanks

View Replies !    View Related
Loading External Data Into A Movie
So here I have my website http://bloodangels.freehostia.com/ . Yes it is silly looking, but it is supposed to be a joke amongst my clan members. Anyways, in the purple text box I had created a dynamic text field. In the variable field for that text field I put the name "home". Then I went and created a .txt file in the directory the flash is kept in and called it home.txt. In the .txt file I put home=BLAHBLAHBLAH. Then in the first frame of my movie, in the actions tab, I put, loadVariables("home.txt", this); So for a while my text was loading into the text field, but as you can see now, it is not. Does anyone have any idea what might be causing this? Ive tried everything in my knowledge (which isnt too much )

View Replies !    View Related
Problem When Loading External Data In IE
I'm having serious problems when viewing Flashes that load some data in Internet Explorer due to cache...

For example, I have a timetable I created in Flash... it loads the data using the XML class, previously calling a general .aspx file that displays the corresponding XML.

However, due to caching it doesn't refresh the data correctly, and I'm forced to set the comprobation of website newer versions to always...

Is there any other workaround for this problem? I tried messing with Flash configuration as well, with no luck...

View Replies !    View Related
Opposite Of Loading External Data
Okay so im thinking since you can load an external text into flash, can't you do the opposite? load a variable, string, array or what ever into a text file?

im wondering this since im still thinking of how to make a high score table...

i figure if you can do this and then run the list through a sort, you will have a high score table

View Replies !    View Related
Loading External Data Into A Nested .swf
Okay, I am going crazy here! I have read that when using macromedia's components in a .swf that is nested in a main .swf you must also embed the component in the main .swf as well.

Here is my issue. I have a dynamic text box that loads text from an external .txt file. This works fine when I play it directly in the browser, but I am needing to load this .swf into another first.

The structure is like this...

main.swf > subcontent.swf < data.txt

Is it possible to load the data in a nested movie?

My code in subcontent.swf is as follows.

var format = new TextField.StyleSheet();
var path = "flash.css";
format.load(path);
format.onLoad = function(success) {
if (success) {
output.styleSheet = format;
loadText = new LoadVars ();
loadText.load("data.txt")
loadText.onLoad = function (success){
if (success) {
output.variable = "datatxt"
output.htmlText = loadText.datatxt;
} else {
output.htmlText = "ERROR LOADING CONTENT";
}
}
} else {
output.text = "ERROR LOADING CSS FILE";
}
};

Again, this works fine when played directly in the browser, its only when loaded into another .swf that the external data is not able to be retrieved.

Please help!!!

jaredburns

View Replies !    View Related
Loading Data From An External Source
I am having a problem with loading data from an external source on my webpage: Tucker's World under Contact Me

it displays _level0.name/email/location for about half a second then displays "undefined"

Can anyone help me? I got this from a tutorial somewhere on kirupa

The .fla and data.txt is attached

View Replies !    View Related
Loading External Data (rss Feed)
I have a problem.

hi. i've been trying to access data from an rss feed (external source). i have created my cross domain file. It looks like this

Quote:
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/c...ain-policy.dtd">
<cross-domain-policy>
<site-control permitted-cross-domain-policies="all"/>
<allow-access-from domain="www.ptshots.smugmug.com" />
<allow-access-from domain="ptshots.smugmug.com" />
<allow-access-from domain="*.smugmug.com" />
<allow-access-from domain="www.ptshots.com" />
<allow-access-from domain="ptshots.com" />
<allow-access-from domain="*" />
<allow-http-request-headers-from domain="*" headers="*" />
</cross-domain-policy>
here is the URL to my file

http://ptshots.com/transitions1.swf

when you run that file... this error shows up
Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation: http://ptshots.com/transitions1.swf cannot load data from http://ptshots.smugmug.com/hack/feed...&format=rss200.
at transitions1_fla::MainTimeline/frame1()

can anyone point me in the right direction?

View Replies !    View Related
Loading External Data (rss Feed)
I have the same problem.

hi. i've been trying to access data from an rss feed (external source). i have created my cross domain file. It looks like this


Quote:




<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/c...ain-policy.dtd">
<cross-domain-policy>
<site-control permitted-cross-domain-policies="all"/>
<allow-access-from domain="www.ptshots.smugmug.com" />
<allow-access-from domain="ptshots.smugmug.com" />
<allow-access-from domain="*.smugmug.com" />
<allow-access-from domain="www.ptshots.com" />
<allow-access-from domain="ptshots.com" />
<allow-access-from domain="*" />
<allow-http-request-headers-from domain="*" headers="*" />
</cross-domain-policy>




here is the URL to my file
http://ptshots.com/transitions1.swf

when you run that file... this error shows up
Error #2044: Unhandled securityError:. text=Error #2048: Security sandbox violation: http://ptshots.com/transitions1.swf cannot load data from http://ptshots.smugmug.com/hack/feed...&format=rss200.
at transitions1_fla::MainTimeline/frame1()

can anyone point me in the right direction?

View Replies !    View Related
Opposite Of Loading External Data
Okay so im thinking since you can load an external text into flash, can't you do the opposite? load a variable, string, array or what ever into a text file?

im wondering this since im still thinking of how to make a high score table...

i figure if you can do this and then run the list through a sort, you will have a high score table

View Replies !    View Related
Loading External Data Into A Nested .swf
Okay, I am going crazy here! I have read that when using macromedia's components in a .swf that is nested in a main .swf you must also embed the component in the main .swf as well.

Here is my issue. I have a dynamic text box that loads text from an external .txt file. This works fine when I play it directly in the browser, but I am needing to load this .swf into another first.

The structure is like this...

main.swf > subcontent.swf < data.txt

Is it possible to load the data in a nested movie?

My code in subcontent.swf is as follows.

var format = new TextField.StyleSheet();
var path = "flash.css";
format.load(path);
format.onLoad = function(success) {
if (success) {
output.styleSheet = format;
loadText = new LoadVars ();
loadText.load("data.txt")
loadText.onLoad = function (success){
if (success) {
output.variable = "datatxt"
output.htmlText = loadText.datatxt;
} else {
output.htmlText = "ERROR LOADING CONTENT";
}
}
} else {
output.text = "ERROR LOADING CSS FILE";
}
};

Again, this works fine when played directly in the browser, its only when loaded into another .swf that the external data is not able to be retrieved.

Please help!!!

jaredburns

View Replies !    View Related
Loading Data From An External Source
I am having a problem with loading data from an external source on my webpage: Tucker's World under Contact Me

it displays _level0.name/email/location for about half a second then displays "undefined"

Can anyone help me? I got this from a tutorial somewhere on kirupa

The .fla and data.txt is attached

View Replies !    View Related
Loading External Data Into An External Swf
I have a main interface where I'm loading an external swf's but I'm also trying to load text dynamically from a database from the external swf but the text will not show up,
but the text will load if it's in the main interface.

This is my code:

on (release) {
_level0.section = "about.swf";
_level200.play();

section = "contact";
loadVariablesNum("http://www.myurl.com/get_text.php", 0, "POST");

}

The swf will Load properly but the text won't.
Any help would be greatly appreciated.

ps.I hope what I'm asking for makes sense

View Replies !    View Related
Loading External Data Into An External Swf
I have a main interface where I'm loading an external swf's but I'm also trying to load text dynamically from a database from the external swf but the text will not show up,
but the text will load if it's in the main interface.

This is my code:

on (release) {
_level0.section = "about.swf";
_level200.play();

section = "contact";
loadVariablesNum("http://www.myurl.com/get_text.php", 0, "POST");

}

The swf will Load properly but the text won't.
Any help would be greatly appreciated.

ps.I hope what I'm asking for makes sense

View Replies !    View Related
Loading External Data (not In MIME Format)
Is it possible to capture data in flash with action script that is not in MIME format (for loadvar the data needs to be in MIME format)
Example
MIME: var1=name1&var2=name2&....
not MIME: name1...
I would like to capture the "raw" data from an URL command (and the commands just return single values without mentioning the variable(s) to load it in)

DaMadness

View Replies !    View Related
Loading External Data From A .txt File Hosted Elsewhere
I'm trying to access this following .txt file on another site of mine. The argonews.com site is one of mine which currently hosts the Flash program - and it works there. But if I load this elsewhere, it doesn't load the file.

_root.loadVariables("http://www.argonews.com/mondo/update.txt");

Am I missing something? Or does remote access not work.

Thanks in advance...

Jonas Stoltz

View Replies !    View Related
Loading External Data From A .txt File Hosted Elsewhere
I'm trying to access this following .txt file on another site of mine. The argonews.com site is one of mine which currently hosts the Flash program - and it works there. But if I load this elsewhere, it doesn't load the file.

_root.loadVariables("http://www.argonews.com/mondo/update.txt");

Am I missing something? Or does remote access not work.

Thanks in advance...

Jonas Stoltz

View Replies !    View Related
Loading External Data With Shim Movie
Does anyone have a working example of loading external data using the shim method descibed on


http://www.macromedia.com/bin/tech_n...ad_xdomain.htm


I need to develop an app that will display on one domain (web domain), data generated on another

The first movie will send a request to a shim movie on the second domain, which is a signal for it to 'push' xml data back to the first domain for display

Does anyone have a full working example of this? Or the code to produce it

View Replies !    View Related
Help Loading External Data As A Number Array
So this is driving me a little nutty...

I'm trying to create an interface that is customizable by changing the data in an external text file, rather than having to open up AS and code away. My main issue comes from the fact that I can't get the data from the external file to be accessible from the main timeline.


Code:
PortfolioLoadVars = new LoadVars();
PortfolioLoadVars.load("portfolio.txt");
PortfolioLoadVars.onLoad = function() {
PortfolioTxt.html = true;
PortfolioTxt.multiline = true;
PortfolioTxt.wordWrap = true;
PortfolioTxt.autoSize = "left";
PortfolioTxt.htmlText = PortfolioLoadVars.Empty;
port_preview_x = PortfolioLoadVars.xloc;
};


Now, in the text file "porfolio.txt", there are the following values:
&Empty =
&xloc=-130,8,-130,8,-130,8,-130,8

If I try to trace port_preview_x, I get undefined. However, if I remove the code from this loadvars command and attach it to a button, it loads up just fine. I din't particularly want to attach code to buttons (that's just sloppy programming), so what do i do to make my .fla able to read this information from the main timeline?

I am using MX 04, if that makes any difference.

Thanks in advance for any help offered!

View Replies !    View Related
Loading External Data With Sync Mode.
Happy NY to All, Amigos!!!!

as i understood, external data loads with async mode. Please, suggest me good way to get sync mode.
------------------------------------------------------------------------
Thanks in Advance.

View Replies !    View Related
Loading And Saving Data From External File
http://www.kirupa.com/developer/mx/externaldata.htmi saw this tutorial in this website. But i am just wondering what if i have more than 1 records, how do i load it from the text file, and how do i save multiple records into the text file ? can anyone provide a simple guide to teach me how to do it ?? thanks a lot ~~

View Replies !    View Related
Flash And Loading External Data (example Fla Included)
Hey there kirupa!

alright so im trying to make a calendar and essentially i will be inputting data into a Txt file via a server side php script. but thats not what i am about to talk about .

what i need to know is how this calendar (the attachment) gets the data from the txt file then converts it so the calendar recognizes where to put the event data. i understand AS, like i know the
loadVariablesNum is loading the stuff from the txt file, but then what happens? how is the data used?

see what i plan on doing is use the datechooser component and turn it into a event calendar. but i need to know how something like where &e05022000 is used.

thanks for your time.

PS i hope this is in the right forum catergory

View Replies !    View Related
Loading External Data (large Amounts)
What is the best way to work large amounts of external data in Flash? XML, remoting, something else??? I'm looking into a project that has a lot and I'm not sure what the best way to handle it would be. Thanks.

View Replies !    View Related
Loading And Saving Data From External File
http://www.kirupa.com/developer/mx/externaldata.htmi saw this tutorial in this website. But i am just wondering what if i have more than 1 records, how do i load it from the text file, and how do i save multiple records into the text file ? can anyone provide a simple guide to teach me how to do it ?? thanks a lot ~~

View Replies !    View Related
Loading External Swf, Then Loading Data...
I'm kinda new, im switching to flash from Swishmax... Concept is kinda the same but some parts are different...


I have my main swf loading an external swf which is than loading >
loadVariablesNum ("discography.txt",0);

now when I run the external swf by it self , it loads correctly.
But when I run the main swf, and it loads the external swf correctly the data being loaded does not come in at all... Ive pulled it off before on swishmax but on the real flash coding i cant

View Replies !    View Related
Loading External Data Into Dynamic Text Box [variables]
I am able to load the txt document fine but it stops the text wherever there is the symbol "&" .

Example: Get the new design & web package now.

I t gets cut off at: Get the new design

Is flash reading the " & " symbol as code, and if it is how can i get around it. Is there a tag to put around it to read it as text and not code?

help..


thanks

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved