Variables From A Loaded Movie
Ok, let me try to explain this. I have a main movie file that needs to load and unload movies that are being used in a drop down menu. This menu resembles the Windows File, Edit, etc. menu. Everytime the user clicks one of these categories it loads a new movie, and after the category times out, or another is clicked it unloads the first. Due to this rapid loading and unloading of movies, there is not much time to retrieve a variable if the user clicks a button. For some reason I cant for the life of me retrieve a variable from these menus. I have tried just plain setting them in the main movie from within the loaded menu. Ex _root.variable = "value";, but to no avail. I have also tried issuing a GoTo command from within the loaded menu that goes to a frame the attemps to retrieve the variable. Ex variable = _root.navBar.File.variable;, which also didnt work. Im sure there is a simple error that I am missing.
FlashKit > Flash Help > Flash General Help
Posted on: 09-06-2004, 10:55 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Passing Variables From Loader Movie To Loaded Movie, Flash Satay Method
I like the Flash Satay method for its clean integration and standards-compliance, however there are still some things I can't manage the way I want to... I'm trying to implement a working method to pass variables from the loader movie to the loaded movie. As you may know, the Flash Satay method uses a small SWF file which uses a bit of code to load the desired movie, all in order to allow IE browsers to retain streaming capabilities when rendering Flash content through the <object> tag. Basically it's just a small file with the following AS2 code in the first frame:
loadMovieNum(path, 0);
This means the c.swf file is ENTIRELY replaced at level0 with the desired movie, and any variables that were passed to the loader movie turn to smoke.
I'm trying to generate a querystring using all other variables the loader movie receives, and pass that along with the filename for loadMovieNum. This seems to be working very well in most cases, but whenever there's a URL in the querystring (even URLEncoded), BAM, everything turns to lowercase... EVERYTHING... here's an example:
c.swf?path=banner.swf&myLifeSUCKS=true&Icantbelieve=ITSNOTBUTTER
this successfully loads banner.swf in place of c.swf, with the following correct querystring appended
banner.swf?myLifeSUCKS=true&Icantbelieve=ITSNOTBUTTER
If I try:
c.swf?path=banner.swf&clickTag=http://www.myurl.com/&ANOTHER=variable
this successfully loads banner.swf in place of c.swf, but I end up with lower-cased querystring (all of it!!):
banner.swf?clicktag=http://www.myurl.com&another=variable
what happens to my capital letters?? I need these to remain case-sensitive as there is no saying how the loaded movies are programmed. The generally accepted convention for "clicktag-enabled" banners is to use _root.clickTag as the link button's URL...
Even URL-encoding the URL doesn't change this
For reference, here's the HTML snippet and ActionScript 2 code I use:
---- html ----
<object type="application/x-shockwave-flash" data="c.swf?path=banner.swf" width="728" height="90">
<param name="movie" value="c.swf?path=banner.swf" />
<param name="FlashVars" value="clickTag=http://www.google.com/" />
</object>
Attach Code
----c.swf----
var queryString:String = "";
for (var i in _root){
if (i != "path" && i != "queryString" && i != "$version"){
if (queryString) { queryString += "&"; }
queryString += i + "=" + _root[i];
}
}
if (queryString != "") {
loadMovieNum(_root.path + "?" + queryString,0);
} else {
loadMovieNum(_root.path,0);
}
Edited: 10/01/2008 at 10:40:48 AM by Inzoum
Xml Variables' Paths In A Loaded Movie Via Movie Cliip Loader
Okay, I found 3 different .fla files:
1] an XML photogallery [including image, thumbnails and title & description]
2] a Navigational type file [when a button is pressed, the screen moves to that section, set by x & y coordinates, with friction]
3] a file featuring loading multiple external .swf's into specific movie clips [movie clip loader, instead of loadMovieNum]
All the files work fine independently.
I put the actions of the movie clip loader into "navigation-1.swf".
The movie clip loader calls "gallery4.swf" and places it in a movie clip deep navigation-1.swf.
Gallery4.swf loads almost loads fine in navigation-1.swf; the images and thumbnails show, but the title and descriptions do not.
a] It might be the paths in gallery4.swf. I read the tutorials in paths/advanced paths from actionscript.org. I tried applying it in the code. Still I'm not sure if this is it. So, I went to investigate the movie clip loader script and thge navigation-1.swf file.
b] I was thinking the problem was the navigation-1.swf. I tried something to test that out. I called the gallery4.swf using loadMovieNum into level1. Everything in the gallery showed up, images and text. So now, I'm thinking it's not the navigation-1.swf that's giving me a problem. I think it's the movie clip loader script that might be playing games with me.
The only reason why I'm set on using the movie clip loader to load gallery4.swf into navigation-1.swf is because I like the effect of everything on the stage moving; this is accomplished when gallery4.swf is loaded in a particular movie clip in navigation-1.swf.
Can anyone help me out with this one? I'm okay with flash [that's stretching it], but you guys/gals are the gurus!!!!
Here's a link to view navigation-1.html, the file that calls gallery4.swf
Here's a link to just view gallery4.swf
Here's the .zip of the files involved.
Mind you the visuals aren't done yet, I'm still trying to figure the functional part, hopefully!!! AAAAA
Hope your brains' are sharp tonight because I think mine has worn as my eyes tonight!!!
Thanks,
upp'ed to motrin5xaday for tonight...
Xml Variables' Paths In A Loaded Movie Via Movie Cliip Loader
Okay, I found 3 different .fla files:
1] an XML photogallery [including image, thumbnails and title & description]
2] a Navigational type file [when a button is pressed, the screen moves to that section, set by x & y coordinates, with friction]
3] a file featuring loading multiple external .swf's into specific movie clips [movie clip loader, instead of loadMovieNum]
All the files work fine independently.
I put the actions of the movie clip loader into "navigation-1.swf".
The movie clip loader calls "gallery4.swf" and places it in a movie clip deep navigation-1.swf.
Gallery4.swf loads almost loads fine in navigation-1.swf; the images and thumbnails show, but the title and descriptions do not.
a] It might be the paths in gallery4.swf. I read the tutorials in paths/advanced paths from actionscript.org. I tried applying it in the code. Still I'm not sure if this is it. So, I went to investigate the movie clip loader script and thge navigation-1.swf file.
b] I was thinking the problem was the navigation-1.swf. I tried something to test that out. I called the gallery4.swf using loadMovieNum into level1. Everything in the gallery showed up, images and text. So now, I'm thinking it's not the navigation-1.swf that's giving me a problem. I think it's the movie clip loader script that might be playing games with me.
The only reason why I'm set on using the movie clip loader to load gallery4.swf into navigation-1.swf is because I like the effect of everything on the stage moving; this is accomplished when gallery4.swf is loaded in a particular movie clip in navigation-1.swf.
Can anyone help me out with this one? I'm okay with flash [that's stretching it], but you guys/gals are the gurus!!!!
Here's a link to view navigation-1.html, the file that calls gallery4.swf
Here's a link to just view gallery4.swf
Here's the .zip of the files involved.
Mind you the visuals aren't done yet, I'm still trying to figure the functional part, hopefully!!! AAAAA
Hope your brains' are sharp tonight because I think mine has worn as my eyes tonight!!!
Thanks,
upp'ed to motrin5xaday for tonight...
Loading Movie That Has Variables Loaded Into MovieClip Of That Movie
hi, I have a problem with loading movies that contain loaded variables ,
here is what I'm trying to do:
Main Movie (loadMovie ("reset.swf", _level0.MC))
reset.swf (loadVariables ("crimea.txt", _level0.text))
and the problem is that the text (=crimea) isn't displayed
Have you any ideas of what is wrong?
-thanks-
Why Variables Of Loaded Movie Reset Within Main Movie
why variables of loaded movie reset within main movie!!!! mean when i load movie into level 1 or else (not level0)
variables like text etc of loaded movie dont display...
//
i have movie "Text" with text loaded into it:
loadVariables ("crimea.txt", _root);
in main movie when i load "Text.swf" to level0 everything is fine, but when i load it to level 1 or else text of "Text" movie doesnt display...
//
where i have a mistake or
is there a way to make it different???
your help is appreciated, thanks
Passing Variables From Movie Clip To Loaded Movie
I've got a movie clip which contains a button in it. This movie clip contains a few dynamic text fields and is duplicated 20 times. When clicked the button loads a movie into a specified target. Is there a way to send the movie clip's variables to the loaded movie?
Thanks very much.
-Mike
[help] Getting Variables Into A Loaded Movie
hey people. i tried 'search' but kept getting an error, so sorry if this has already been asked,
i dont really know how to explain it but i'll try my best ->
im making games for my site where the user wins 'points' to spend on items and other things and basically in each game i want to be able to load a movie into the 'gameover' screen so that it sends to score to the php file to add to the database. The only problem i have with this is that i cannot get the 'score' into the loaded movie
_root.score = (the score)
in the game file.
how do i load the separate swf and get the score variable into it?
Tia
??
jagopth
PS. I have tried eveything in the loaded movie, ( score2send = _root.score , score2send = _level0.score , score2send = _parent.score )
Variables In Loaded Movie Help
I'm having trouble referencing variables in a loaded movie. I read in other posts that you simply refer to the variable as if it belongs to the clip you load it into, however this doesn't seem to be working for me . Anyone have any suggestions?
Getting Variables From A Loaded Movie
I'm trying to create an audio player....I have the player in one movie and the music is loaded in as a swf is it possible to set a variable in the music file and have the player pull that out of the loaded movie? I load the music into an empty clip named "music"
I tried this
message.text = _root.music.frames;
but it doesn't work, I can pass a value into the main timeline but, I want to get it out of the music movie....how do I do this?
Loading Variables From Loaded Movie.
Hi, I need some help here..
I'm making a game.
I have a swf, that loads a number of highscores from a database using a cgi-script.
This works fine.
But when I load this highscores.swf into my main movie, and then try to get the variables, they won't load anymore..
Sending Variables Into The Loaded Movie
hey guys,
I was wondering if it was possible to send variables from the main movie into the movie that you just loaded using the load movie command. please let me know if this is possible. Thanks so much guys
Don
Loading Variables Into A Loaded Movie
Hi,
I'm having a problem loading a text file into a movie which has been loaded/nested into the main movie.
A button in the loaded movie uses the following to load the variables into a movie clip
loadVariables("text3.txt", "_root.content.dialogue");
Now, this works fine until I load the movie into the main movie. When loaded it ceases to work. I know that it must have something to do with the fact that the root is now the main movie, but have no idea how to correct it.
Thanks
Barry
Variables In Loaded Movie Clip
Is there a way to access the variables defined in a loaded, duplicated, or attached moive from the timeline that contains it? If so how?
Thanks.
Access Variables In A Loaded Movie
Hi all,
I'm stumped! I load a movie and try to access it's variables:
test.swf has a variable:
title_txt = "test";
I try:
LoadMovie ("test.swf", marker_mc);
trace (marker_mc.title_txt);
marker_mc.title_txt is undefined!
How do I use LoadMovie and get access to the variables in the loaded movie?
Thanks for reading my daft post!
Passing Variables To Loaded Movie
I have Movie1 & Movie2 which contains a MC inside it buttons coded with:
on (release) {
_parent.loadMovie("Moviea.swf");
}
till the last button coded with:
on (release) {
_parent.loadMovie("Movied.swf");
}
so i want to pass a variable with this trigger as i want to put in the Movies from Movie a to Movie z a back button to go back to Movie1 or Movie2, depends on from where they loaded Movie1 or Movie2.
i wish you understand what i mean,
ask me if you didn't.
Thanks
Can't See _global Variables In A Loaded Movie
Hi,
I'm currently loading a .swf file into another .swf and I can't seem to "see" the variables that are in the loaded file. I'm using _global variables and using the LoadMovie command and have tried placing it in level 1, as well as putting it in a target on the main timeline.
Not sure what I'm doing wrong.
Maria
*******
Details on the code:
I'm loading dc.swf. In that file is a variable called "_global.dcswfstart". When I do the trace on "_global.dcswfstart" it says undefined.
now = new Date();
// make a variable for current time
start = new Date(2001, 0, 17);
// set a dummy start date
end = new Date(2001, 0, 17);
// set a dummy end date
loadMovie("dc.swf", "_root.DateCheck");
trace(_global.dcswfstart);
start = dcswfstart;
// set start equal to date specified in the DC.swf file (variable name dcswfstart)
end = dcswfend;
// set end equal to date specified in the DC.swf file (variable name dcswfend)
How Do I Access Variables In A Loaded Movie?
Hi,
Does anybody know how to access the variables within a movie you have loaded with loadmovie("movie.swf", myDropZone) where myDropZone is an instance of a movie clip i use to load movie.swf into the right place?
So, I want to update dynamic text variables in movie.swf from outside. Is that possible?
Any help is GREATLY appreciated!!!
-Laura
Please Help Access Variables In Loaded Movie
Hi,
Can anyone tell me how to access dynamic text variables inside an .swf that I loaded with loadMovie("movie.swf", myDropZone), where myDropZone is a movieclip that i use to ensure that movie.swf ends up in the right place on my screen?
I want to pass a string from my main movie, which loaded movie.swf into it, to movie.swf.
Is that possible?
Any help is greatly appreciated!
-Laura
Passing Variables To A Loaded Movie
I have a navigation bar that I have loaded into level3 of my main movie. When the user clicks one of the navigation buttons they should be taken to a specific point on the timeline of a movie that I have loaded into level2 of my main movie. Currently it will only go to the specified frame if the button is pressed a second time.
Here is the action I have for the buttons...
on (release) {
frame = "af"; // this value is different for each button
unloadMovieNum (2);
loadMovieNum ("globes.swf", 2, "GET");
}
On the first frame of my level2 movie (globes.swf), I have the following action to check for the value of "frame" and then take the appropriate action
if (frame != "") {
gotoAndPlay(frame);
} else {
gotoAndPlay("rotate");
}
I am really puzzled on how to accomplish this.
Any help is greatly appreciated.
Passing Variables To A Loaded Movie
I have a navigation bar that I have loaded into level3 of my main movie. When the user clicks one of the navigation buttons they should be taken to a specific point on the timeline of a movie that I have loaded into level2 of my main movie. Currently it will only go to the specified frame if the button is pressed a second time.
Here is the action I have for the buttons...
on (release) {
frame = "af"; // this value is different for each button
unloadMovieNum (2);
loadMovieNum ("globes.swf", 2, "GET");
}
On the first frame of my level2 movie (globes.swf), I have the following action to check for the value of "frame" and then take the appropriate action
if (frame != "") {
gotoAndPlay(frame);
} else {
gotoAndPlay("rotate");
}
I am really puzzled on how to accomplish this.
Any help is greatly appreciated.
Getting Variables From Main Movie To Loaded?
hi!!
can't get vars.
1. Load main movie vith vars x=y&a=b..
2. To the main movie timeline load child movie using var x..
ActionScript Code:
loadMovieNum(+this.x+".swf", 1);
3. In loaded child movie loading its internal movie with menu, where I need to get var "a" to specify correct links..
If it is main internal movie, the code will look like:
ActionScript Code:
getURL(_root.a+"blablabla/");
But with what to replace _root I dont know..
_parent - does not work.. _parent.parent ? not..
how to get vars to loaded movie from main?
Here is a sketch, what is a situation..
thanks!
Passing Variables To A Loaded Movie
I want to know if it's possible to send the variables in a _root file to a loaded swf in a movieclip (where the loaded movie takes action according to the variables that has been sent it).
Setup:
1. blank.swf - has the frame action (see below) and contains the navigation movieclip (which is just a place holder)
2. dynamic.swf
FRAME ACTION:
//variables
frame = "Services";
frame = "Products";
//loads dynamic.swf into navigation movieclip
loadMovie ("dynamic.swf", "navigation");
stop ();
============================
I already figured out that I can add ActionScript to the navigation movieclip that uses the variables (set in the frame action) and have it affect the dynamic.swf.
============================
I WOULD PREFER to keep the ActionScript (telling it which frame label to go to) in the dynamic.swf but use the variables from blank.swf to make the choice.
So again, if someone has an idea on how i can pass the variables which are set in the blank.swf to the dynamic.swf PLEASE let me know.
Thanks in advance.
Passing Variables To A Loaded Movie
Hi!
Given two SWFs A & B, where A uses loadMovie to load B, is it possible to for SWF B to recognize global variables set by SWF A?
I'd like SWF A to specify at which frame number SWF B should play when it loads.
Thanks in advance for the assist! :)
Passing Variables To A Loaded Movie
Hello,
I'd like some help..
I need to pass some variables to a loaded movie in my main movie.. I have "mc.loadMovie(url, "GET")".. I've tried the GET and the POST, but I don't know how to read the variables, that are in "mc", on the other side (the loaded movie side..)
Thank you.
[[]]
Cant Load Variables Into A Loaded Movie
ok so i got a movie loading variables into the swf but when i load the swf into another movie, i loose the variables. anyone got a solution?
heres an example of what ive done
click here
Referencing Variables In A Loaded Movie
Hi,
I'm playing with a Flash library in php called Ming, but it should work much the same as files made in Flash. I also have Flash at my disposal. I'm limited to an older version of Ming, and I think Actionscript 1.0, which doesn't help matters.
When I use LoadMovieNum to load a 'normal' movie (made in Flash MX 04, not generated through Ming) into level 1, it works and shows up fine.
When I try to remove it, however, it doesn't want to know. I'm using UnloadMovieNum(1), which I thought should work.
The second problem I'm having is that I was hoping I'd be able to reference a variable set in the loaded movie. I've been trying to get at the variable 'count' in the loaded movie through _level1.count, as well as trying _root on the beginning and such, and that's not getting me anywhere.
Is this possible? Any ideas would be appreciated.
LoadMovie - Accessing Variables Of Loaded Movie
I am trying to access variables of a mc loaded via loadMovie.
movie1 loadMovies movie2. Then from movie1 I want to get a variable value stored in movie2.
I'm setup like this:
1. movie2 has the following code on frame 1:
var foo='bar';
2. From movie1 I do the following in frame 1:
mcHolder.loadMovie(movie2);
3. From movie1 I do the following in mcHolder's object actions:
onClipEvent(data) {
trace(foo); <-- blank
}
What am I doing wrong?
TIA
Smapdi
Navigating Across Loaded Movie Scenes With Variables
I have two movies, movie1 and movie2. they both have 10 scenes. they both have a preloader on the first scene. I need to be able to navigate from the first scene(after the preloader) on movie2 to the last scene on movie one but still go through the preloader on the first movie. I tried using loadMovieNum and passing a variable to the first movie and then use a conditional based on the sent variable but it doesn't seem to work, it just goes to the first scene of the first movie and doesn't seem to recognize the variable in the "if" conditional statement.
Any pointers on what I might be doing wrong?
Help With PHP Variables Sent Back To Loaded Flash Movie
Hi,
I'm trying to get a guestbook in flash working, and I currently have my guestbook.swf file load into a target in my main flash movie. Then, guestbook.swf uses loadVariablesNum to talk with a PHP script. This all works fine, but when the PHP script tries to print back to Flash, the variables go to my main flash movie, and not guestbook.swf
I can't figure out any way to get the variables to guestbook.swf. Any suggestions?
-Laura
Load Variables From A Loaded On Level 1 Movie?
How do you load variables into your movie from another movie loaded into that one? is there a way? I am making a casino like thing... and when you click the button or whatever I want the Casino movie to load on level 1 and the Variable "money" from the loaded on level 1 movie clip to show on the main movie as well. PLease help. I have no idea how i would do this or if its even possible. Thanks alot.
matt
Loading Text Variables In A Loaded Movie
Hi,
I've been searching for a while & couldn't find an answer.
Thx to flashkit I could make an interactive worldmap. 's tutorials (thx at all those who posted them)
To can finnish it I would need some help. Also coz I'm more graphist than programmer.
My issue sounds simple>>
I have a swf with loaded text variables (from a text file) that is loaded into another swf file (that at the end will be loaded in an html file).
When I test the first swf file alone it's loading the text right. When the other one with the first loaded into it, it isn't working anymore.
First I thought it was coz my path were absolute, so I changed them in relative. Then I thought it was coz the path to the text file had to be from the second movie, so I changed it.... but it still not working.
I uploaded the files. It's an interactive worldmap, just click on Europe & than to France and you will find out.
Thanx for your time
Edit: Ooops, forgot to upload the file. I had to simpefy a little the file, but I think it will do it.
Sending Variables From Loaded Movie Clips
Ok, here is my situation. I have a movie clip that I need to load into another movie. The movie clip that needs to be loaded has various buttons in it that assigns a value to _global.variable. I assign the variables on the on(press). When I export the movie and then load it in the other movie, it seems the variables disappear. They don't trace. Is what I am trying to do possible?
Thanks,
Robb.
How To Access Variables In Loaded External SWF Movie
Hi,
My pb is the following :
I have a mc named "btn.swf", witch have a dynamic text feild linked to a vaiable "CAPTION".
My main movie "main.swf" uses a moviecliploader object to load "btn.swf". into an emptymovieclip called "loadedMC".
every thing is going well , untill I tried to set a new value to CAPTION ( in btn.swf) so the button text can be dynamically changed.
BUT IT'S IMPOSSIBLE TO ACCESS THIS VARIABLE
I tried :
laodedMC.CAPTION = "button text"
_root.laodedMC.CAPTION = "button text"
_level0.laodedMC.CAPTION = "button text"
_level1.laodedMC.CAPTION = "button text"
Nothing is getting working,
Please tell me what am I doing wrong .
Passing Variables To Loaded External Movie
Ok, this problem has beaten me for the last 2 days. It seems to be extremely simple, I am on main movie and I am using MovieClipLoader class to load external movie callMe.swf into movie holder called holder_MC, then from main using onLoadInit or onLoadProgress listeners I can target dynamic text inside callMe.swf as holder_MC.myTXT.text = "blablabla" or I can change frames in callMe.swf by holder_MC.gotoAndStop(5). But HOW TO PASS VARIABLE myVar to callMe.swf so it executes something there? Using holder_MC.myVar DOESN'T WORK!!!!!!!!!!!!!!
Thanks for any help,
Zbynek
Loading Text Variables In Loaded Movie Clips
I have an SWF movie thats loaded into my main timeline. In that movie clip I have a dynamic text box that loads variables from a text file. When I play the main timeline the dynamic text box apears with no text in it. WHAT DO I DO?
Passing Variables From Loaded Movies To The Loader Movie
I am loading a swf file into an empty movie clip in the main Flash program (mainApp). I am trying to pass variables by value from the loaded movie to mainApp.
This function is in mainApp:
function read_1_vars(band,qual, lang){
trace("--------------------");
blnBandwidth=band;
blnQuality=qual;
language=lang;
}
This is the code used in the loaded movie to contact mainAPP:
_root.read_1_vars(blnBandwidth, blnQuality, language);
All this code worked just fine when contained in one one single file.
Any ideas? What am I missing? Thanks.
Passing Variables From A Loaded Movie Clip To Main?
All,
Not sure why this is beating me up, but it is...
I can't seem to load a movie clip, and then pass some variables from that loaded movie clip back to through stage_mc it is loading into - to the SubClip.
The structure is as follows:
Main
>SubClip
>>Stage_mc
Where the new movie clip is loading into stage.
I need to pass two variables from the loaded clip into the SubClip.
Simple vars to fill some dynamic text in SubClip.
Any help or a push in the right direction would be appraciated.
I've done the whole _root.myvar thing, _parent, and _global.
without luck..
Thanks!
Dynamically Creating Movie Clips Using Loaded Variables
Hello all,
I'm still a noob with flash. But I'm attempting to make my website using it.
Any help you can offer is very much appreciated.
So far I have several swf files that are all loaded into a "index" swf file.
So all the code needs to work with that chain of MC's:
_root.LoadedContent_mc.LoadedContent2_mc.Page1_mc
Thats the path to where I am working..
Page1:
I'm attempting to create a downloads list here. I have a php file already worked out that scans the directories "downloads" and "imgs", and generates a list of file names. It then formats each file name into a path to that file. And turns each path into a variable that can be loaded into flash.
So basically after php does its thing we are left with this:
Code:
File1=Pages/PageData/Page1/Downloads/SomeTextFile.rar&File2=Pages/PageData/Page1/Downloads/SomeTextFile1.rar&File3=Pages/PageData/Page1/Downloads/SomeTextFile10.rar&File4=Pages/PageData/Page1/Downloads/SomeTextFile11.rar&File5=Pages/PageData/Page1/Downloads/SomeTextFile2.zip&File6=Pages/PageData/Page1/Downloads/SomeTextFile3.rar&File7=Pages/PageData/Page1/Downloads/SomeTextFile4.rar&File8=Pages/PageData/Page1/Downloads/SomeTextFile5.rar&File9=Pages/PageData/Page1/Downloads/SomeTextFile6.rar&File10=Pages/PageData/Page1/Downloads/SomeTextFile7.rar&File11=Pages/PageData/Page1/Downloads/SomeTextFile8.rar&File12=Pages/PageData/Page1/Downloads/SomeTextFile9.rar&Img1=Pages/PageData/Page1/Imgs/objectBack.png&NumFiles=13
In the downloads folder i have various files to download. In the imgs folder is where I am keeping the imgs for each of the files.. (thumbnails if you will).
Now I can get the variables into flash just fine. Its working with them thats created my problem.
Heres my Actionscript so far.
Code:
//Import list of file names to create into links
MyFiles = new LoadVars();
MyFiles.load("http://www.mysite.com/Pages/PageData...wnloadlist.php");
MyFiles.onLoad = function(success)
{
if(success)
{
trace(_root.LoadedContent_mc.LoadedContent2_mc.Page1_mc.MyFiles.NumFiles);
_root.LoadedContent_mc.LoadedContent2_mc.Page1_mc.FileListTxt = "testing";
}
else
{
trace("Error Loading Variables for Page1");
}
//Configure loaded variables
var vn:Number = _root.LoadedContent_mc.LoadedContent2_mc.Page1_mc.MyFiles.NumFiles;
var y:Number = 0;
for(x in _root.LoadedContent_mc.LoadedContent2_mc.Page1_mc.MyFiles)
{
if(x=="NumFiles" || x=="onLoad")
{
trace("Skipped Crap");
y++;
}
else
{
if(y==2)
{
var FileArray:Array = Array();
FileArray.push(_root.LoadedContent_mc.LoadedContent2_mc.Page1_mc.MyFiles.x);
y++;
}
else
{
FileArray.push(_root.LoadedContent_mc.LoadedContent2_mc.Page1_mc.MyFiles.x);
}
}
}
trace(FileArray);
}
stop();
What I'm trying to do here is create an Array variable to hold the object target so we can put the value of that object into a global variable so I can load them into Movie Clips along with the img for it. And then place them on stage.
But Like I said I can't seem to get it to work.
Thanks again for any help/suggestions.
Loaded Movie Clip To Talk To The Movie That Loaded It
Trying to get a loaded movie clip to talk to the movie that loaded it, but can't figure out the right ActionScript... . i'm using:
on (release) {
tellTarget ("home.swf") {
gotoAndPlay("blank");
loadMovieNum("viewer.swf", 2);
it ain;t workin, i've also tried _parent &
_root - in replace of 'home.swf' to no avail, much thanks to anyone that can help!!!
Preloader In Externally Loaded Swf Stops Working (loaded Into An Empty Movie Clip)
SEE BOTTOM OF THREAD FOR CURRENT PROBLEM
1. I have my navigation buttons in level0
2. When a button is pressed it loads an external .swf into the highest empty level
3. There is an MC in this loaded .swf called loadmovie and inside that another MC called empty.
4. Inside the 'loadmovie' MC, there is a frame action that loads another external .swf file into the 'empty' MC.
The problem I am having is that the preloader that is on the external .swf that is loaded into the 'empty' MC does not work.
It works fine if you test it on its own. But not when loaded into a Movie Clip.
MY SCRIPT:
iBytesTotal = _root.getBytesTotal();
iBytesLoaded = _root.getBytesLoaded();
iBytes = (iBytesLoaded/iBytesTotal)*100;
percentageNumber = Math.round(iBytes)+"%";
setProperty("progressBar", _xscale, iBytes);
Do I have to refrence it differently? Because of where it is situated?
e.g
iBytesTotal = _level32._root.loadmovie.empty.getBytesTotal();
confesed!
Checking If Movie Loaded Into An Instance Has Fully Loaded B4 Playing
Hi,
I'm building a site that streams a series of small movies into some preset into instances on the _root timeline but are paused on an empty frame 1 until needed. So while the first movie is playing the second movie is already being loaded and is cued on frame 1 ready to play.
However, if the timeline tells the loaded movie (i.e. _root.content ) to play frame 2 before this movie has finished loading it will not play. This shouldn't happen because the movie loaded into _root.content should have loaded, but I need a failsafe.
Is there a way to run a routine once the _root timeline is finished to constantly check the status of the movie being loaded in _root.content and then play once it is loaded.
I've tried running this code in a routine:
if (_root.content._framesloaded >= _root.content._totalframes) {
_root.gotoAndPlay(2)
}
..but I'm not sure if it will work.
I really want to avoid a preloader (each movie is only about 10k big )
Any help would be greatly appreciated
Cheers
Checking If A Movie Loaded With LoadMovie Loaded Succesfuly
Hi,
I have a movie called main. I want to load into a movieClip that sits in main an .swf.
To do it i use a
pictureClip.loadMovie("PR001.swf");
My question is: is there a way that the main movie can know that PR001.swf was not loaded?
Thanks fo the help.
Playing A Loaded Movie Clip (loaded In A Different Level)
I really don't understand the problem here, I'm loading a swf containing a movie clip with 2 frames with Stop(); on each. The file is loaded on _level5 so I tried this:
Code:
tellTarget (_level5.musicmc) {
gotoAndStop (2);
}
but instead of telling the musicmc movieclip to go to frame 2, it tells it to the main timeline to go to frame 2 and stop...What's the problem, when I use "Debug Movie", I can see the:
_level5
......._level5.musicmc (....... = spaces)
what's wrong, it seems to don't want to tell the MC to go to frame 2. I passed many hours on this simple d*mn thing and I really can't find out...
BTW, I'm using Flash 5
Urgent Loaded Movie Controlling Other Loaded Movi
I need this one done today!
I have two holder movie clips in my main .swf. One is selectloader, the other is normloader.
So selectloader.loadMov..... that works
In the select I load a selection with three boxes, the user chooses one.
When the user clicks one of the boxes I do
_root.normloader.loadMovie...
and it doesn't work!
So I created a new frame on the holder .swf for each of the three buttons so all the selectino has to to is go to another frame.
That works, but I also want each of the boxes to direct to a certain frame in normloader
so the problem comes back again
I can't get one loaded movie to control another loaded movie
I'm assuming it has to do with levels, and I need to do more then just _root.normloader.gotoAndPlay(3);
what do I have to do?
|