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








Loading Content Via XML In Flash


Hi there

I need to show some content in my site's daily updating page which shows the daily recipes, weather, and quote of the day kinda stuff. For which we dont want to update the flash file daily for the text and the images coming in to it, I have made up the design, placed my Dynamic text boxes, placed the images in a mc with instance names, now can anyone help me giving any example for how to connect and get the data and images path from the XML file into Flash so in this way the admin just needs to fill up the XML file and the flash file gets the data according to it everytime.

Any help would be really appreciated.

Thanks,
F.




FlashKit > Flash Help > Flash ActionScript
Posted on: 03-02-2006, 06:45 AM


View Complete Forum Thread with Replies

Sponsored Links:

External Content Loader With Multiple Content Types (trouble Loading Graphics)
Hey all!

I am yet another new project. Our flash designer here isn't a big AS guy, and asked me to write a reusable class so that he can load a variety of content types using minimal amount of code on his part. It's also going to be the main component piece in a larger external content player once I'm done with the class itself, so I am making the loading functions into public methods of the loader object than can be called from a button, etc.

I have the code for the text and html parts working (although I can't get stage.width and stage.height to work in the class or from the frame).

The problem I have is that I can't get the graphics content to load (the swf/pic content). Could you please check my code and tell me what I'm missing? I'm sure it's something simple, like it always is.

thanks a million!

-Fish


-----------------------------


ActionScript Code:
package
{
   
    /**
    * External Multimedia Loader Class
    * @author $(DefaultUser)
    * Add new MultiLoader object and insert media type (all lowercase) and object path to control initial loaded object
    * To load a new object, call the MultiLoader.load* methods (loadText, loadPic, loadSwf, or loadHtml as appropriate), passing the path to the external file.
    */
   
    import flash.display.*;
    import flash.events.*;
    import fl.transitions.*;
    import fl.transitions.easing.*;
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.text.TextField;
   
    public class MultiLoader extends MovieClip
    {
        private var media:String;
        private var path:String;
        public var textObj:TextField = new TextField;
        public var picObj:MovieClip = new MovieClip;
        public var swfObj:MovieClip = new MovieClip;
        public var htmlObj:TextField = new TextField;
        private var objLoader:Loader = new Loader();
        private var objType:String;
        private var textLoader:URLLoader = new URLLoader();
       
       
       
        public function MultiLoader(mediaType:String,objPath:String)
        {
            media = mediaType;
            path = objPath;
           
            if (media == "text" || media == "TEXT" || media == "Text")
            {
                loadText(objPath);
            }
            else if (media == "pic" || media == "PIC" || media == "Pic")
            {
                loadPic(objPath);
            }
            else if (media == "swf" || media == "SWF" || media == "Swf")
            {
                loadSwf(objPath);
            }
            else if (media == "html" || media == "HTML" || media == "Html")
            {
                loadHtml(objPath);
            }
            else
            {
                trace("ERROR: Media type not supported. Media type must be 'text', 'pic', 'swf', or 'html'.");
            }
        }
       
        public function loadText(txtPath):void
        {
            objType = "text";
           
            if (this.numChildren > 0)
            {
                this.removeAllChildren();
            }
           
            this.addChild(textObj);
            this.textLoader.load(new URLRequest(txtPath));
            this.textObj.wordWrap = true;
            this.textObj.multiline = true;
            this.textLoader.addEventListener(Event.COMPLETE, addTextContent);
            //this.textObj.width = this.width;
            //this.textObj.height = this.height;
        }
       
        public function loadPic(picPath):void
        {
            trace("loadPic started");
           
            objType = "pic";
           
            if (this.numChildren > 0)
            {
                this.removeAllChildren();
            }
           
            this.addChild(picObj);
            this.objLoader.addEventListener(Event.COMPLETE, addObjLoader);
            this.objLoader.load(new URLRequest(picPath));
           
            trace("loadPic completed");
        }
       
        public function loadSwf(swfPath):void
        {
            trace("loadSwf started");
            objType = "swf";
           
            if (this.numChildren > 0)
            {
                this.removeAllChildren();
            }
           
            this.addChild(swfObj);
            this.objLoader.addEventListener(Event.COMPLETE, addObjLoader);
            this.objLoader.load(new URLRequest(swfPath));
           
            trace("loadSwf completed");
        }
       
        public function loadHtml(htmlPath):void
        {
            objType = "html";
           
            if (this.numChildren > 0)
            {
                this.removeAllChildren();
            }
           
            this.addChild(htmlObj);
            this.textLoader.load(new URLRequest(htmlPath));
            this.htmlObj.wordWrap = true;
            this.htmlObj.multiline = true;
            this.textLoader.addEventListener(Event.COMPLETE, addTextContent);
        }
       
        private function removeAllChildren():void
        {
            if (objType == "pic")
            {
                this.picObj.removeChild(objLoader);
            }
            else if (objType== "swf")
            {
                this.swfObj.removeChild(objLoader);
            }
            else
            {
                trace("objType != 'pic' or 'swf.' objType = '" + objType + "'.");
            }
           
            while ( this.numChildren > 0 )
            {
                this.removeChildAt(0);
            }
        }
       
        private function addObjLoader(event:Event):void
        {
            trace("addObjLoader started");
           
            if (objType == "pic")
            {
                trace("trying to load pic");
                this.picObj.addChild(this.objLoader);
                this.picObj.objLoader.removeEventListener(Event.COMPLETE, addObjLoader);
            }
            else if (objType== "swf")
            {
                trace("trying to load swf");
                this.swfObj.addChild(this.objLoader);
                this.swfObj.objLoader.removeEventListener(Event.COMPLETE, addObjLoader);
            }
            else
            {
                trace("ERROR: Cannot add object loader. The 'objType' variable does not contain correct media type. The function 'addObjLoader' should only be called when objType is 'pic' or 'swf'. In this case, objType is '" + objType + "' .");
            }
           
            trace("addObjLoader completed");
        }
       
        private function addTextContent(event:Event):void
        {
            if (objType == "text")
            {
                this.textObj.text = event.target.data as String;
                this.textLoader.removeEventListener(Event.COMPLETE, addTextContent);
            }
            else if (objType == "html")
            {
                this.htmlObj.htmlText = event.target.data as String;
                this.textLoader.removeEventListener(Event.COMPLETE, addTextContent);
            }
            else
            {
                trace("ERROR: Cannot add text content. The 'objType' variable does not contain correct media type. The function 'addTextContent' should only be called when objType is 'text' or 'html'. In this case, objType is '" + objType + "' .");
            }
        }

    }
   
}

View Replies !    View Related
FLASH CONTENT NOT LOADING IN IE (PC)
Hi there,

I have created some flash buttons and imported them into dreamweaver. When I upload the page and test on a PC running windows 2000 in Internet Explorer they are not visible.

www.jamcat.eu

Any help would be greatly apprecciated!

Thanks

View Replies !    View Related
Loading Flash Content (praystation)
I bought the book "Flash to the Core" as some of you suggested, I haven´t read through the whole book because, well I am in a big time pinch. Anyways, Im working on flash timeline project - like the one that Josh Davis made at

http://www.motown.com/classicmotown/frameset_2.html

My only problem now is figuring out how to load content into each section/year, or each instance. Do I need to create separate instances of the content-mc for each section/year?

I thought that pages 246-250 would address that, or chapter 13 where there is a basic scroller, but I cant find it. I´ll start reading, but in the meantime if anyone can help me out. Id really appreciate it.

View Replies !    View Related
Problems Loading Flash Content In IE
I have a quick question on a flash intro I made for my site. I created an intro and added all the proper preloaders and what not and inserted the file using Dreamweaver. After uploading the page onto my webspace the flash movie will not load in Internet explorer. When you right click on the movie it says: "movie not loaded". I have all the proper updated plugins for IE and this error happens on everyone's computer that i have talked to. Not sure if the problem is the html code or the actual flash movie i have created, but it works in the Opera browser. Any ideas. If you would like the .fla file just IM me at Bighummer13 and i could send it to you.
Here is a test link http://1912trinity.iwebland.com/introtest.htm

and the html code:

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" marginwidth="0" marginheight="0" leftmargin="0" topmargin="0">
<table width="90%" border="0" cellspacing="4" cellpadding="4" align="center">
<tr>
<td width="33%" align="right" valign="bottom">&nbsp;</td>
<td width="33%"> <p>
<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="Assets/swflash.cab#version=6,0,0,0" width="550" height="400">
<param name="movie" value="Assets/Welcome2.swf">
<param name="quality" value="high">
<embed src="Assets/Welcome2.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="550" height="400"></embed></object>
</p>
<p align="center"><font color="#000066">This is a test of the intro.</font></p></td>
<td width="33%" valign="bottom"><a href="index.htm">Next
>></a></td>
</tr>
</table>
</body>
</html>

View Replies !    View Related
Flash 6 Loading External Content With ASP
Hey I got this movie Im trying to create were I load some information from a ASP file now I can do that but Im not good at the duplicating part. I included the file to help. What Im trying to do is load it in the second movie clip within the root then duplicate it down creating a scroll bar. then I have another clip info2 that I want to duplicate and it tell the text movie clip which to show text1 text 2 text 3. If anybody could pleeeeeeeease help me. It would greatly be appreciated. Thanks in advance for everything. I hope I made this understandable not sure how to explain it.

View Replies !    View Related
Flash Stopping Loading On Other Content
I have a flash banner that is integrated into a dynamically generated web page. I'm using a CMS to generate the page. The problem is the CMS does not load certain content or activate the javascript menu system until the flash movie has seemingly finished playing (the movie is only 64k). I suspect its something to do with the DOMs onload event. How does flash contribute to the onload event to the page? Its as if the CMS is some how checking for isPlaying. It doesn;t make sense to me really. If anyone has any ideas as to what might me causing the problem, I'd really appreciate a point in the right direction. Thanks

View Replies !    View Related
Loading .pdf Content In Flash File
I am trying to load linked.pdf content inside my flash file. Does anybody know a way to do this and actually have it work well with IE? I would like the content to load once a button is clicked in flash. Thanks in advance

View Replies !    View Related
Loading Dynamic XML Content Into Flash 5
I am trying to load XML content in from a web page into flash.
The page is XML.aspx. It gets XML from a database based on
a value in the session and spits it out. If XML.aspx is viewed in a browser you see the dynamic XML content. However when I tried to use XML.load( "XML.aspx" ); no data was returned to Flash.
I tried XML.load on a normal xml file and it worked fine. Any ideas why I can't make this work?

thanks...

View Replies !    View Related
Bugs In Loading Flash MX Content?
I'm using Flash MX to create a fully-flash site. There are a few problems.

First, I have a couple of movies that load their text content from external text files (which can be updated by php scripts). When the external text files are updated, the changes are not reflected right away, and sometimes it takes 2 or 3 reloads for it to show up.

Secondly, I have a few forms that I put together using the combobox, radio button and submit button components that MX has. When I click to that portion of the site, the radio buttons and submit button don't always show up. The submit button will be plain white with no text on it, and the radios themselves will be present but not their text labels. If I reload the page and then click back through to the forms, they'll then load correctly.

Are these bugs inherent in mx, the flash player, or could I be doing something wrong? Could it be solved by preloading any content? Right now I don't preload anything, as the file sizes are small.

View Replies !    View Related
Flash And Loading Dynamic Swf Content
I have been stuck on this for a while, I'm close but not quite and it's time to seek help.

What I would like to do is:
Create a single swf file made from 2 swf files that come from a mysql database.

See image.



I would like the first swf to load then when it finishes it calls another file depending on the id= number in the php page it is in. ie. it loads the main content from another Mysql table.

I know how to load external swf files, I just dont know what code to put where so they are dynamic.

I have no decent code to post.

View Replies !    View Related
Loading Dynamic MySpace Content Into Flash?
Hi I'm a new user to this forum but not really to flash. I just posted a msg in the flash mx section but it didn't come up? I saw a msg that said your post will not come up immediately, but it's been a few min now and I'm wondering if it went through or not? I tried again and it still doesn't seem to work? This forum seems to work however so I'll post my question here:



I am pretty much wondering how is it that a site like lovemyflash.com gets a user's dynamic myspace content into a flash movie?

I want to do this with my own flash movie I'm creating for my myspace profile. It would be nice to know how to get the "about me" and "interests", but the information I want most is how to get the "online status"(w/ gif), "last user login date", and "current mood" since those are the things that change most frequently for me.

I have a flash site with 5 diff pages that I made in MX, so the screen fades in and out showing different info about me. I really want to know any way possible to put dynamic myspace content onto each of these pages whether it be through action scripting, html somehow or use of an iframe on each movie somehow I'm not sure.

I used to know more about flash but I haven't used it in so long. I've searched high and low on google to find a way to do this and can't find anything about it anywhere. I hope one of you experts here who are good with both myspace and flash can give me some tips. Thanks!

View Replies !    View Related
How Does Flash Actually Deal With Loading Dynamic Content?
Hello, I have a question about how flash deals with loading things. As I understand it there are a number of different ways to bring dynamic content into flash, but try as I might I can't seem to have two things going on at once. I have a project on CD Rom, it's quite big so I switch between areas by loading swfs (with loadMovieNum) - I load them into level 1 so whenever a user clicks on a new section it replaces the swf that was previously there. It's all dandy, but they take a bit of time to load, being several megs each. What I've noticed however is that whenever I load an swf in it freezes the whole program while this happens - so say if I had another movie playing on a layer above with an animation, this freezes while the swf below is replaced. I think it's a bit odd that flash is acting this way, and I'm wondering if there is a way to both load and play content at the same time. I'm not using movieclips here, could that have anything to do with it?

View Replies !    View Related
Loading Content From A Flash Menu In A Dreamweaver Frame
I have created a flash menu with each button playing an animated movieclip.Everything works fine,apart from the problem that my webpage in dreamweaver contains frames.I have put the flash menu in the top frame and want the content to change in the mainframe when each button is clicked.However,after inserting the following code,the content changes in the same frame that the flash menu is in.What am I doing wrong?It is the last two lines of code that don't work properly!Please help me.My Direct email is : aretiuk@yahoo.com

on (rollOver) {
tellTarget ("_root.associates") {
play ();
}
}
on (release, rollOut) {
gotoAndPlay (2);
}
on (press, release) {
getURL ("associates.htm", _mainFrame);
}

View Replies !    View Related
Old-fashioned Swf Loading Bar In Flash Player 9? (Can't Use External Content)
Hey. I'm making a AS 3.0 game. I'm making it a self-contained SWF so it'll be compatible with NewGrounds's flash portal. How do I create a pre-loader for it? I'm pretty sure I can't use the Loader class, because Loader requires a URL, which implies that the content it's loading must be external to the swf. (Not, for example, Library content.) My game is a 4mb SWF, so a pre-loader is a must. I just can't figure out how to do it, and all the documentation I can find seems assume that my content is all external SWFs and JPEGs residing on a web server or something. How am I supposed to make this work?

View Replies !    View Related
Flash Progress Bar When Loading Non-flash Content
Hi folks, I have a question and someone might be able to help...

Basically I have a standard HTML site which contains loads of large images. Is there any way I can use a flash progress-bar to show how much of the non-flash content has loaded before entering the site. When all of the large images are cached, then redirect to the homepage.

I know I can do this with a Javascript loading bar, but I need the loading page to be much more complex than a simple prog bar so it really calls for a flash movie.

Any help would great, thanks.

View Replies !    View Related
Help Needed In Clearing The Content Of The XML File Content Displayed In The Flash
I have developed a flash file with combo box which displayes all the XML files in the directory and after selecting a particular XML file the flash file reads the XML file and displayes the content of the XML file in flash in a fashion I have done. But, if I chose another XML file which is a blank XML file, still the flash file shows the previous file's content in the flash. How to clear that previous file's content?

If I chose someother XML file which is having some content then it shows correctly. But, if I chose some blank XML file, the flash file shows the previous content instead of showing it blank. pls help me how to clear the previous file contents?

View Replies !    View Related
Why Does Flash Re-load Content When Content Within Hidden/shown Area?
Hi all,

A purely academic question for someone about how Flash loads. I've written a simple Flash image scroller script, see: http://www.benjaminkeen.com/software/image_scroller/

On the page above, I separated the various content (installation instructions, demo, download file, etc) into separate pages, which get hidden/shown via JavaScript. Very straightforward.

My question is: why, when you go from the "Overview" to "A few examples" sections (both of which have a demonstration scroller), does the flash get "re-drawn" each time? I don't understand - I thought that it would simply get loaded the first time the browser calls it - not every time the content becomes display:blocked through javascript...?

I guess my follow up question is: can this be prevented?

View Replies !    View Related
Loading Content Within Content
Hello, I'm a Flash animator using CS3 who is trying to grasp the scary world of “Flash Web Design”. I'm creating a website with different sections with a tool bar on top that is always present, and content per “section” that is selectable in the tool bar.

I know the basic “gotoandplay” commands, but very little afterwards, and I've done preloader stuff before. What I'm trying to do is have it so that whenever a user clicks on something on the toolbar, it'll start loading (or preloading to play) the specific content they want and then show it without needing to “switch pages”.

Any ideas of how to work this?

View Replies !    View Related
Loading Content Within Content
Hello, I'm a Flash animator using CS3 who is trying to grasp the scary world of “Flash Web Design”. I'm creating a website with different sections with a tool bar on top that is always present, and content per “section” that is selectable in the tool bar.

I know the basic “gotoandplay” commands, but very little afterwards, and I've done preloader stuff before. What I'm trying to do is have it so that whenever a user clicks on something on the toolbar, it'll start loading (or preloading to play) the specific content they want and then show it without needing to “switch pages”.

Any ideas of how to work this?

View Replies !    View Related
[CS3] How To Delay Html Content Until After Flash Content
I am working on a site where I want to have a few flash elements on the page ( i.e the navigation and the logo. ) to animate in before the the a block of text ( in a div) will be shown. The flash elements will stay on screen and be used after loading as the nav with interaction.

I don't want it to be a true flash intro before the site ( I already have one actually). I would rather it be a sequence that becomes visible as the page loads.

As I am typing I am wondering if this needs to be done in javascript or if it can be done via the embed parameters.

Any suggestions would be greatly appreciated

View Replies !    View Related
Loading New Content.
Im working on a site at www.skywarn3d.com. I dont know how to load new content when a link is clicked. Any suggestions?

View Replies !    View Related
Loading Content Plz Help
Hi,
okey i need help
i have a tiny problem, I got the relative scrolling working

http://www.shahin.ca/flashtest/test-scrolling.swf

but i don't know how content can be loaded when that specific part of image is shown, how do i make a trigger action.


plz reply or if u know any open .fla that shows this let me know

shahin1981@yahoo.com
thnx

View Replies !    View Related
Content Loading, Please Help
Ok, Here's the situation:

My fla. file is telling my movie to load to a certain point, so that load time is not a big issue, How do I get the separate scenes and or mc's to load individually after that, when they are clicked? is this even possible or do I have to use frames and separate swf's?

thanks
nads

View Replies !    View Related
Loading Content
www.dangerradio.com is what I'm working with

what i need and cant figure out how to do is when the tabs are clicked, i need the content to load IN the corresponding movieclip/tab group

ask any questions you have concerning my problem, ive tried posting this 3 times now just to be told the movie size is too big..go figure

so the file is here: www.dangerradio.com/slidenav.fla
sorry, its kind of a big file

any and all help appreciated, thanks

View Replies !    View Related
Loading XML Content
Hello I'm trying to load content from an XML document to text box.

I got this code from a text book where the firstChild was accessed from the XML. I want to change this to the child of the firstChild.

but my attempt doesn't work... can anyone tell me why?

Actionscript:

articleXML = new XML();
articleXML.ignoreWhite = true;
articleXML.onLoad = function(success) {
if (success) {
gotoAndStop("start");
}
};
articleXML.load("articles.xml");
function show(num) {
var xmlArray = articleXML.firstChild.firstChild.childNodes;
var currentArticle = xmlArray[num].firstChild.firstChild.nodeValue;
node.text = currentArticle;
for (var i = 1; i<=4; i++) {
if (i != num+1) {
_root["menuButton_"+i].frame.removeMovieClip();
}
}
_root["menuButton_"+(num+1)].createEmptyMovieClip("frame", 1);
with (_root["menuButton_"+(num+1)].frame) {
lineStyle(1, 0, 100);
lineTo(72, 0);
lineTo(72, 17.4);
lineTo(0, 17.4);
lineTo(0, 0);
}
}
menuButton_1.buttonLabel.text = "Node 1";
menuButton_1.onRelease = function() {
show(0);
};
menuButton_2.buttonLabel.text = "Node 2";
menuButton_2.onRelease = function() {
show(1);
};
menuButton_3.buttonLabel.text = "Node 3";
menuButton_3.onRelease = function() {
show(2);
};
menuButton_4.buttonLabel.text = "Node 4";
menuButton_4.onRelease = function() {
show(3);
};

*******

XML:

<root>
<section1>article 1
<node1> node entry 1 <node1/>
<node2> node entry 2 <node2/>
<node3> node entry 3 <node3/>
<node4> node entry 4 <node4/>
</section1>

<section2>article 2 content
</section2>

<section3>article 3 content
</section3>

<section4>article 4 content
</section4>
</root>

View Replies !    View Related
Using XML For Loading Content
Hi,

I am really interested in using XML to populate sites but would like if someone could describe best way to organise structure. For example if there are a lot of content areas how do u organise XML? Is it possible to put all content in one file then get textarea to load just certain tags like <homepage>blabla</homepage> or do they have to be separate files? What is the recommended way at approaching website using XML to make it optimized and easy to update, for example in a portfolio so you can easily add new projects and not have to renumber all old project like in txt files which is pain etc. Cheers

View Replies !    View Related
Loading Content From XML
Hey All,

So here's my deal- I have a custom-built FLV Playback component (with captions) and need to load the following items from an XML file named "xml_doc.xml":

<?xml version="1.0" encoding="UTF-8"?>
<playlist id="Here's The Video" >
<vid desc="Introduction to Biological Terrorism Agents"
src="Intro.flv"
thumb="Intro.jpg"
caption="Intro.xml"
</playlist>

On the stage, here's what things are named:

-my FLVPlayback Component is named myVideo
-my thumbnail/preview image (empty movie clip) is named myPoster
-my FLVPlaybackCaptioning Component is named captioning

So how do I get these things to all get read from the XML document? It's easy to do it all through the FLA and hard-code the paths, but I can't seem to figure it out.

Any help would be greatly appreciated.

Joe

View Replies !    View Related
Loading Content Into A MC
Does anyone know how to do this? I am pretty sure it's possible. I am looking for images more than text, but it would be nice to know how to load both.

Thanks,
Gerard

View Replies !    View Related
Loading Content From Other Url's
I have a flash file that I need to load content from a php file in another subdomain of the site. This works fine when I test the flash file but when I upload it, it doesn't work and can't seem to load the data. I've added allowScriptAccess="always" to the html code and it still won't work. Does anyone know why this might be?

Many thanks,

- Jim.

View Replies !    View Related
XML Content Is Loading In URL - Why?
The content of XML file i am calling is loading into the URL when i getURL and i wish to trim it or simply get rid of the content and keep the url










Attach Code

import flash.display.BitmapData;

function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
image_height = [];
image_width = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
image_width = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
image_height = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;

_parent.container_mc.createEmptyMovieClip("mc_" + i, _parent.container_mc.getNextHighestDepth());
_parent.container_mc["mc_" + i]._x = 30 * i;
_parent.container_mc["mc_" + i]._y = (_parent.container_mc._height - image_height ) / 2;


var mclListener:Object = new Object();
mclListener.onLoadInit = function(target_mc:MovieClip) {
var bitmap:BitmapData = new BitmapData(target_mc._width, target_mc._height, true);
target_mc.attachBitmap(bitmap, target_mc.getNextHighestDepth(), "never", true);
target_mc.clear();
bitmap.draw(target_mc);
target_mc._height = 250;
target_mc._width *= target_mc._yscale/100;
target_mc.onRelease = function(){ getURL("http://www.google.com","_blank","GET"); }
};


this["image_" + i + "_mcl"] = new MovieClipLoader();
this["image_" + i + "_mcl"].addListener(mclListener);
this["image_" + i + "_mcl"].loadClip(image, _parent.container_mc["mc_" + i]);


}
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images.xml");

View Replies !    View Related
Loading Content
hello everyone

is it possible to load into a containerMC (MX) external "html" content ?

thx in advance

View Replies !    View Related
LOADING CONTENT
hello everyone

is it possible to load into a containerMC (MX) external "html" content ?

thx in advance

View Replies !    View Related
Content Not Loading
at my site Mediaatomic.com I have PHP/MySQL talking to flash

when the holder movie opens it loads my home.swf into the content movie clip... It works fine once but if you click the home button (which runs the same function) or refresh the page it blanks out the text field and won't reload the content. does anyone know how I can fix this or what's causing the problem?

my code for the holder

ActionScript Code:
stop();goHome();function goHome() { _root.background_mc.gotoAndStop(1); _root.holder_mc.loadMovie("home.swf");}home_mc.onRelease = function() { goHome(); //_root.holder_mc.loadMovie("home.swf");};


my code for the home.swf


ActionScript Code:
/*--------- set variables------------*/var format = new TextField.StyleSheet();var path = "mediaAtomic.css";var blogStuff_lv:LoadVars = new LoadVars();/*--------- Load Stuff------------*/format.onLoad = function(loaded) { if (loaded) {  blogStuff_lv.onLoad = function(success:Boolean) {   if (success) {    blog_txt.styleSheet = format;    blog_txt.text = this.blog;   } else {    blog_txt.text="Bad PHP Read Please Refresh";   }  }; } else {  blog_txt.text="Bad CSS Read Please Refresh"; }};blogStuff_lv.load("flashFeed.php");format.load(path);

View Replies !    View Related
Loading XML Content From One To Another...
Is it possible to load XML content from one XML file to another? In other words I would like to make a menu that can choose which XML file is being loaded into a movieclip. If so do you gus know how?

View Replies !    View Related
Loading Content From XML...
Hey All,

So here's my deal- I have a custom-built FLV Playback component (with captions) and need to load the following items from an XML file:<?xml version="1.0" encoding="UTF-8"?>
<playlist id="Here's The Video" >
<vid desc="Introduction to Biological Terrorism Agents"
src="Intro.flv"
thumb="Intro.jpg"
caption="Intro.xml"
</playlist>

On the stage, here's what things are named:my FLVPlayback Component is named myVideo
my thumbnail/preview image (empty movie clip) is named myPoster
my FLVPlaybackCaptioning Component is named captioning
So how do I get these things to all get read from the XML document? It's easy to do it all through the FLA and hard-code the paths, but I can't seem to figure it out.

Any help would be greatly appreciated.

Joe

View Replies !    View Related
LOADING CONTENT
hello everyone

is it possible to load into a containerMC (MX) external "html" content ?

thx in advance

View Replies !    View Related
Content Not Loading In IE
Hello All,

site: jonrossway.com

I have a strange dilemma. The above page loads fine in Safari and Firefox. When loaded into IE 7, the dynamic content loaded via MovieClipLoader refuses to load. I have noticed this particularly after you visit the page once, close the browser, then enter the URL again. Hitting F5 fixes the issue. I am using the latest SWFObject..

Could this be a cache issue? Is there any way to fix this?

View Replies !    View Related
Content Loading ?
Okay, here is the situation.

I want to load information (preferably HTML files) into a movie.

Or, basically I just want to have content in my flash movie that I can easily update.

What is the simplest way I can go about doing this ??

Is there a better alternative to the loadVariableNum ?

View Replies !    View Related
Help With Loading HTML Content
Greetings

I was wondering if anyone know of some good tutorials / lessons for loading HTML in FlashMX?

Thanks in advance

View Replies !    View Related
Loading Movies With Some Same Content
I have two swf's that I am loading into my site. The thing is that both swf's have some of the same pictures in it. My question is could this be optimized so that the same pictures could be loaded once and recognized, so that if the other swf loads it nows not to redownload that particulat picture. Thanks in advance for any help.

View Replies !    View Related
Loading Dynamic Content
i'm having a couple of problems here.
ok, here's what i have so far...
in the past i've had no problems with loading swfs into an existing swf file. i usually just use on main movie that is at level 0 that has the menu items and everything and then load every other section into level 1. but... for some reason, when i do it with this new project, every time i import something, whether it be an external text file or another swf file, the entire work area just displays the background color. if it helps, here's the script i'm using to load files into my existing movie.

this is in a movie clip that is on the main timeline.

loadVariablesNum("myText.txt", 0)
stop();

and the text field in the frame that the action is on is "dynamic" and the variable is named correctly, in accordance to the variable name within the text file.

if somebody could help me with this, it would be much appriciated... thanks you.

View Replies !    View Related
Dynamic Content Loading
First of all please forgive the multiple posts. This is a new problem for you gurus.
In order to setProperty to a mc(container) with dynamically loaded content, the content must be loaded first then its properties changed. How are you guys/gals doing this? I realize that if the mc_container has a graphic placed on its timeline, then, lets say, its position can be changed before the content loads. This is of course useful for recentering or whatever is needed. BUT, what if the content is jpgs or swfs of different sizes? Is there some way to know when the content is loaded so then its properties can be seen and changed. I can think of other circumstances where this would be useful, such as if you had a box that grows to the size of your content to frame that content. The content would have to be loaded, alpha set to 0, size checked, the box size set based on the content, then the content would be made visable.
Hope this makes sense.
TIA

View Replies !    View Related
| Help Me To Decide..-> Loading Content|
My personal site is http://www.prodesigns.nl (still in progress and has not yet a preloader/interface)

My problem is i'm not sure how to doe the content... a lot of flash sites use separate .swf movies to load as content... but i want it to be transparent (the background of the swf)... My question is how to fix the content the best way (with preloader).

Thnx alot!

View Replies !    View Related
Help Needed>loading Content
Hi,I've loaded a swf file(visual) using a nextmovie script triggered by a button.It worked well.Know I've added the same code to load in content1 to 4(external swf).Know the visuals don't won't to load anymore.If I remove the script for loading the content it works.Probebly a nextmovie function only loads one content at a time how make it possible to load in two external swf's.They both have different targets to load in so ..Can someone have a look at the script and solve this prob.For me.Big thx in advance.

but1.onRelease=function(){
//set a variable that stores the next external movie to be loaded
nextMovie="visual1.swf";
//tell the cover mc to play its closing animation
cover.gotoAndPlay("close");
}
but2.onRelease=function(){
nextMovie="visual2.swf";
cover.gotoAndPlay("close");
}
_root.visual.loadMovie("visual1.swf");

loadMovieNum("sound2.swf",1);
but1.onRelease=function(){
//set a variable that stores the next external movie to be loaded
nextMovie="content1.swf";
//tell the cover mc to play its closing animation
cover_content.gotoAndPlay("close");
}
but2.onRelease=function(){
nextMovie="content2.swf";
cover_content.gotoAndPlay("close");
}

View Replies !    View Related
Problem On Loading Content
Hi,I've loaded a swf file(visual) using a nextmovie script triggered by a button.It worked well.Know I've added the same code to load in content1 to 4(external swf).Know the visuals don't won't to load anymore.If I remove the script for loading the content it works.Probebly a nextmovie function only loads one content at a time how make it possible to load in two external swf's.They both have different targets to load in so ..Can someone have a look at the script and solve this prob.For me.Big thx in advance.

but1.onRelease=function(){
//set a variable that stores the next external movie to be loaded
nextMovie="visual1.swf";
//tell the cover mc to play its closing animation
cover.gotoAndPlay("close");
}
but2.onRelease=function(){
nextMovie="visual2.swf";
cover.gotoAndPlay("close");
}
_root.visual.loadMovie("visual1.swf");

loadMovieNum("sound2.swf",1);
but1.onRelease=function(){
//set a variable that stores the next external movie to be loaded
nextMovie="content1.swf";
//tell the cover mc to play its closing animation
cover_content.gotoAndPlay("close");
}
but2.onRelease=function(){
nextMovie="content2.swf";
cover_content.gotoAndPlay("close");
}

View Replies !    View Related
Loading Content Issues...
Hi,
This can't be that hard a query, but I'm a designer and not that hot with my scripting, so bear with me...

Right, I have a main flash movie into which I want to load 5 other swfs; each loaded when its corresponding button is released.
So far nice and easy - at the moment, on each of my 5 buttons, I have the following script...

on (release) {
loadMovieNum("filename.swf", 99);
}

...where "filename.swf" is replaced with the correct swf name depending on the button.

My problem is, that I want a transition between one movie loading and the next.
ie. If movie1 has been loaded in from pressing button1, when button2 is pressed, I want Movie1 to fade out and then Movie2 to fade in. I don't know how to create a transition like this.

Anyone know how I would script it so this can happen?

Cheers in advance for your help...

View Replies !    View Related
Pre-loading Scrollpane Content
Hi

I've got a pretty simple movie.
2 scenes

second scene has scrollpane, to load external swf as content.
I have an action layer with this.
eggs_sp.loadScrollContent("eggs000.swf");
Works fine.

The first scene is to be the preloader.
with this script running the show.

if (eggs_sp._framesloaded >= _totalframes) {
gotoAndPlay ("Scene 2", "1");
} else {
total_bytes = eggs_sp._framesloaded.getBytesTotal();
loaded_bytes = eggs_sp._framesloaded.getBytesLoaded();
remaining_bytes = total_bytes-loaded_bytes;
percent_done = int((loaded_bytes/total_bytes)*100);
bar.gotoAndStop(percent_done);
}

This is not working.
Help!

Thanks in advance
eggs

View Replies !    View Related
Loading Content Into A Frame
I have a five button nav bar that I would like to place within a frame.
I would like to load content into an adjacent frame depending on which button is selected in my nav bar.
How would I code this?

Thanks

View Replies !    View Related
Dynamic Content Loading
Hi All,

I've got a little question:

Is it possible to swap the contents of a movie clip using actionscript if this movieclip was created non-dynamically (read using Flash GUI)?

I've got some placeholder movieclips on my stage, that I move around during the animation. However in the first frame I attempt to load jpgs in each movieclips (they each contain a white square so I can position them properly in the flash gui)

The problem I am having is that if I do the following:

wImg.unloadMovie();
wImg.loadMovie("aFile.jpg");
trace(wImg._url));

rather than getting the URL of the jpg, I get the URL of my flash .swf file... It never loads the jpg...

So i'm a little flumuxed. Anyone have any ideas?

many thanks,

Tom.

View Replies !    View Related
Loading Content In Background
Hi,

Is it possible to load a SWF in background (i don't want it to appear immediatly)
I want to load it in background and on a specific frame to show it.

thanks

View Replies !    View Related
Loading Content Question
What is the best way to check for content to be completely loaded. I am loading content from a text file and on the initial load I am getting an undefined statement in my textfields.

My first 3 frames.

Frame 1
//
loadVariablesNum("content.txt", 0);
loader = "false"

Frame 2
empty

Frame 3
//
if (loader == "False")
{
gotoAndPlay(2);
}
else
{
gotoAndPlay(4);
}


In my text file that I load, the last variable is loader = "True"


Why doesn't this work, its seems pretty simple.

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