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




Controlling Intances Through Externally Loaded Variables



Hello,
I would like to put a number of "lights" into a movie. The lights have to positions (on/off), and are converted to movieclip symbol. Various instances of this symbol are put on to the stage.#

I would like to control those lights (whether they are on or off) through an external txt file. The textfile has one boolean variable for each instance (e.g. vlight1=true).

On the each instance is following script:

onClipEvent (load) {
if (_root.vlight1 == true) {
tellTarget (this) {
gotoAndStop(5);
}
} else {
tellTarget (this) {
gotoAndStop(1);
}
}
}

...but it doesn't work!
I also tried with instead of tellTarget, but that did not work either.

I tested the variable in a textfield and it seemed to have read the variable alright (the txt file is loaded through loadVariablesNum("variables.txt", 0).

Anyone got an idea how to do this?
Thank you for your help!



FlashKit > Flash Help > Flash ActionScript
Posted on: 11-13-2002, 07:32 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Controlling Loaded Swf's Externally
i posted this in scripting - backend, and didn't receive any replies. probably because it seemed to be the wrong forum. here it is again, verbatim. also, i'm using flash mx.

---

ok, this is the deal. i'm designing a site and basically what i want to happen is when a section is clicked, i want the previous section to animate out, and the other to animate in. also, i'm loading the sections into a movie clip, using loadmovie.

what i want to happen, ideally, is when a section is clicked, it changes the value of a variable, and then proceeds to play the swf that has been loaded into the movieclip. when it reaches the end of the timeline, i have an function checking the value of the variable (which is located in the main swf), and loading the appropriate swf file.

so, basically, what i'm having trouble with, is controlling the timeline of the loaded movie clip with a button located in a clip in the main swf. i was wondering if this is possible, and also if the function i created to check the value of the variable (for the sections) and also the variable can be passed into the loaded swf file also.

help would be very appreciated, and keep in mind, i'm fairly new to flash. thanks.

Controlling An Externally Loaded Swf
Can anyone help? I have a swf file that I have brought into my main movie using the loadMovie action (it is targeted to a blank movieClip called 'placeholder')

Does anyone know how I can control this loaded movie clip from a button on the main timeline?
When the button is pressed I want the loaded swf to begin playing at Frame X, and when it reaches frame Y, it tells the main movie to goto Scene2. (I think I know how to do the last bit! I'm just struggling with the first bit!!)

Any help/ideas would be much appreciated!!

Ta! :O)

Controlling Externally Loaded Swf's
Can anyone help? I have a swf file that I have brought into my main movie using the loadMovie action (it is targeted to a blank movieClip called 'placeholder')

Does anyone know how I can control this loaded movie clip from a button on the main timeline?
When the button is pressed I want the loaded swf to begin playing at Frame X, and when it reaches frame Y, it tells the main movie to goto Scene2. (I think I know how to do the last bit! I'm just struggling with the first bit!!)

Any help/ideas would be much appreciated!!

Ta! :O)

Controlling SWF That Were Loaded Externally...
I have posted a similiar question and looked all over the place but it just doesn't seem to work. I am trying to have a play and stop button that controls a externally loaded swf and I just can get it to work... I am using the following AS...


ActionScript Code:
on (release) {    _root.container.transition.stop();}


My container is obviously called "container" and my swf that is loaded is called "transition" and it just won't work. Does anyone have any suggestions? Thanks

Mike

Controlling Externally Loaded Swf's
hey.
i'm having a bit of a problem that hope someone might be able to help me with.
i had made a image gallery using xml in flash MX 2004. some of the images are jpgs and some are swfs. i'm trying to get it so that once the external file, be it jpg or swf, is loaded, it would recenter itself in the middle of the page.
so i attached the following code to the container clip that the files were loaded into:

onClipEvent(load){
this._x = ((304 - this._width)/2);
this._y = ((304 - this._height)/2);
}

this coding works fine for the loaded jpgs, but not the swfs. then just for laughs, i put a button on the page that had basicly the same code attached to it:

on(press){
this._x = ((304 - this._width)/2);
this._y = ((304 - this._height)/2);
}

and that works on the swfs as well as the jpgs.

so basicly i would like to get this to work without having to press a button to center the image. any thoughts?

Controlling SWF That Were Loaded Externally...
I have posted a similiar question and looked all over the place but it just doesn't seem to work. I am trying to have a play and stop button that controls a externally loaded swf and I just can get it to work... I am using the following AS...


ActionScript Code:
on (release) {    _root.container.transition.stop();}


My container is obviously called "container" and my swf that is loaded is called "transition" and it just won't work. Does anyone have any suggestions? Thanks

Mike

Controlling An Externally Loaded FLV
Hi actionscripters,

I'm trying to control an externally loaded FLV. I'm pretty noobish with AS, but here's my code:


Actionscript Code:
vid.setMedia("Welcome.flv", "FLV");movieLength = vid.totalTime;currentPos = vid.playheadTime;pct = currentPos/movieLength;if (pct == 10) {    vid.pause();}

I'm trying to make the video stop a little early, but I put 10 in as my percent just so I didn't have to sit through the whole thing to make sure it worked. It doesn't, obviously, so any help or pointers would be greatly appreciated.

Thanks!

Controlling Main .swf With An Externally Loaded .swf
Does any body know if it is possible to contorl the main timeline of a movie with a externally loaded .swf? And if so, will this work if the main movie is exported as a projector? Thanks for any help

Controlling Externally Loaded Jpegs
Hi all. I've loaded a jpg through a function which is called at the end of a mc. The function (on the main timeline) is as follows:

function startjpg(jpg) {
counter = 1;
container_mc.loader_mc._alpha=0; //makes mc jpg is loaded into invisible
container_mc.loader_mc.loadMovie(jpg); //loads jpg into a blank mc
}

I want to fade it in and eventually do other stuff to it like make it move and such. On frame 2 on the main timeline I have:

container_mc.loader_mc._alpha = counter;

And on frame 3:

counter = counter+1;
if (counter>99){
stop();
}

else{
prevFrame();
play();
}

Seems like it should work, but I know I must be doing something wrong. Wish I could post to a url. Hope it's all clear. Thanks!

Controlling Externally Loaded Clips
I am trying to tell an externally loaded clip to go to another frame in the movie. I have loade the clip into an empty movie clip on my main stage, and then I want to put an action on my main timeline that tells the externally loade clip to go to a certain frame in the clip.. Does anyone know the code for this? I tried giving the emptyclip an instance name, and then referencing the instance to go to a certain frame, but it does not work, It ignores it completely.

Mike

Controlling Externally Loaded Clips
I am trying to tell an externally loaded clip to go to another frame in the movie. I have loaded the clip into an empty movie clip on my main stage, and then I want to put an action on my main timeline that tells the externally loaded clip to go to a certain frame in the clip.. Does anyone know the code for this? I tried giving the emptyclip an instance name, and then referencing the instance to go to a certain frame, but it does not work, It ignores it completely.

Mike

Controlling Externally Loaded Movie
Hi there, well I found out a way to make my image 'canline-alpha' loader to work perfectly smooth .. now I have one more question (haha always more .. what a newb!)

I have my site setup to load, and unload external movies into a "contback" layer that I have ... while that works, I need to be able to control the loaded movies timeline and can't seem to figure how.

im using the command :

b1.onRelease = function() {
if (_root.whatscene != "main1.swf" ){
_root.whatscene = "main1.swf";
_root.contb.gotoAndPlay("open");
}
}

which then in a movie on the main timeline (contb) goes and "opens" the named "scene" via. "loadMovie(_root.whatscene, _root.contback);" which obviously, loads the external movie called main1.swf into the layer contback on the main timeline.

My question now .. is if I wanted to go to a certain frame in the external movie (main1.swf) ; how would I go about doing so?

Controlling Externally Loaded Swfs
Hello-

I am using AS 2.0 and MX 2004. I have a movie that loads in external swfs and images using the MovieClipLoader to load the element in to a clip called "container".

Now I've been testing within flash with test movie and it works great. as soon as I export my commands that toggle within different frames of the external swf fail.

what I have is:

container.gotoAndStop(frameLabel);

is there an obvious reason why this would stop working on export? or things I could try to figure this out.

I tried loading on to levels instead so I would have:

_level25.gotoAndStop(frameLabel);

and I still have the problem.

I am exporting as Flash 8 and testing in Flash Player 8.

ideas?

Controlling Externally Loaded SWF File
Hello to all!

I apologize if this question has already been asked.

I'm trying to figure out how to control a SWF that I'm loading into my main timeline. The SWF has been created in Captivate and already has controls, I just don't want the movie to play as soon as I preload it.

I'm loading the SWF into a blank_mc. How do I get this SWF to not play, or put an action within the blank_mc that will start the playback of the SWF when the end user desires.

Is this possible?

Thank you any and all who can help me out.
Chris

Controlling An Externally Loaded .swf's Actionscript
Here is my problem, I am loading a .swf that a previous developer made (don't have the .fla) but the actionscript at the end of the movie is resolving to home.html. Instead of it resolving to home.html I would like for it to instead have gotoandPlay. Is this possible to do?

Thanks for any tips or advice.

Controlling Sound From An Externally Loaded Swf
hello,
here's my problem.
i have a file called main.swf that has background music.
(below is how the music is loaded)

Code:
mySound = new Sound();
mySound.attachSound("Music");
mySound.start(0, 100);
and an external.swf that loads into main.swf

external.swf gets loaded on a button click and at the same time it's loaded the background sound of main.swf is stopped.

all of this works fine.

but when i try to start the sound again with a button in external.swf the sound doesn't start playing.
(below is how i call on the sound to start playing again)

HTML Code:
_root.mySound.start(0, 100);
this seems so excruciatingly simple but i haven't been able to get it to work for 2 full days.

i've tried mySound = new Sound(this); and that doesn't seem to help.

thanks,
jenny

Controlling Externally Loaded Swf Question
i had a scene in a fls that had a clip that acted like a timer, at the end of the clip it told the maintimeline to play

_root.play();

now i made thew scene a separate swf that i am loading externally via the load
component. instamce name is newbiz_clip

as an external swf i cant get the timer to make it play anymore, i tried all these below:

_root.play();
_parent.play();
newbiz_clip.play();

what am i doing wrong here?

Controlling MCs Inside Externally Loaded SWFs
I am loading a SWF file on layer1 of my project, and I'm attempting to position it from my _level0 "root" timeline with:

_level1.pledge._x = 256;
_level1.pledge._y = 144;

Alas, I can't make it work. The only MC inside the loaded SWF file has the instance name "pledge", so I figure this should work. What am I doing wrong?

Controlling Main Timeline Through Externally Loaded Swf
I'm missing something...here's the setup:

navbar.swf (a navigation window) loads into the main timeline, placed into a container called navguide. There are buttons in navbar.swf that I want to control the main timeline, moving it from section to section of the main site (button called "newsbutton" should move the playhead to a News section this time, which is placed on frame 5). The code I have in the main timeline so far is this (on frame 1, _root timeline):


Code:
stop();
loadMovie("scoreboard.swf", scoreboard);
loadMovie("navbar.swf", navguide);

navguide.newsbutton.onPress = function(){
_root.gotoAndStop(5);
}

No blatant typos, as far as I can find, because the effects on the newsbutton (loaded from navbar.swf) work fine. But when I click the newsbutton, nothing happens. What am I missing?

Controlling An Externally Loaded Components Properties
Hi all...

I am having some difficulty figuring out how to control a component's properties in actionscript in an external swf.

Is this possible (ie. in movie A could i load a movie B with a scrollpane, say named "component_mc" , and in Movie A use actionscript to specify setSize or setScrollContent) ????

Specifically i am using the MultiOutlet component (a component that allows you to store multiple resources such as graphics etc. like a shared library, but also with components so you don;t have to reload them each time but share them)

The multioutlet component works fine (get it at http://www.flashcomponents.net)
loading the scrollpane, but i cannot figure out the syntax or where i should put the actionscript in the movie containing the multioutlet component (not the scrollbar movie/library which the component loads) to dynamically change the component's properties...

Please help! Thanks

-aleks

Controlling An Externally Loaded Components Properties
Hi all...

I am having some difficulty figuring out how to control a component's properties in actionscript in an external swf.

Is this possible (ie. in movie A could i load a movie B with a scrollpane, say named "component_mc" , and in Movie A use actionscript to specify setSize or setScrollContent) ????

Specifically i am using the MultiOutlet component (a component that allows you to store multiple resources such as graphics etc. like a shared library, but also with components so you don;t have to reload them each time but share them)

The multioutlet component works fine (get it at http://www.flashcomponents.net)
loading the scrollpane, but i cannot figure out the syntax or where i should put the actionscript in the movie containing the multioutlet component (not the scrollbar movie/library which the component loads) to dynamically change the component's properties...

Please help! Thanks

-aleks

Controlling An Externally Loaded Components Properties
Hi all...

I am having some difficulty figuring out how to control a component's properties in actionscript in an external swf.

Is this possible (ie. in movie A could i load a movie B with a scrollpane, say named "component_mc" , and in Movie A use actionscript to specify setSize or setScrollContent) ????

Specifically i am using the MultiOutlet component (a component that allows you to store multiple resources such as graphics etc. like a shared library, but also with components so you don;t have to reload them each time but share them)

The multioutlet component works fine (get it at http://www.flashcomponents.net)
loading the scrollpane, but i cannot figure out the syntax or where i should put the actionscript in the movie containing the multioutlet component (not the scrollbar movie/library which the component loads) to dynamically change the component's properties...

Please help! Thanks

-aleks

Dynamic Images, Masks And Controlling Externally Loaded Swf Files.
Hiya folks

My latest project (and problem) is as follows.
I have a script file in which the user enters 3 parmaters in an array.. filename, holdtime & mask.

(ie. imgArray[0] = new Image("Testpic1.jpg", "3", "L_Wipe");

The swf itself just contains 3 movieclips, all empty and just holders for the dynamic images/swfs & masks to be loaded into.

So far I have it working very nicely, the jpg or swf is loaded into an imgHolder clip (using loadMovie), the mask/transistion (stored in the library with a linkage ID) is loaded into a mask Holder clip with the attachMovie command, and lastly the underlying img2Holder clip contains a copy of the top image so that when the new image is bought in the transition works seamlesly between the new image and the previous image(which is now loaded into img2Holder). All of this is totally dynamic and the users just specify whatever images/swfs they want, how long to hold the jpg for or how many times the swf loops, and what mask is used as the transition for the incoming image/swf.

DOWNLOAD ZIP: http://194.154.190.87/DynamicImage.zip

HOWEVER..as the user can also specify swf files, this brings up my major problem. At the moment I am having to KNOW the length of the swf file and use the hold variable in the array to hold it for its play length (which is no use as the user will not have produced the swf so have no idea of its length and also the production willnot have any code in it that can be passed back to the main player timeline). What I THINK I need to know,is thus..

1. How do I determine the total number of frames in a swf loaded into a movieclip with attachMovie, and then get it to perform a function when it has reached its last frame. (ALL SCRIPT HAS TO BE ON THE MAIN TIMELINE, AS THE PRODUCTION CANNOT HAVE ANY MANDATORY CONTROLLING SCRIPTING)

2. When I can do the above, I can then use the hold part of the array as a loop counter for swfs and a hold amount in seconds for jpgs. How would I get a swf (loaded as above) to loop a specified amount of times ?

3. Also I need to load in the wsf to the underlying img3Holder clip and then go and stop straight at the last frame so that when the top layered version of the swf finishes, the bottom layered version isn't playing (which it does when loaded in with loadMovie).

So it all comes down to how do I control swf files which have been loaded into a movi clip using the attachMovie command ??

if anyone could please help I would be most grateful and would have no problem as adding them as a contributor in the credits section of the code.

Anyway folks, download the zip file, run the swf then look at the Fla and .as files and see where I am now...

Thanks for listening

Cheers

Akash

[Edited by Akashanq on 08-20-2002 at 08:05 AM]

Variables From Externally Loaded Txt
Hi,
I m loading a external text file where i have some different variables. i need to use these variable in one my movieclip. to communicate with these variales i naming the dynamic text to _level0.n1, _level0.n2 and so on...
but this is not working.

If i dont load the external txt file and when i put those variable directly in the main timeline it works. Can anyone help.
lil urgent friends.

thanks in advance.

Externally Loaded XML Variables
Hi,

I switched my code from inline XML to an external load and I can not seem to figure out how to reference the loaded XML to variables that lie outside of the loading functions shown below. I have tried returns and new variable assignments but I just can't get something that I can use in functions outside of load and parse functions. Do I have to nest all of my code inside of these functions?

I just want to create a variable (that does not exist inside another function) like the ones I was using with the inline XML; something like:
var myVariable:XML = input.item[0].@name;

Here is my existing code for the load (it traces fine)
/////////////////////////////////////////////////////////////////
var omegaURL:String = "omega.xml";
var omegaRequest:URLRequest = new URLRequest(omegaURL);
var omegaLoader:URLLoader = new URLLoader();
var Omega:XML

omegaLoader.dataFormat = URLLoaderDataFormat.TEXT;
omegaLoader.addEventListener(Event.COMPLETE, handleComplete);

omegaLoader.load(omegaRequest);


function handleComplete(event:Event):void {
Omega = new XML(event.target.data);
parseData(Omega);
}

function parseData(input:XML):void {
trace(input.item[0].@name);
}


Thanks for any help!

Bobby

[F8] Variables From XML Won't Show When Swf Is Externally Loaded
Hi guys (and girls?)

I'm having problems converting my flash website to a cd-rom application.
I have 2 different flashfiles which need to work seperately from eachother.
So I made 1 fla which will be the projecter (exe) with 2 mc holders, which will load the two .swf's in like this:


Code:
loadMovie("portfolio.swf", "_root.portfolio");
loadMovie("geluid/mp3player.swf", "_root.muziek");
That works fine! But I'm always having diffeculties with rooting (this. _parent. _root.). In the top loaded swf, the buttons which also load swf's in a mc holder, won't work anymore. They have the following action:


Code:
on (release) {
loadMovie("myfile.swf", "_root.Portfolio.fotohouder print");
}
And in the bottom mp3player, the dynamic text boxes won't show the tracknames anymore, while it does load the mp3's in. This is the AS for the mp3player:

Code:
data_xml = new XML();
data_xml.ignoreWhite = true;
data_xml.onLoad = ladeDaten;
data_xml.load(playlist);

function ladeDaten(success) {
if (success) {
aPath = new Array();
songTitel = new Array();
songArtist = new Array();
songCover = new Array();
audioTracks = new Array();
audioTracks = this.firstChild.childNodes;
totalAudio = audioTracks.length;
for (var i=0; i<totalAudio; i++) {
if (audioTracks[i].nodeName == "song") {
aPath.push(audioTracks[i].attributes.path);
songthis.titel.push(audioTracks[i].attributes.title);
songArtist.push(audioTracks[i].attributes.artist);
songCover.push(audioTracks[i].attributes.bild);
}
}
AudioPath = aPath[0];
this.titel = songthis.titel[0];
artist = songArtist[0];
aktAudio = 1;
trackAnzeige = aktAudio+"/"+totalAudio;
status = "Status: Playlist - Loaded";
if (playerlook) setCover(0);
erstesBild = true;
setzeDirektwahl();
setzePlaylistwahl();
if (playatstart) playSong();
} else {
status = "Status: PlayList - Not loaded";
}
delete audioTracks;
delete data_xml;
}

// Cover Loader
function setCover(pNr) {
if (_currentframe == 2 || !erstesBild) {
cover_mc.loadMovie(songCover[pNr],1);
}
}

// Rückwärts
function ruck(diff) {
pausgabe = MySound.position - diff;
MySound.stop();
MySound.start(pausgabe/1000,0);
}

// Vorwärts
function vor(diff) {
pausgabe = MySound.position + diff;
MySound.stop();
MySound.start(pausgabe/1000,0);
}

// Lautstärke und Balance Ausgangswerte
volume = 100;
balance = 0;
// Play Funktion
function playSong() {
if (pauseSignal == true) {
MySound.start(pausePos, 0);
pauseSignal = false;
playSignal = true;
delete pausePos;
kugel_mc._visible = 1;
} else {
MySound = new Sound();
if (volstatus < volume) {
volume = volstatus;
} else if (volstatus > volume) {
volume = volstatus;
} else if (volstatus == 100) {
volume = 100;
}
if (balstatus < balance) {
balance = balstatus;
} else if (balstatus > balance) {
balance = balstatus;
} else if (balstatus == 0) {
balance = 0;
}
MySound.loadSound(AudioPath, StreamSignal);
MySound.setVolume(volume);
MySound.setPan(balance);
MySound.onSoundComplete=function(){
if (playrepeat) {
playSong();
} else {
nextTrack();
playSong();
}
}
volstatus = volume;
balstatus = balance;
pauseSignal = false;
playSignal = true;
wahlSignal = false;
_parent.onEnterFrame = function() {
total = MySound.getBytesTotal();
geladen = MySound.getBytesLoaded();
if (geladen != total) {
if (geladen != undefined && total != undefined) {
status = "Status: " + Math.round((geladen*100/total)) + "% Loaded";
}
mc._xscale = Math.round((geladen*100/total));
} else {
status = "Status: Playing -100% Loaded";
delete _parent.onEnterFrame;
kugel_mc._visible = 1;
if (!StreamSignal) {
MySound.start(0, 0);
}
}
}
}
}
// Playschalter
play_btn.onRelease = function() {
playSong();
}

play_btn.onRollOver = function() {
status = "Status: Load / Play song";
}

play_btn.onRollOut = function() {
status = (playSignal) ? status = "Status: Playing" : status = "Status: Stopped";
}

// Stop Schalter
stop_btn.onRelease = function() {
MySound.stop();
playSignal = 0;
delete pausePos;
kugel_mc._visible = 0;
}

stop_btn.onRollOver = function() {
status = "Status: Stop playing";
}

stop_btn.onRollOut = function() {
status = (!playSignal) ? status = "Status: Stopped" : status = "Status: Playing";
}


// Pause Schalter
pause_btn.onRelease = function() {
if (!wahlSignal) {
pausePos = MySound.position/1000;
MySound.stop();
pauseSignal = true;
playSignal = false;
kugel_mc._visible = 0;
status = "Status: Press play";
}
}

pause_btn.onRollOver = function() {
status = (!pauseSignal) ? status = "Status: Pause playing" : status = "Status: Press play";
}

pause_btn.onRollOut = function() {
status = (!playSignal) ? status = "Status: Stopped" : status = "Status: Playing";
}

// Nächster Schalter
function nextTrack() {
if (aktAudio<totalAudio) {
aktAudio +=1;
AudioPath = aPath[aktAudio-1];
this.titel = songthis.titel[aktAudio-1];
artist = songArtist[aktAudio-1];
MySound.stop();
playSignal = 0;
pauseSignal = 0;
wahlSignal = 1;
delete pausePos;
kugel_mc._visible = 0;
trackAnzeige = aktAudio+"/"+totalAudio;
status = "Status: Stopped - Press play";
setCover(aktAudio-1);
}
}

next_btn.onRelease = function() {
if (aktAudio < totalAudio) {
nextTrack()
playSong();
}
}

next_btn.onRollOver = function() {
dstatus = status;
status = "Status: Load next song";
}

next_btn.onRollOut = function() {
if (status != "Status: Stopped - Press play") status = dstatus;
}

// Vorheriger Schalter
function prevTrack() {
if (aktAudio>1) {
aktAudio -= 1;
AudioPath = aPath[aktAudio-1];
this.titel = songthis.titel[aktAudio-1];
artist = songArtist[aktAudio-1];
MySound.stop();
playSignal = 0;
pauseSignal = 0;
wahlSignal = 1;
delete pausePos;
kugel_mc._visible = 0;
trackAnzeige = aktAudio+"/"+totalAudio;
status = "Status: Stopped - Press play";
setCover(aktAudio-1);
}
}
prev_btn.onRelease = function() {
if (aktAudio > 1) {
prevTrack();
playSong();
}
}

prev_btn.onRollOver = function() {
dstatus = status;
status = "Status: Load prev song";
}

prev_btn.onRollOut = function() {
if (status != "Status: Stopped - Press play") status = dstatus;
}

// Zeit Schalter
zeit_btn.onRelease = function() {
zeitSignal = !zeitSignal;
}

zeit_btn.onRollOver = function() {
dstatus = status;
status = "Status: Total / " +t_TrackZeit.total +" - Switch timedisplay ";
}

zeit_btn.onRollOut = function() {
status = dstatus;
}

// Drag Schalter
drag_btn.onPress = function() {
// Look Schalter
// Look Schalter
// Look Schalter
// Look Schalter
// Look Schalter
// Credits/Logo Schalter
// Look Schalter
// Look Schalter
// Look Schalter
// Look Schalter
// Look Schalter
// Look Schalter
// Credits/Logo Schalter
// Look Schalter
// Look Schalter
// Credits/Logo Schalter
// Credits/Logo Schalter
// Credits/Logo Schalter
// Credits/Logo Schalter
// Credits/Logo Schalter
// Credits/Logo Schalter
// Credits/Logo Clip (Ausgangszustand)
// Credits/Logo Schalter
// Credits/Logo Schalter
// Credits/Logo Schalter
// Credits/Logo Schalter
// Credits/Logo Schalter
// Credits/Logo Schalter
// Credits/Logo Schalter
// Credits/Logo Schalter
// Credits/Logo Schalter
//www.flashstar.de","_blank");
// Credits/Logo Clip (Ausgangszustand)
// Credits/Logo Clip (Ausgangszustand)
// Credits/Logo Clip (Ausgangszustand)
// Credits/Logo Clip (Ausgangszustand)
// Credits/Logo Clip (Ausgangszustand)
// Credits/Logo Clip (Ausgangszustand)
//www.flashstar.de","_blank");
//www.flashstar.de","_blank");
//www.flashstar.de","_blank");
//www.flashstar.de","_blank");
// Equalizer Schalter
// Equalizer Schalter
// Display
// Display
// Display
// Total Zeit
// Total Zeit
// Total Zeit
// Bereits
// Total Zeit
// Total Zeit
// Total Zeit
// Total Zeit
// Total Zeit
// Bereits
// Bereits
// Bereits
// Bereits
// Bereits
// Bereits
// Bereits
// Bereits
// Bereits
// Bereits
// Bereits
// Bereits
// Bereits
// Bereits
// Bereits
// Bereits
// Bereits
// Noch zu Spielen
// Noch zu Spielen
// Noch zu Spielen
// Noch zu Spielen
// Noch zu Spielen
((_global.position)%60);
b_TrackZeit.total = checkDigits(b_TrackZeit.minutes)+":"+ checkDigits(b_TrackZeit.seconds);
// Noch zu Spielen
n_TrackZeit = {};
n_TrackZeit.minutes = int((_global.dauer - _global.position )/ 60);
n_TrackZeit.seconds =int(( _global.dauer - _global.position )%60);
n_TrackZeit.total = checkDigits(n_TrackZeit.minutes)+":"+ checkDigits(n_TrackZeit.seconds);
// Ausgabe
sBalken("smc");
if (zeitSignal) {
display =n_TrackZeit.total;
} else {
display =b_TrackZeit.total;
}
// Trackslider
if (trackDrag != true) regler_mc._x = (MySound.position / MySound.duration) * sliderMax;
}

// Zweistelligkeit
function checkDigits(pWert) {
return (pWert<10) ? pWert="0"+pWert : pWert;
}

// Statusanzeige (Balken)
function sBalken(obj) {
prozent = _global.position*100/_global.dauer;
this[obj]._xscale = prozent;
prozent = parseInt(prozent)+"%";
}

// Doppelclick
MovieClip.prototype.dClick = function(tempo) {
ASSetPropFlags(this,["clickZeit"],1);
if (this.clickZeit-(this.clickZeit=getTimer())+tempo>0) return true;
}

// Prüfen des Komponenten Parameters playerlook
// (Simple/Extended Version)
if (!playerlook) gotoAndStop(3);

// Direkt Wahl
function setzeDirektwahl() {
for (var j=1; j <= 12; j++) {
this["dw" + j + "_btn"].nrtxt = j;
if (j > totalAudio) {
this["dw" + j + "_btn"].nr_txt.text = "--";
}
}
}

function setzeAudiowahl(pAkt) {
aktAudio = pAkt;
AudioPath = aPath[aktAudio-1];
this.titel = songTitel[aktAudio-1];
artist = songArtist[aktAudio-1];
MySound.stop();
playSignal = 0;
pauseSignal = 0;
wahlSignal = 1;
delete pausePos;
kugel_mc._visible = 0;
trackAnzeige = aktAudio+"/"+totalAudio;
status = "Status: Stopped - Press play";
setCover(aktAudio-1);
playSong();
}

// Trackslider
trackDrag = false;
sliderMax = bigdisplay_mc._width;

regler_mc.onPress = function() {
if (this._parent.MySound) {
trackDrag = true;
startDrag(this,false,0,this._y, sliderMax,this._y);
this._parent.onMouseMove = function() { updateAfterEvent() };
}
}

regler_mc.onRelease = regler_mc.onReleaseOutside = function() {
if (this._parent.MySound) {
trackDrag = false;
delete this._parent.onMouseMove;
stopDrag();
neuePosition = (this._x * (MySound.duration / 1000)) / sliderMax;
pausePos = neuePosition;
MySound.stop();
MySound.start(neuePosition, 0);
kugel_mc._visible = 1;
status = "Status: playing";
dstatus = status;
playSignal = true;
pauseSignal = false;
}
}

regler_mc.onRollOver = function() {
dstatus = status;
status = "Status: Drag Slider";
}

regler_mc.onRollOut = function() {
status = dstatus;
}

// Repeat Clip
repeat_mc._visible = 0;

// Repeat Schalter
repeat_btn.onRelease = function() {
playrepeat = !playrepeat;
repeat_mc._visible = playrepeat;
}
repeat_btn.onRollOver = function() {
dstatus = status;
status = "Status: Repeat track";
}

repeat_btn.onRollOut = function() {
status = dstatus;
}

// Playlisten Auswahl
// Direkt Wahl
function setzePlaylistwahl() {
playauswahl.playliste = "";
for (var j=1; j <= aPath.length; j++) {
playauswahl.playliste += "<a href='asfunction:playauswahl,"+j+"'>"+j+". <u>"+songthis.titel[(j-1)].substr(0,15)+" ...</u></a><br>";;
}
}

function playlistauswahl(pAkt) {
aktAudio = int(pAkt);
AudioPath = aPath[aktAudio-1];
this.titel = songTitel[aktAudio-1];
artist = songArtist[aktAudio-1];
MySound.stop();
playSignal = 0;
pauseSignal = 0;
wahlSignal = 1;
delete pausePos;
kugel_mc._visible = 0;
trackAnzeige = aktAudio+"/"+totalAudio;
status = "Status: Stopped - Press play";
setCover(aktAudio-1);
playSong();
}
Maybe someone could explain me once again how the rooting issue works, because it's always driving me nuts!
Help is very much appreciated.
Thanks!

Variables In Externally Loaded SWF Files
Greetings!

I am having a major problem in initiating variables and or accessing and evaluating variables which are included in the ActionScript of SWF files which are loaded into a Movie Clip in the main SWF (projector or swf) with a target of: _parent._root.NAV.ExternalAds -OR- another instance with a traget of _parent._root.NAV.ALERTS.

I developed a stand-alone EXE from a Flash MX file which contains two movie clips: 1) ExternalAds ; 2) ALERTS (see target paths above). These movie clips load external SWF files into them. These external SWF files are files which we modify occassionally to vary the content based on dates.

Without getting into all of the date object stuff they basically check the date and time and load the correct files into themselves. We create all of the other files which are loaded into the movie clips in advance and use the date object to chage them out. That all works fine and we have been doing that for several months.

Now however, we need to run a contest through this app. and we don't want things repeating throughout the day. We need to load only a specific file at a specific time and load it only once. The other side to this is that we have to cater to two different audiences: 1) the occassional user who runs the EXE file only daily; 2) the user who keeps the file running on their desktop all the time. SOOO... I need to use an Externally loaded SWF that runs for about a minute and then reloads, checks the date and time and repeats this process. If a particular alert has been run then a variable needs to be set in the main EXE (SWF) to indicate that the file has been played previously.

Here's a very simple example of what works without the variables involved:
The file ExternalAds.swf loads into the MovieClip _parent._root.NAV.ExternalAds

ActionScript Code:
// The SWF file: ExternalAds.swf -- contains the date object:

myDate = new Date();
currentMonth = myDate.getMonth();
currentDate = myDate.getDate();
currentMinutes = myDate.getMinutes();
currentSeconds = myDate.getSeconds();
/*
Then several frames down, we determine what to do based on the Date object's properties:
[NOTE THAT: the date related SWFs load into the same Movie Clip instance External Ads in the _parent SWF(EXE)]
*/
stop();
if (currentMonth ==6 && currentDate <= 31){
   loadMovie("DefaultAds.swf", "_parent._root.NAV.ExternalAds");
} else if (currentMonth == 7 && currentDate <=15){
   loadMovie("AugustAds.swf", "_parent._root.NAV.ExternalAds");
}
else {
   gotoAndPlay(1);
}

if (currentMonth == 6 && currentDate == 22 && currentHours == 10 && currentMinutes <=1){
   loadMovie("Alert7_22-10am.swf", "_parent._root.NAV.ALERTS");
}  else if (currentMonth ==6 && currentDate == 23 && currentHours == 12 && currentMinutes <=1){
   loadMovie("Alert7_23-12pm.swf", "_parent._root.NAV.ALERTS");
}
else {
 gotoAndPlay(1);
}
OK ... SORRY 'BOUT THE LENGTH OF THIS THREAD, but I don't know how else to explain it.

SO now if we want to introduce a variable and then evaluate it to determine what needs to be done along with the date and time, here's what I have been trying:

ActionScript Code:
stop();
if (currentMonth ==6 && currentDate <= 31){
   loadMovie("DefaultAds.swf", "_parent._root.NAV.ExternalAds");
} else if (currentMonth == 7 && currentDate <=15){
   loadMovie("AugustAds.swf", "_parent._root.NAV.ExternalAds");
}
else {
   gotoAndPlay(1);
}

if (currentMonth == 6 && currentDate == 22 && currentHours == 10 && currentMinutes <=1 && _parent._root.contest == "no" || _parent._root.contest == undefined){
   loadMovie("Alert7_22-10am.swf", "_parent._root.NAV.ALERTS");
}  else if (currentMonth ==6 && currentDate == 23 && currentHours == 12 && currentMinutes <=1 && _parent._root.contest == "no" || _parent._root.contest == undefined){
   loadMovie("Alert7_23-12pm.swf", "_parent._root.NAV.ALERTS");
} else if (_parent._root.contest == "yes"){
   loadMovie("Alerts.swf", "_parent._root.NAV.ALERTS")
}
else {
 gotoAndPlay(1);
}
When either of the files Alert7_22-10am.swf OR Alert7_23-12pm.swf load they attempt to set the variable _parent._root.contest = "yes", indicating that the file has been loaded before.

Once I start using variables, the only thing that works right is the Loading of the ExternalAds.swf.

I've tried using the _global object for the variable and setting it locally and here's what it seems like to me:

YOU CAN'T SET A VARIABLE AND EVALUATE IT, EITHER BY A LOCAL METHOD OR _GLOBAL METHOD IF THE SCRIPT TO DO IT IS IN A EXTERNALLY LOADED SWF WHICH LOADS INTO A MOVIE CLIP IN THE MAIN SWF(EXE).

IS THIS A CORRECT ASSUMPTION? WHAT OTHER METHOD CAN I USE??

[useastags]

Externally Loaded Txt And Urls With Variables
Hi,

I've built a dynamic scrolling textbox that loads external text and formats it via css. Everything works as it should except I need to add some links in the text file that contain variables (i.e., something like this: http://jobsearch.monster.com/jobsear...0&q=macromedia).

Flash will not interpret this properly as a normal html link in the loaed text file. Is this even possible? Are there workarounds?

Thanks,

Pete

No. Of Externally Loaded Variables Limited?
Hi there. Yes, I used the search function before asking.

I've built this (pretty primitive) Flash-gallery-thingy. In the first frame, it loads variables like the names of the different galleries, no. of pics in them and a short comment for all of them from a .txt file. This worked nearly perfectly up to now, but for some reason it isn't loading the comments of the last five galleries, even though I use exactly the same code for all of them and no matter how much time I give it to load. Question: is there a limit to the number of variables you can load from an external file?

Thanks.

Calculation For Variables Loaded Externally
Last edited by igx : 2003-04-16 at 21:45.
























Dear Expert Friends in Ultrashock,

My name is IGX, and I cannot do simple thing.

My problem is :

- I use Flash MX.

- I want to load external variables in .TXT file into flash.

- The file contains multiple variables namely, Fruits, Price, Buy
which I write it : &Fruits, &Price, &Buy - so that the Flash MX can understand that there are multiple variables inside this .TXT file.
The total are 3 variables in content, Name of the fruits, the price and the unit fruits bought.

- So far it works well, the variables are displayed in the Flash MX Dynamic text box.

- However, when it comes to the calculation, which I make formula like Total=Price*buy; which in this case the total was not the content in the .TXT file because, I want it to be calculated as the process in MX.

I only see the Total variable (Dynamic Textbox) is displayed as NaN.

- I already try _root.Total=_root.Price*_root.buy, but still the Total variable result is NaN.

- Please help this helpless me.

Thank you.

Global Variables- Using Them In Externally Loaded Movies
Hola everyone.

I am trying to make a flash presentation. These people want ot have MASSIVE amounts of speech in it, plus the option to turn off the speech and have word balloons in place. Don't ask why. ;-)

But I need to have a global variable, say, "speech" defined in my master movie. When set to 1, speech is on, when set to 0, speech is off.

I divide the presentation up into manageable chunks, and load them in as external movies, piece by piece as they progress further into the presentation.

How can I get these external movies, once loaded in, to check the value to see if speech is on or off?

I have to make sure when speech is set to "off" or "0", that a newly loaded external .swf loads in and plays with speech off.

Any help would be a god send.

thanks everyone!

Global Variables- Using Them In Externally Loaded Movies
Hola everyone.

I am trying to make a flash presentation. These people want ot have MASSIVE amounts of speech in it, plus the option to turn off the speech and have word balloons in place. Don't ask why. ;-)

But I need to have a global variable, say, "speech" defined in my master movie. When set to 1, speech is on, when set to 0, speech is off.

I divide the presentation up into manageable chunks, and load them in as external movies, piece by piece as they progress further into the presentation.

How can I get these external movies, once loaded in, to check the value to see if speech is on or off?

I have to make sure when speech is set to "off" or "0", that a newly loaded external .swf loads in and plays with speech off.

Any help would be a god send.

thanks everyone!

Referencing _root Variables From Within Externally Loaded SWF
Hi,

What I'm about to ask may seem obvious, and probably has been answered before, but I've been searching and researching for a while, and just can't see where I'm going wrong.

I am trying to build a Desktop style application in Flash using a standard drop down menu, and load new content screens from external SWF's based on what was selected from the menu.

In the root timeline, I use the following actionscript to create a new movie clip and load external SWF's

code:
this.createEmptyMovieClip("mainContent",10000);

//Load Movie Clips for each Page

function loadPage(clipToLoad, pageTitle) {

_root.pageNumber++;

mainContent.loadMovie(clipToLoad);

mainContent._x = 50;
mainContent._y = 130;
topmessage = pageTitle;

}


However, within the external SWF's, I wish to populate the UI Controls via array elements held on the main timeline (the array is created from an XML file loaded into the main timeline). I need to do this, as many of the default values will change from time to time.


However, I can't seem to be able to reference what I want to from the external SWF. For example, I would attach the following to a combo box element in the external SWF:

code:
onClipEvent(load) {


// auditorControls is the name the array holding details for all controls

for(z=0; z < _parent.auditorControls.length; z++) {
if _parent.auditorControls[z].controls == "dob_day") {this.addItem({label: _parent.auditorControls[z].display, data: _parent.auditorControls[z].internal});}
}
}



I can't publish this, as I get the error:

Scene 1, Binding between <unknown>.. and dob_day.dataProvider.: The endpoint of the binding does not exist
**Error**

However, if I change '_parent' to '_root', it seems to be looking on its own timeline, not the main timeline.

I guess what I am asking is how can I load an external SWF, and bind several controls to data held within an array on the main _root timeline ?

Any Suggestions?

Thanks
Neil.

Externally Loaded Swf Changing Root Variables
Hello All,
Been working on this for days and just can't get my head around it. I'm working on an interactive tutorial that has a main swf that loads in sub swfs. Loading is not a problem, and the Main accessing the sub swfs works fine. My problem comes in having the sub swfs change variables in the main swf.

In the code attached, I just want to change the variable complete1 in Main and I am trying to do that from the nextFrame() function in the start MC code. I have tried all methods to get this to work, and just can't seem to get the hang of it. I'm sure there is a simple way to do this, but for the moment I'm at a loss. Any help would be greatly appreciated.

Thanks,
Dude

Main
Code:

package
{
   import flash.display.*;
   import flash.events.Event;
   import flash.events.ProgressEvent;
   import flash.net.URLRequest;
   import fl.controls.*;

   
   
   public class umedic extends Sprite
   {
      
      var preLoader:preLoaderMC = new preLoaderMC;
      var loaderRequest:URLRequest;
      var loader:Loader = new Loader();
      var holderMC:Object;
      var appState:Number = 0;
      var complete1:Boolean = false; //***********************
      
      
      
      //var progress_Text:
      
      public function umedic()
      {
         init();
      }
      
      
      public function init():void
      {
         /*
         graphics.beginFill(0xff0000);
         graphics.drawEllipse(100, 100, 100, 100);
         graphics.endFill();
         */
         
         trace("UMedic Application - SGI 2008");         
         
         loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progresshandler);
         
         loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);         
                  
         // module event loop
         addEventListener(Event.ENTER_FRAME, eventLoop);
         
         loadMovie("Start_1.swf");
         
         //holderMC.startUp = true;
         
         
      }
      
      
      function progresshandler(myevent:ProgressEvent):void
      {
         var mcprogress:Number = myevent.target.bytesLoaded / myevent.target.bytesTotal;
         preLoader.barMC.scaleX = mcprogress * 100;
         //trace("bytes loaded: " + myevent.target.bytesLoaded);
         //trace("bytes total: " + myevent.target.bytesTotal);
         //trace("mcprogress: " + mcprogress);
         preLoader.loadText.text = Math.round(mcprogress * 100) + "%";
         
      }
      
      function onLoadComplete(myevent:Event):void
      {
         var loaderInfo:LoaderInfo = myevent.target as LoaderInfo;
         stage.addChild(loader);
         stage.removeChild(preLoader);
         holderMC = loaderInfo.content;
         holderMC.testMessage('Hello from the start1 clip');
         
         
         
         
         //complete1 = holderMC.complete;
      }
      
      
      function eventLoop(event:Event):void
      {
         trace("root event loop called");
         
         switch(appState)
         {
            case 0:
            {
               // start state
               trace("state 0");
               
               
               
               if (complete1)
               {
                  trace("the button was hit and we are complete");
               }
                        
               break;
            }
         }
         
      }
      
      
      
      function loadMovie(movieName:String):void
      {
         preLoader.x = 400;
         preLoader.y = 300;
         stage.addChild(preLoader);
         
         loaderRequest = new URLRequest(movieName);                     
         loader.load(loaderRequest);
         
      }
      
      public function tester(msg:String):void
      {
         trace(msg);
         
      }
      
      
   }
}


Start MC code
Code:

package
{
   import flash.display.*;
   import flash.events.*;
   
   import flash.net.URLRequest;
   import fl.controls.*;
   

   
   
   public class start1 extends Sprite
   {
      
      var complete:Boolean = false;
      
      
      public function start1()
      {
         init();
      }
      
      
      public function init():void
      {
         /*
         graphics.beginFill(0xff0000);
         graphics.drawEllipse(100, 100, 100, 100);
         graphics.endFill();
         */
         
         trace("UMedic Application - SGI 2008 - Start");
         
         
         skipBtn.addEventListener(MouseEvent.CLICK, nextFrame);
         
         
         
      }
      
      
      
      
      //*******************************************************************************
      function nextFrame(e:MouseEvent)
      {
           //  var _root = DisplayObject(parent.parent);
         
         trace("Event loop hit")
         
         complete = true;
         
         //trace((this.parent.parent as MovieClip).complete1);
         //_root.tester("crazy test");
         //_root.complete1;
         
         //MovieClip(parent.parent).tester("crazy test");
         
      }
//**************************************************************************************************
      
      
      public function testMessage(msg:String):void
      {
         trace(msg);
         //ExternalInterface.call('testMessage', msg);
      }
      
      
   }
}

Externally Loaded Variables, Having More Than One Line Of Text In One Variable
Hello, i'm currently working on a project that uses the loadVars(); method to load in an external set of variables from a .txt file.

one of the externally loaded variables is the contact details. With this there is both a phone number and a fax number. What i want to do is have both the phone and fax number in a single variable, but i want the phone number to appear on one line and then the fax number to appear directly underneath it on a new line.

in the text file i have it written like this:

contactDetails=Phone 345 495 353
Fax 345 495 352

What this effectively does is when loaded in, it DOES display Phone number on the first line, although then instead of displaying the Fax number on the next line down, it LEAVES A LINE blank, and then displays the Fax number.

I was wondering if there is any sort of syntax in notepad that allows part of the text to be started on a new line. (For example in C# i believe the command for a newline is "
".

Thanks in advance.

Controlling Externally Loaded Swf Files From "main.swf"
I've looked all over to get the info . . . can't find it anywhere.

I have main.swf which loads 4 other swfs inside of it such as navigation.swf, audioplayer.swf, and purposes.swf.

I want to be able to code from one button in the navigation.swf to move in the timeline of purposes.swf. HOW DO I DO THIS?

I have tried the _root.purposes.swf (but how can i get specific within the external swf file to specify the frame location [ex. gotoAndPlay (4)].

Does this make sense? It may make more sense if you go to the website.

http://www.fusionokc.com

The top buttons and content are "navigation.swf"
The bottom three buttons and content are "purposes.swf"
And "main.swf" is what loads both of them.
I want to be able to close the navigation.swf content when you push the bottom three "purpose" buttons and vice versa - when pushing top navigation, it moves the timeline to close purposes.swf

HELP!?!?!?!

Externally Loaded Text Prob In Externally Loaded Swf
hi.
so i have a swf that has externally loaded text in it that is being loaded into another swf. the text loads properly when the swf is opened by itself but when the swf is loaded into my main movie the text ceases to appear

my code to load the text is
loadText = new LoadVars();
loadText.load("dates.txt");
loadText.onLoad = function() {
event1.text = this.event1;
date1.text = this.date1;
location1.text = this.location1;
address1.text = this.address1;
cost1.text = this.cost1;

event2.text = this.event2;
date2.text = this.date2;
location2.text = this.location2;
address2.text = this.address2;
cost2.text = this.cost2;

event3.text = this.event3;
date3.text = this.date3;
location3.text = this.location3;
address3.text = this.address3;
cost3.text = this.cost3;
};




any help would be much appreciated

Externally Loaded Text Prob In Externally Loaded Swf
hi.
so i have a swf that has externally loaded text in it that is being loaded into another swf. the text loads properly when the swf is opened by itself but when the swf is loaded into my main movie the text ceases to appear

my code to load the text is
loadText = new LoadVars();
loadText.load("dates.txt");
loadText.onLoad = function() {
event1.text = this.event1;
date1.text = this.date1;
location1.text = this.location1;
address1.text = this.address1;
cost1.text = this.cost1;

event2.text = this.event2;
date2.text = this.date2;
location2.text = this.location2;
address2.text = this.address2;
cost2.text = this.cost2;

event3.text = this.event3;
date3.text = this.date3;
location3.text = this.location3;
address3.text = this.address3;
cost3.text = this.cost3;
};




any help would be much appreciated

Externally Loading Swf Inside An Externally Loaded Swf
Hey,

So basically, I have a main movie, with buttons for each section (such as home, portfolio and so on). Each button externally loads each section swf into a container. That works fine, all the sections load in and out perfectly.

Now, I want to load some more swfs (like projects in the portfolio section) into the swf thats been loaded from the main movie. Becuase I put my buttons inside movie clips (so that when you roll over the button, the animation finishes if you roll over another half way through), I had to use the tellTarget("/") script to bring it back, but it dosent work, it seems to load the movie into the main movie!

How can I fix this? Iv tried loading it into a different container symbol in the main movie but its still dosent work

Thanks alot.

Externally Loading Swf Inside An Externally Loaded Swf
Hey,

So basically, I have a main movie, with buttons for each section (such as home, portfolio and so on). Each button externally loads each section swf into a container. That works fine, all the sections load in and out perfectly.

Now, I want to load some more swfs (like projects in the portfolio section) into the swf thats been loaded from the main movie. Becuase I put my buttons inside movie clips (so that when you roll over the button, the animation finishes if you roll over another half way through), I had to use the tellTarget("/") script to bring it back, but it dosent work, it seems to load the movie into the main movie!

How can I fix this? Iv tried loading it into a different container symbol in the main movie but its still dosent work

Thanks alot.

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!

Controlling An SWF Externally?
I just heard something about "Flash Methods". Using Javascript to control the SWF from outside of it. Ever hear of it?

What I am trying to do is have the center content of my HTML page reload different textual content when you click on a button in the Nav, but not reload the whole page. The Nav is separate from the SWF content in the center of the page. Is there a way to have it so that when you click on one of the buttons in the Nav that it can tell the swf what fram to go to?

Please let me know if anyone knows how to do this. Sounds like it would be pretty simple if you know anything about how these "Flash Methods" work.

Thanks.....

Externally Controlling Flash
Hello all,

I wasn't sure where to post this. So i will start here. what i am looking to do is have a webpage with various radio buttons that i can click on or off. This will then in turn send a variable to flash to control certain features.

For example i would have buttons for different emotions and when you click one it would "turn" that emotion on or off in the flash movie. Basically the flash movie is a header for the home page. Then each day i could load up my control page click on the emotion for the day and in the header it would be displayed. This would save me from opening the flash file editing the file, publishing it and then uploading it each day.

If anyone has an idea how this can be done or can point me in the right direction. Please help me out.

i am currently using flash 8

Controlling Flash Externally
All I need is to make five images in HTML/CSS/javascript that act as buttons, and each of those buttons goes to a different frame in the movie, and that's it. I'm seeing ways to send text into the movie etc. I just need an external button, that goes to a specified frame. I'm mostly getting caught up in the Javascript part, because I don't understand it. Can someone please help or point me in the right direction?

Controlling Flash Externally
Hi, I have a lot of sound (background music and voice overs) synced perfectly in my flash file. But, I'm using Timeline Sounds, not Sound Objects.

I've tried converting everything to sound objects so I can pause/play everything, but then the sounds become very unsynced.

Bottom line:

Is there an easy way to pause and resume everything in the flash file (sounds included) using HTML, XML, or a separate flash file?

It's easy to pause and play visual objects, but I'm finding having the sound pause too, is horribly complicated, especially for a newbie like me, without having to convert and resync all the sound. Trying to avoid because there is so much of it.

Thanks in advance,

Brian

Controlling A Movie Externally
I was wondering if it's possible to control a movie via external links. Example.

"main.swf" is loaded into an html page.

below that is either another "menubar.swf" or just standard html links.
clicking one of the links would play a video clip in the "main.swf" or something like that.

Plurial Intances
I have a code to make a guy jump and stop whene it hits the ground.
But I want more grounds(ground1,2,3,4,...)
whene I place al the grounds in the movie clip "ground" the script doesn't completely work.
So my question is: How can I get "ground" count for al the intances of all the grounds(1,2,3,4,...) with actionscript?

Global Intances
Hi.
I am new to flash, and really don't know any scrpting. But i am trying to understand it. I want to add a firework display to our webpage. I am following instructions that I found in the Internet and have run into a snag because I can't figure out how to give one movie clip a global instance to add sound to my clip. these are the instructions and I need some clarification on how to do this.


You should now be (or make sure that your are) in the movie clip editor for "bang", now left click on the "particle" movieclip and give it a global instance name in the Windows -> Properties panel shown above. Then right click on the first frame in the timeline and select "Actions" now enter the following action script code:

This is the script

Actionscript: Remove line numbers for (n=8; n<50; n++) {duplicateMovieClip("particle", "particle" add n, n);setProperty("particle" add n, _rotation, random(360));setProperty("particle" add n, _alpha, random(30)+80);setProperty("particle" add n, _xscale, 50+Number(random(60)));setProperty("particle" add n, _yscale, 50+Number(random(60)));tellTarget ("particle" add n) {gotoAndPlay(random(5));}}



and this is a link to the website I am getting this from.


http://www.wipeout44.com/tutorials/flash_fireworks.asp

Controlling A Cascading Menu Externally
i have a dynamic three-level cascading menu that my client needs to be able to control externally (from within Authorware), (perhaps using something like ExpandMenuTo(*,*,*), he says)... the problem is, the menu is built using the data contained in an external file with this AS:
:::::::::::::::::::::::::::
on (release) {
tellTarget ("/prev") {
gotoAndStop(1);
}
// This is the part where we load the .swf or whatever
loadMovieNum (url, 10);
getURL(url, 10, "post");
// ----------------------------!!!!--------------------------
/:wo = pos;
/:next = eval("/os" add Number(pos+1));
/rev = eval("/os" add Number(pos-1));
/:titel = t_name;
/:header = /:titel;
i = 0;
// set all titels inactive
while (Number(i)<Number(../:t_anz)) {
i = i+1;
tellTarget ("../:" add i) {
gotoAndStop("normal");
}
z = 0;
// set all chapters inactive
while (Number(z)<Number(eval("../:k_anz_t" add i))) {
z = z+1;
tellTarget ("../:" add i add "-" add z) {
gotoAndStop("normal");
}
g = 0;
// set all sub-chapters inactive
while (Number(g)<Number(eval("../:u_k_anz_t" add i add "_k" add z))) {
g = g+1;
tellTarget ("../:" add i add "-" add z add "-" add g) {
gotoAndStop("normal");
}
// get rid of the sub-chapters...
setProperty(i add "-" add z add "-" add g, _visible, 0);
}
}
}
// infos 4 positioning
/:active2 = "";
/:active = _name;
tellTarget ("/") {
gotoAndPlay(6);
}
// last but not least... set this button active
gotoAndStop("active");
}
:::::::::::::::::::::::::::::
there is, of course, more code elsewhere...

i sure could use someone's help in getting these different levels controlled from outside... anyone?

thanks,
glenn

Copyright © 2005-08 www.BigResource.com, All rights reserved