Loading Swfs Dynamically With Xml
I'm using flash mx and have a number of games that use xml files to 'pull' swfs into flash templates while the game loads. Therefore each time the game loads the user plays a different version of the game, and my game templates can be re-used by colleagues who simply have to alter the xml and graphics.
I have heard reports of flash player 6 finding this dynamic loading a problem as the player continues to load the assets even when the game closes, eventually crashing the browser. Does anyone have any experience of this and any advice on how to fix it? Thanks. Andy Oxford.
FlashKit > Flash Help > Flash General Help
Posted on: 02-24-2004, 06:55 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Loading Swfs Dynamically With Xml
I'm using flash mx and have a number of games that use xml files to 'pull' swfs into flash templates while the game loads. Therefore each time the game loads the user plays a different version of the game, and my game templates can be re-used by colleagues who simply have to alter the xml and graphics.
I have heard reports of flash player 6 finding this dynamic loading a problem as the player continues to load the assets even when the game closes, eventually crashing the browser. Does anyone have any experience of this and any advice on how to fix it? Thanks. Andy Oxford.
Loading SWFs Dynamically With Xml
I have a series of swf files that I want to play in a container swf.
Want to be able to change the order they play.
Want them to continue at the 1st file after the last has played.
Want them to have a random option as well.
If there is only 1 movie it will just loop.
I want to control it all dynamically with an external xml file.
Any suggestions on how to start, tutorials, scripts?
Loading SWFs Dynamically With Xml
Loading SWFs dynamically with xml
I have a series of swf files that I want to play in a container swf.
Want to be able to change the order they play.
Want them to continue at the 1st file after the last has played.
Want them to have a random option as well.
If there is only 1 movie it will just loop.
I want to control it all dynamically with an external xml file.
Any suggestions on how to start, tutorials, scripts?
Loading External SWFs Dynamically?
How would I write the following in ActionScript...
- I have 2 external SWFs I want to load. Their height will change over time as I add more content to each SWF.
- I want to load one SWF, then directly below it, load the other SWF.
- The X-location and width of the SWFs should never change.
How would I code something that loads an external SWF, checks the Y-height of it, then loads another SWF below it?
Dynamically Loading & Checking For Loaded.swfs
Dynamically Loading & Checking for loaded.swfs
In detail: Running _level0 I would like to be able to check if additional .swf files are available in the flash directory containing movies to be loaded and loop through them accordingly.
Can this be done?
Loading External Swfs And Dynamically Fading Them In And Out
loading external swfs fade in fade out
ok i have a main movie im loading one swf then when i click a button want it that old swf to fade out and the new swf to fade in heres my code also how can i have a loadbar each time i load the external swfs does the loadbar have to be in the external swfs or on the main timeline
or can someone just point me to a tutorial tahnks
for the buton i have--
but.onPress = function () {
_root.createEmptyMovieClip("container", 1);
_root.container.fadeOut = true;
_root.container = "loaded3.swf"
loadMovie("loaded3.swf", "container");
container._x = 130 ;
container._y = 76 ;
}
on a blank frame i have--
but.onPress = function () {
if (fadeOut == true){
if (_alpha > 0){
_alpha -= 5
} else {
_alpha = 0
unloadMovie("loaded3.swf");
loadMovie (who, this)
fadeOut = false //this part to prevent the fadeout/load action from being repeated
}
}
but.onPress = function () {
function (out) {}
if (fadeIn == true){
if (_alpha < 100){
_alpha += 5
} else {
_alpha = 100
fadeIn = false
Loading External Swfs And Dynamically Fading Them In And Out
loading external swfs fade in fade out
ok i have a main movie im loading one swf then when i click a button want it that old swf to fade out and the new swf to fade in heres my code also how can i have a loadbar each time i load the external swfs does the loadbar have to be in the external swfs or on the main timeline
or can someone just point me to a tutorial tahnks
for the buton i have--
but.onPress = function () {
_root.createEmptyMovieClip("container", 1);
_root.container.fadeOut = true;
_root.container = "loaded3.swf"
loadMovie("loaded3.swf", "container");
container._x = 130 ;
container._y = 76 ;
}
on a blank frame i have--
but.onPress = function () {
if (fadeOut == true){
if (_alpha > 0){
_alpha -= 5
} else {
_alpha = 0
unloadMovie("loaded3.swf");
loadMovie (who, this)
fadeOut = false //this part to prevent the fadeout/load action from being repeated
}
}
but.onPress = function () {
function (out) {}
if (fadeIn == true){
if (_alpha < 100){
_alpha += 5
} else {
_alpha = 100
fadeIn = false
Dynamically Loading Swfs Alpha Fade In
ok i have a main movie im loading one swf then when i click a button want it that old swf to fade out and the new swf to fade in heres my code also how can i have a loadbar each time i load the external swfs does the loadbar have to be in the external swfs or on the main timeline
or can someone just point me to a tutorial tahnks
for the buton i have--
but.onPress = function () {
_root.createEmptyMovieClip("container", 1);
_root.container.fadeOut = true;
_root.container = "loaded3.swf"
loadMovie("loaded3.swf", "container");
container._x = 130 ;
container._y = 76 ;
}
on a blank frame i have--
but.onPress = function () {
if (fadeOut == true){
if (_alpha > 0){
_alpha -= 5
} else {
_alpha = 0
unloadMovie("loaded3.swf");
loadMovie (who, this)
fadeOut = false //this part to prevent the fadeout/load action from being repeated
}
}
but.onPress = function () {
function (out) {}
if (fadeIn == true){
if (_alpha < 100){
_alpha += 5
} else {
_alpha = 100
fadeIn = false
}
Dynamically Loading Swfs - Next Button On Main Stage - How To Make It Work... ?
Hi all,
First time post to these forums long time reader...
Ok I was wondering if someone could help me on this small problem I am having. I have a total of 4 flash movies. The first movie will house all my navigation as shown below:
[Movie 2] [Movie 3] [Movie 4] [Pause] [Skip to Next Movie]
I am not sure if this is actually even possible thinking about it. Ideally lets say the user is watching [Movie 3] and they hit the skip button. I would like to have some sort of fade out occur and [Movie 4] to start playing.
So I have figured out all the code I need except for the [Skip to Next Movie] code. Since this button is in the first movie I figure it must be aware of which movie is currently playing in order for it to pick the next one in sequence. So if [Movie 3] is playing then play [Movie 4]
If anyone have any insight or has seen a tutorial that they could share I would really appreciate it. I know in Flash 2004 this is a bit simpler to create but unfortunately this one has to be done in MX.
thanks in advance
Loading SWFs Into FLAs And Making The SWFs Transparent HELP
I have a set of buttons inside a movieclip, inside a movie clip (if that makes sense).
When the buttons are clicked I need them to load a content .swf file into frame 2 at at specified position (x=20, y=140)
I also need the .swf being loaded in to have a transparent background.
How can I achieve this?
I cannot include the .fla files for your perusal because the KirupaForum uploader can't upload bigger than 2mb and my zip file is 5.28mb or something like that.
Loading SWFs Into FLAs And Making The SWFs Transparent HELP
I have a set of buttons inside a movieclip, inside a movie clip (if that makes sense).
When the buttons are clicked I need them to load a content .swf file into frame 2 at at specified position (x=20, y=140)
I also need the .swf being loaded in to have a transparent background.
How can I achieve this?
I cannot include the .fla files for your perusal because the KirupaForum uploader can't upload bigger than 2mb and my zip file is 5.28mb or something like that.
Loading External Swfs Into Externally Loaded Swfs.
ive got some buttons on my main timeline that im using to load external swfs into an empty mc. the buttons are coded with the following:
on(release){
if(_root.currMovie == undefined){
_root.currMovie = "1";
emptyMC1.loadMovie("1.swf);
} else if (_root.currMovie != "1") {
if (emptyMC1._currentframe >=
emptyMC1.midframe) {
_root.currMovie = "1";
emptyMC1.play();
}
}
}
1.swf also has some buttons that load external swfs into a second empty mc. those buttons are coded with the following:
on(release){
if(this.currMovie == undefined){
this.currMovie = "2";
emptyMC2.loadMovie("2.swf");
} else if (this.currMovie != "2") {
if (emptyMC2._currentframe >=
emptyMC2.midframe) {
this.currMovie = "2";
emptyMC2.play();
}
}
}
1.swf loads into emptyMC1 ok, and 2.swf loads into emptyMC2 ok.
when i press any of the buttons on the main timeline, the outro animation of 1.swf plays correctly, but the outro animation of 2.swf does not. is there a way to the buttons so that the emptyMC's unload sequentially?
Loading Swfs Into Swfs: Undesireable Result
Situation:
I am using one swf to import other swfs dynamically based on user input (menu with buttons that are dynamically configured once the SWF has loaded).
I built the framework/base (I will refer to this as mainframe.swf) movie in Flash, I then built the populating SWFS in Swish Max (they will be called ad.swf).
When I load the swish max movies into the flash, they show up in the right location and everything, but if the imported movie (ad.swf) has items/shapes that over hang the bounds of the movie, the show up in the framework swf.
and example can be seen here, the issue is in the second ad (CFP):
https://fieldnet3.massmutual.com/fnm...ig002-temp.xml
I want to restrict the visible area of the loaded movie to the original movie that is it populating ( I replace a content holder.swf with ad.swf using a loadMovie). In the movie I am loading int the framework, I have created a white mask to block anything outside of the grey box. This just proves to obscure the buttons, title etc. in the mainframe.swf
The buttons are loaded dynamically as movie clips and I have assigned them to a level 10 levels above the movieclip that holds the ads, this doesn't seem to make them take precedence....
Any one have any ideas on how I can make the movie clip on the edges or make the buttons raise up?
Code availabe as needed.
Allen
Loading/Unloading - Swfs Inside Of Swfs
Here we go...
---------------------------------------------
I have a main.swf.
Main.swf contains 4 buttons(about, portfolio, contact, clients).
These for buttons call in external swfs(ex. portfolio.swf) into an empty movie clip on the main.swf stage.
inside portfolio.swf are three more buttons(print, web, logos)
When you click on one of these buttons they need to call in another external swf(web.swf) and also remove itself(portfolio.swf)
---------------------------------------------
That is where I run into my problem.
this is the code i am using for the original buttons on the main.swf:
Code:
function initMovieLoad(path) {
movieToBeLoaded = path;
if(!initializedExternalMovies) {
initializedExternalMovies = true;
loadNewMovie();
} else {
target.gotoAndPlay('midpoint');
}
}
_global.loadNewMovie = function() {
target.unloadMovie();
target.loadMovie(movieToBeLoaded);
target._y=-130;
target._x= -160;
}
var mc:MovieClip = this.createEmptyMovieClip('target', this.getNextHighestDepth());
initMovieLoad('intro.swf');
this.homeBTN.onRelease = function() {
initMovieLoad('home.swf');
}
this.aboutBTN.onRelease = function() {
initMovieLoad('about.swf');
}
this.portfolioBTN.onRelease = function() {
initMovieLoad('portfolio.swf');
}
this.clientsBTN.onRelease = function() {
initMovieLoad('clients.swf');
}
this.contactBTN.onRelease = function() {
initMovieLoad('contact.swf');
}
I thought I could just place this code inside the portfolio.swf and boom, everything would be set. but it didnt work.
I need to know how to call from the main.swf that web button inside of the portfolio.swf to bring in the web.swf
Any ideas would help at this point. THX
Dynamically Sending Swfs
Hello,
I have created a silly sketch pad game
http://www.jaxinteractive.com/sketchy/
I would love users to be able to draw pictures and then send these to friends...
Wandering if this is possible?!
Thanks,
jax
Dynamically Load Swfs?
Here's a problem for ya: I am building a flash site for a friend. She wants it to be "jello" -- that is, expand or contract as necessary to fill the browser window in whatever screen resolution a user may have. Is there a way to dynamically load MCs to do this? The attached file is the "frame" of the site. Across the blue background there will be three more MCs yet to be built: two for either side and one for the center. It's plenty wide and tall now, but not at some resolutions. Complicating this already complicated problem is the banner and footer, both of which would have to orient themselves to the top and bottom of the screen and stretch out or contract as necessary to fill the browser. And there is a background MC that changes alpha. Sure, I could solve this somewhat by putting the elements in a table (controlling the alpha with js) but then I would lose the nice repositioning effect of the logo (unless I packed my brain with more AS than would be safe to know). Is there any answer to this hare-brained scheme? KD
Saving Swfs Dynamically
So I'm creating a paint program and i want to be able to have users save their work in a form that can be transmitted to a database like a jpeg or even a swf, but with the new content they have created. Does anyone know how to do this? Thanks in advance.
Pat
Loading Other Swfs From Loaded Swfs
Flash - 8 : Above is an example of what I would like to do/have done. I've gotten as far as loading the "loaded.swf" into the "start.swf" but my problem is I'd love to use that little loading action I made earlier without copying and pasting into the new movie the same actions for a different link. So, how do I load "loaded2.swf" into "loaded.swf" via the link in "loaded.swf"?
If you need anything just ask, also, any help is useful.
Thanks
Dynamically Loaded Swfs And Depths
What i have - I have 3 external swfs (small 1.swf, small2.swf, small3.swf) being loaded into one swf (big.swf). Each of the small swfs has a panel that opens on rollover.
What i want - To control the depth of each small swf so that when you rollover one of them it expands and covers the other two.
My Script - (That doesn't seem to work)
.................................................. .......
loadMovie ("small1.swf", small1_mc)
loadMovie ("small2.swf", small2_mc)
loadMovie ("small3.swf", small3_mc)
small1_mc.onRelease = openPanel;
small2_mc.onRelease = openPanel;
small3_mc.onRelease = openPanel;
function openPanel() {
this.swapDepths(99);
this.play();
}
.................................................. .......
Help!
[F8] Dynamically Uploading And Interacting With .SWFs
Ok, so I want to make a website that has a master flash file that dynamically loads the navigational bar, banner, and page-loading-area as separate SWF files.
Now I know how to use MovieClipLoader to do this, but what I don't know is how to interact with those movies once I've loaded them in. For instance, getting the buttons on the navi-bar to interact with the page-loading-area. (IE: press home button[on the uploaded navi-bar SWF] and have the home.swf load in the loading-area.)
Any help on this would be great! I only hope I explained it clearly.
(PS: I'm using Flash CS3; Action Script 2.0, because I'm very unfamiliar with CS3. However, if you think CS3 would make this easier, I'll be happy to give it a try.)
[F8] Preloader For Dynamically Loaded SWFs?
Hello all,
So I'm building a portfolio site for someone which individually loads external SWFs into a MC (with createEmptyMovieClip) on my root timeline. Since the loaded SWFs are acting as the gallery images, I want to add a simple preloader to each of them. However, I don't know where to add the preloader. Do I insert one into each external SWF on frame 1? Or do I somehow insert one into the emptyMovieClip that loads the SWFs?
Any insight would be much appreciated!
Tab Order With Dynamically Loaded Swfs?
Dear flash geniuses,
I am trying to make an interactive campus map accessible to keyboard users by controlling tab order. My goal is to allow the user to tab to a button, hit "enter", a movie pops up, tab to buttons within that movie (including a close button), then tab to the next movie.
Before writing a tabIndex sequence in AS, the tabbing was random; but after several tab-key clicks, the user would eventually get to the close button within the open clip.
Movie structure: I have 8 buttons which each dynamically load a corresponding clip from the library into a duplicated empty movie clip. Within each of these clips are two buttons: one that makes the clip draggable, and one that removes the movieclip. Both have instance names.
I was able to use the tabIndex actionscript to tell which order to tab the buttons in the main movie. I tried including the full path to the button instances, as well as adding a similar script to the individual clips. However, this method not only ignores the buttons inside the dynamically loaded clips, they are never tabbed to at all.
Has anyone found a suitable workaround for ordered tabbing inside dynamically loaded clips alongside on-stage movie clips? I've read something about making everything "silent" then having another movie offstage, but the information wasn't very detailed.
Any info is appreciated. Thanks for taking the time to read this.
Thanks,
Rochelle
Targeting Dynamically Loaded Swfs
Having trouble targeting movieclips in a dynamically loaded swf. (Flash 8, Actionscript 2).
I have a swf file, which contains a set of duplicated movieclips, that I am loading into another swf file (using the movieClipLoader() class), basically like this:
"swfA" is loading into "swfB", and I have clips 1, 2, and 3, inside "swfA."
I don't seem to be able to mouseover and click clips 1, 2, and 3, when "swfA" is loaded into "swfB". But when I run "swfA" on it's own, the clips are active and clickable.
I've tried setting "this._lockroot = true;" at the top of "swfA", and that helped in the duplicating script, but still no luck targeting the clips.
I usually execute the duplicating script on the main swf (swfB), but I wanted to contain everything in a swf, thinking it might be simpler. But the targeting problem has me scratching my head.
Any ideas?
Thanks.
Dynamically Populating An Array SWFs
I'm having a bunch of trouble using a loader to populate an array. I'm trying to use one loader contained in a loop along with the push method. Is this possible to use a single loader or do I need to create an array of loaders as well. With the code I'm using now all the positions in the array end up showing the last SWF that I call.
Here's the code:
for(var i:int=1; i <= 4; i++){
caseName = "case" + _caseCounter + ".swf";
trace(caseName);
_caseCounter++;
var panelLoader:Loader = new Loader();
panelLoader.load(new URLRequest("casefolder/" + caseName));
panelLoader.contentLoaderInfo.addEventListener(Eve nt.COMPLETE, loaded, false, 0, true);
function loaded(evt:Event):void {
casePanel.push(panelLoader.content);
trace("pushed");
}
}
Dynamically Created SWFs On Serverside
Hello,
does anybody know (free) libraries to create SWF files on the serverside, for example as Ming does for PHP/Pyton...?
I'm looking for a solution to create a Flash 8 SWF, since Ming only supports Flash v4 it is not my first choice for sure :)
Thanx for your help.
@Todd: If you think this question is too close to "other than flash" just move it to my forum :)
Micha
Loading Pictures Dynamically To A Dynamically Loaded Clip
Here's the issue. I'm creating a video player and EVERYTHING is working swimmingly except for one thing. On my list of available videos (which is XML driven) everything reads in correctly and the movie clips are added correctly, but I can't get the thumbnails to add to the stage. Someone help!! Here's the code I'm using:
EDIT: Oh yeah, the thumbs are located in a separate directory and the location is indicated in the xml file. the "vidList" variable is my XML list.
PHP Code:
function loadPics():void //this is the first function called...{ for(var i:uint = 0; i < vidList.length(); i++) { var picLoader:Loader = new Loader(); picLoader.addEventListener(Event.COMPLETE, onPicLoaded); picLoader.load(new URLRequest(vidList[i].thumb)); trace(vidList[i].thumb); picLoader.width = 72; picLoader.height = 54; picLoader.x = 0; picLoader.y = 0; picLoader.name = vidList[i].title; } populateList();}function onPicLoaded(e:Event):void //this should be called after each pic is loaded, but the trace statements have yet to appear.{ trace("________________________"); trace(e.currentTarget.name); trace("________________________");}function populateList():void //everything in here works fine{ for(var i:uint = 0; i < vidList.length();i++) { var lItem:ListItem = new ListItem(); lItem.title.text = vidList[i].title; lItem.caption.text = vidList[i].caption; lItem.x = 5; lItem.y = 7+(79*i) lItem.filters = [dsf, bf]; lItem.name = vidList[i].title; list.addChild(lItem); lItem.addEventListener(MouseEvent.CLICK, clickVideo); }}
Can anyone give me any kind of suggestion on how to do this?
Basically, after all the foundation stuff for the video player is done, it calls the loadPics function. That is supposed to load each pic and then upon the pic being loaded, it was going to call the onPicLoaded function and I was going to (somehow) pass them to some type of array. Then, in my populateList function I would just use "i" to put the correct pic with the correct video.
Please help! I can give you more if you need it. I just don't know what else to post.
Dynamically Loading Images Into Dynamically Loaded MovieClips
I'm read through many of the posts and found several on this topic, none, however, that addressed all that I need addressed. I've tried several of the suggestions but so far nothing seems to work.
What I want to do is alter the width of images loaded dynamically into a dynamically loaded set of movieclips. all of the widths of the images are different, but i want them set to the same width. The width seems to stay at zero, however, and I cannot seem to change it.
Here is my code:
for (var i:Number = 0; i < 8; i++){
var mc = attachMovie("rect_mc", "r" + i, this.getNextHighestDepth());
mc._x = 90 + (i * (mc._width+5));
mc._y = 375;
mc.img_txt.text = "image" + (i+1);
mc.img_mc.loadMovie("myPic" + (i+1) + ".jpg");
mc.img_mc._xscale = mc.img_mc._yscale = (50/mc.img_mc._width) * 100;
};
The last line is the one that does not function properly.
I'd appreciate any help anyone can provide. thanks.
Problem With Loading Jpegs Dynamically Into Dynamically Created MC's
hey all. I got a problem with loading jpegs dynamically into dynamically created MC's. I've been using NEIL WEBB's tutorial on dynamic creation with event handling through the LISTENER component, which you can see here http://www.actionscript.org/tutorial...MX_2004_Part2/
I have slightly altered the script to accomodate the fact that I want to attach a movieclip with text fields and image holders within it, but the code aint too different I don't think.
Code:
stop();
myMCL = new MovieClipLoader(); //define MovieClipLoader
myListener = new Object(); //define listener
myListener.onLoadComplete = function(targetMC){ //set the onComplete function on listener
trace("targetMC = " + targetMC._name);
targetMC.onPress = function() { //define onPress within function
}
}
//****************************
function initClips(){
//trace(_global.gallery_cnt);
for (i=1; i<=_global.gallery_cnt; i++){
//trace("Attaching Clip - " + i);
this.gallery_TN_holder.attachMovie("TN_Holder", "TN_Holder" + i, i); //attach the movie
this.gallery_TN_holder["TN_Holder"+i]._x = (i-1)*90; //spacing
this.gallery_TN_holder["TN_Holder"+i].TN_Text.text = _global.gallery_array.description;
[i] [i]myMCL.loadClip(_global.gallery_array.main_thumbnail ,this.gallery_TN_holder["TN_Holder"+i].TN_Image);
//load images into clip
}
play();
}
//****************************
myMCL.addListener(myListener); //associate listerer with MCL object
initClips();
The first line ("trace") in bold outputs
Quote:
targetMC = TN_Image
targetMC = TN_Image
which you can see is resulting from the second bold line.
Basically I need some direction with this as to how to reference the clip target for the loaded JPEG, as my output in the movie shows the attachMovie works, as does the text change within the individual "TN_Holder" clips. What the hell am i doin wrong, cos my eyes are kinda starting to go kinda funny looking at this stuff!!!!!
Thanks for any help!
Checking Vars Of Dynamically Loaded Swfs
as of now i have only experimented with the mc.loadMovie() function and merely loaded another swf into my main one.
however i need some more functionality. what i am trying to do is have a main movie with nothing else but a container movie clip which will be used to loadMovie() each individual part of my site. at first it will load the intro page. i want to do it this way so that i can load each part
separately.
but, in my initial intro page.. there are two buttons which the user can pick to go to different portions of the site. each button merely sets a variable. what im trying to do is read that variable from my main movie. i need to unload the intro swf from the container, then depending on the variable value, reload a different swf into it. this is where i am stuck.
any type of assistance would be greatly appreciated.
illusion
Referencing Subclips In Dynamically Loaded Swfs?
Hi,
I'm trying to reference a subclip in a .swf file that I'm loading into an empty movieclip on the root of my main movie.
Using createEmptyMovieClip, I'm creating a movieclip called Clip on the root of my main movie.
Then, using Clip.loadmovie, I'm loading a .swf file called Clip1.swf.
This part works, because I can see the loaded file in the main movie.
Now for the part that doesn't work: In Clip1.swf is a movieclip called Shape1.
From the actionscript in the main movie, I'm trying to reference this Shape1 movieclip in the loaded .swf file in the following way:
Clip.Shape1.onRelease = function(){
trace ("It works");
}
I've also tried:
Clip1.Shape1.onRelease = function(){
trace ("It works");
}
But neither seem to work.
So, how do I reference this movieclip in my loaded movie???
Thanks,
Aragorn
Pausing SWFs With Dynamically Loaded Audio Within Them
Hi,
I'm creating what's turning out to be a rather long PowerPoint-style presentation in which the user clicks from slide to slide and watches an animated .swf with dynamically loaded audio. Some of the sections are rather long, and I'd like to give the user the ability to pause and play by button click.
I know how to stop and start the container MC that's loading the swfs, but it doesn't stop any embedded MCs within it and more importantly doesn't pause the sound object. Is there a way to pause sound objects on a global level so the button just pauses whatever object is playing? Also, I have a few sections with FLVs loaded into the SWF. I need something that will also pause them.
I'm not looking for someone to write my code (although a short example would be greatly appreciated), just looking for a game plan of sorts. I'm running MX04 and AS2.0 (I think).
Thanks!
-Sandy
Making Dynamically Loaded Swfs Disappear Automatically
I have loaded in an swf as a frame action on frame one of a movie clip like this...
loadMovieNum("balls.swf", 1);
the trouble is when I navigate to elsewhere on the timelime the movie keeps running - how do I get it to stop?
Thanks a lot for any help!
Loading Multiple Swfs And Xmls Started Before Finished Loading
Hi,
I have a encounter a problem regarding loading of the swfs and xmls files.
A preloader is done for these items. However it started playing before everything (swfs and xmls files) is loaded.
I have an array to contains all the files to be loaded. Using this array, i checked and see if the items are all loaded. If loaded, they will jump to the ready frame.
Anyone have any idea what is wrong??
Thanks.
Loading Swfs Into Swfs...
this may be a silly question but i've tried a few different things and i seem to be stuck... i was wondering what the proper action and/or path was for loading a swf into another swf in the same dreamweaver document... i have buttons on the left and an empty movie clip on the right and i'm trying to make the buttons on(release) load the little movie clips into the empty mc... they are separate flash files in one dreamweaver document...
any help would be much appreciated...
Loading AS3 Swfs Into AS2 Swfs?
I have some ActionScript 2.0 swfs that I (now that we have AS3) would like to load ActionScript 3.0 swfs into.
Code:
fscommand("fullscreen", "true");
function firstRun() {
firstRunSO = SharedObject.getLocal("firstRun");
if (firstRunSO.data.firstRun == undefined) {
trace("This is the first time the program has run");
System.showSettings(1);
firstRunSO.data.firstRun = false;
success = firstRunSO.flush();
stop();
} else {
trace("This is not the first time the program has run");
}
if (success) {
trace("Write successful");
}
}
firstRun();
var theMapMovie = this.createEmptyMovieClip("theMapClip", this.getNextHighestDepth());
theMapMovie._xscale = 80;
theMapMovie._yscale = 80;
theMapMovie._x = 200;
theMapMovie._y = -40;
var theChartMovie = this.createEmptyMovieClip("theChartClip", this.getNextHighestDepth());
theChartMovie._xscale = 80;
theChartMovie._yscale = 80;
theChartMovie._x = 200;
theChartMovie._y = 200;
loadMovie("maps/milestonemembers_map.swf", theMapMovie);
loadMovie("Charts/SpreadSheet.swf", theChartMovie);
stop();
The milestonemembers_map.swf (AS2) loads fine but the SpreadSheet.swf (AS3) doesn't. Can this even be done. Did I overlook that in the release notes? Will I have to re-write all my AS2 apps?
Thanks.
Combining External SWF Loading With Dynamically Loading Text Tutorial
I am trying to combine the external SWF loading tutorial with the dynamic text loading (via XML and CSS) tutorial.
Everything loads fine, except the stylesheet is not applied to the text. It must have something to do with the swf being externally loaded, correct?
Any ideas how to fix this?
Here is the code for Frame 1 of the externally loaded swf.
Code:
//init TextArea component
myText.html = true;
myText.wordWrap = true;
myText.multiline = true;
myText.label.condenseWhite=true;
//load css
kungFuStyle = new TextField.StyleSheet();
kungFuStyle.load("example.css");
myText.styleSheet = kungFuStyle;
//load in XML
kungFuContent = new XML();
kungFuContent.ignoreWhite = true;
kungFuContent.load("example.xml");
kungFuContent.onLoad = function(success)
{
if(success)
{
myText.text = kungFuContent;
}
}
midframe=10
All the files are in the same dir.
Combining External SWF Loading With Dynamically Loading Text Tutorial
I am trying to combine the external SWF loading tutorial with the dynamic text loading (via XML and CSS) tutorial.
Everything loads fine, except the stylesheet is not applied to the text. It must have something to do with the swf being externally loaded, correct?
Any ideas how to fix this?
Here is the code for Frame 1 of the externally loaded swf.
Code:
//init TextArea component
myText.html = true;
myText.wordWrap = true;
myText.multiline = true;
myText.label.condenseWhite=true;
//load css
kungFuStyle = new TextField.StyleSheet();
kungFuStyle.load("example.css");
myText.styleSheet = kungFuStyle;
//load in XML
kungFuContent = new XML();
kungFuContent.ignoreWhite = true;
kungFuContent.load("example.xml");
kungFuContent.onLoad = function(success)
{
if(success)
{
myText.text = kungFuContent;
}
}
midframe=10
All the files are in the same dir.
Loading Dynamic Textbox While Dynamically Loading Movie
Hi All,
So, I've got a movie on the stage (but offstage) called: Card. Inside this MC is a dynamic textbox called: CardName. I'm using a for loop to create a column of cards w/ their corresponding textboxes.
Here's the code:
for (var j = 1; j<=6; ++j)
{
var name = "Card_"+j;
var y = (j-1)*game.spacingY + game.originY;
game.path.attachMovie("Card", name, ++game.depth);
game.path[name]._x = x;
game.path[name]._y = y;
game.path[name]._width = game.cardSizeX;
game.path[name]._height = game.cardSizeY;
game.path[name].CardName.text = "card #" + j;
}
The cards and the textboxes inside the card MCs load fine but the actual textboxes don't change from the default text I've hard-coded in. How can I reach the dynamic textbox inside the card Movie Clip to manipulate the text.
Thanks.
Loading Order - Dynamically Loading Images
Flash 5
I am trying to control the loading order of dynamically loading images. If I have 12 placeholders (4 columns by 3 rows) for the images (e.g. 12 instances of a movie clip) each of which loads a different JPG or SWF. I want the 1st instance/placeholder to completely load the image dynamically before the next instance starts to load the next image and so on. How can I ensure image1 is dynamically loaded before image2 and then image3 etc...
If I put each instance on a separate frame on the timeline will it stop on each frame until the instance is loaded before moving onto the next frame? I have seen the effect im trying to recreate on both:- www.rui-camilo.de and www.andyfoulds.co.uk
Many Thanks in advance.
Dynamically Loading MP3 ... Loading Details In Text Box ...
Hi, I am loading an MP3 dynamically in Flash ... but am having problems get'n the bytesLoaded to show in my text box. I've tried changing it round heaps ... pullin apart others ... what's the trick?
I'm an intermediate user and have double checked all the basic's ...
What am I missing?
wanna see me coding? Here:
Code:
mySounda = new Sound();
mySounda.loadSound("Track2.mp3",false);
loadBytes = Math.round(mySounda.getBytesLoaded()/ 1024);
loadTotal = Math.round(mySounda.getBytesTotal()/ 1024);
percent = Math.round((loadBytes / loadTotal)* 100);
textd = percent + "% Loaded";
mySounda.onLoad = function(success){
mySounda.start(0,1);
textd = mySounda.id3.TIT2;
playing=true;
}
And all I get in the text box is: "100% Loaded"
Even when I do a streaming view.
Anyone?
Loading Dynamic Textbox While Dynamically Loading
Hi All,
So, I've got a movie on the stage (but offstage) called: Card. Inside this MC is a dynamic textbox called: CardName. I'm using a for loop to create a column of cards w/ their corresponding textboxes.
Here's the code:
for (var j = 1; j<=6; ++j)
{
var name = "Card_"+j;
var y = (j-1)*game.spacingY + game.originY;
game.path.attachMovie("Card", name, ++game.depth);
game.path[name]._x = x;
game.path[name]._y = y;
game.path[name]._width = game.cardSizeX;
game.path[name]._height = game.cardSizeY;
game.path[name].CardName.text = "card #" + j;
}
The cards and the textboxes inside the card MCs load fine but the actual textboxes don't change from the default text I've hard-coded in. How can I reach the dynamic textbox inside the card Movie Clip to manipulate the text.
Thanks.
Loading Different Swfs
i have a site which is in seperate sections, ie different flas.
I wish to connect them all by loading urls of the swfs..
the home page has a loading in the begining, but will end up loading the home page swf only
Can i use this loading to load all the other swfs..
Thanks..
Loading SWFs
How can I Load a SWF movie into another temporally?
I can't get the LoadMovie function to work well.
Then how can I replace the swf with another?
2 SWFs Loading
Hey Guys,
Is there a way to make two seperate FLASH files (SWFs) load dependent on one another. E.G. have them both load at the same time, but dont begin playing until both of them are fully loading. If so, then please send me the link, tutorial, instructions, or anything that can help me accomplish this. You can see an example of what I'm trying to do at http://www.hcapsol.com/new2.html
Thanks,
Marc
Loading Ext SWFs..help
Please help with this one....I have a flash movie using ext swfs when a user clicks on certain buttons. Everything works fine when the main movie plays on it's own. However, once I embed the movie into an HTML page, those "load mov" commands DO NOT work!!!??? Don't understand why?? Please help...
Loading SWFs
Perhaps someone can help me with this:
I have 2 SWFs... the first is loading the second into the same window. The original movie is at level 0 of course, and I've told the second SWF to load into level 1. This works fine, except for the fact that even after the second movie loads, I can still use the buttons located in the movie it's overlapping. Any suggestions?
Any response is greatly appreciated.
Thanks,
Kevin
|