Control External Swf
Hi there,
I have following prob.
My buttons placed inside an mc.The mc placed on stage should do the following.
when hitting but1>tell the external swf that is loaded(visible)(loaded into a holder)to play frame21 till30.Then when the extern.swf reaches30.tell to go andplay frame2 of it's main timeline(root).(_root.gotoandplay(2); the externals have names like cont1.swf,cont2.swf,.... and are loaded all throug the same holder.
Hope someone can help
grtz,
FlashKit > Flash Help > Flash ActionScript
Posted on: 01-14-2004, 10:41 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
External SWF Control From SWF
If I have two flash movies on the same HTML page seperated by table how can I have buttons in one control instances on the other?
If you have ANY knowledge of this PLEASE reply ..
Thanks
Control From External SWF
Hi All,
Please help me to solve this problem.
I have a main movie. (Presentation.swf). Another movie (Intro.swf) is loaded in the first frame of this presentation. Now the Intro movie (which is been called) has a movieclip in it. And when the control reaches the last frame of the movieclip, I want the control to jump back to the 50th frame in the main movieclip i.e 50th frame of presentation.swf
Can anyone please say how can I manage to do so.
(using Flash 5)
Arup
External Swf Control
example: http://sinkholesucks.tripod.com/heythere.html (click logo)
in this prototype, the newsbox is overlapped by the twigs. this, of course, is all contained in one movie and achieved with layers. however, when it comes time to upload, the news box will be loaded as an external swf (as will each section) which brings me to my question. can i control an external swf's layer placement within the main movie? i am only semi-familiar with using levels (i.e. i would load the new swf on level 1, but it would cover up the main movie elements). i assume i could just make the overlapping elements yet another external swf and load that onto the next highest level, but i hoped their was a more efficient way. my novice skills frustrate me. any help would be greatly appreciated. thanks for your time.
External Swf Control
hey all,
i'm trying to control a main movie froma an external swf.
right heres comes the hard bit to explain.
i have a movie that borders the top of the page that i want to keep constant witin the whole site. then below i have a menu with three buttons on it. i can then click on each of these butons whih loads a movie into a windoe below without a hick-up.
however i also have a buton within one of the loaded up swf's in thwe bttom window which when clicked loads a new movie into the same bottom window.
it actually works nicely but the top movie dissappears when i load a movie within the container from clicking a button within a loaded movie.
in the main movie i have locked the root by
_lockroot = true;
but this hasn't done a thing to change what happens
then i load a movie into the bottom window with this code located on a button in the main movie.
on (press){
loadMovie("home.swf","container");
}
then within this movie i have a button that has this code on it
on (press){
_root.main.loadMovie("downloads.swf","containerOne ");
}
// this is where i lose the rest of the site but the movie loads on its own nicely.
so if any1 can help i would really appreciate it.
ta
G
[F8] External Flv Control In AS2.0
Good day,
I have an swf file within which a flv movie is displayed. I've been
controlling the flv movie using some of the AS3.0 commands,
for instance:
vid1.autoPlay = false;
vid1.source = "vid1.flv";
nothing fancy, mostly basic commands utilizing the FLVplayback
and on my computer and most others it works fine. The problem
occurs on some computers - I'm guessing that's something with
their older plugin versions (sample screenshot attached).
Is there a way to easily control the external flv files without
using ActionScript3.0? I'd like to be able to:
- load the external file
- pause it at any time, triggered on the timeline
- rewind it (as in vid1.seek(0); for AS3.0)
Nothing very advanced. Can it be easily achieved with AS2.0?
Best Regards,
Prez
Help With How To Control External Swf
Hello everybody.
Can anyone help me with this?
I have a main swf which loads, inside an empty movieclip called "container", 3 external swf (external1.swf, external2.swf, external3.swf) at different time.
On the main.swf I have a play & pause buttons and I want to tell them that when on press, stop/pause the current movie that is inside the "container"
How can I do this?
Thanks in advance
Control External SWF?
Is it possible to control an external SWF file with buttons on the main clip?
I have an external SWF loading into the stage, but I wanted to control "play" "stop" and "goto" with buttons outside that SWF.
How Do I Control An External Swf?
how would i go about doing this...
on the main timeline when the playhead gets to 50 it tells an external swf to gotoAndPlay ("framelabel");
Control External SWF?
Is it possible to control an external SWF file with buttons on the main clip?
I have an external SWF loading into the stage, but I wanted to control "play" "stop" and "goto" with buttons outside that SWF.
External FLV Control
Can someone please tell me how I can control a dynamically loaded external .flv file so that once it is loaded, you can visually see the movie but not have it play until you roll over it?
Currently, I am duplicated a movie clip based on data from a database and with an array telling each duplicated movie clip which .flv file to load. With each duplicated movie clip, I also create a unique Connection object and NetStream object for each one. When I use the command "myNetStream.play("myFLV.flv") all movies are loaded properly but start playing immediately. I don't want them to play until you roll over them. However I do want you to see the movie that is loaded though. If I use "myNetStream.stop("myFLV.flv") or "myNetStream.pause("myFLV.flv")" the movie is not visible anymore.
I can control it fine if the .flv files are imbedded into my .swf file, but I don't want them embedded as that will increase file size a great deal.
Has anyone worked with streaming .flv files and have any idea how I can control them?
Any help is appreciated.
External Mp3 Control
Alright alright. I give in...
I have trawlled many forums attepmting to get answers to solve my sound issue.
Ihave purchased many books to get answers to solve my sound issue.
I have searched the web
Quite simply there is too many different way to arrive at the final destination.
I have now attemted to keep the script simple to produce results and this is what I have so far:
The Play Button............
on (release) {
//Load Streaming mp3 behavior
if(_global.Behaviors == null)_global.Behaviors = {};
if(_global.Behaviors.Sound == null)_global.Behaviors.Sound = {};
if(typeof this.createEmptyMovieClip == 'undefined'){
this._parent.createEmptyMovieClip('BS_CantStop',ne w Date().getTime()-(Math.floor((new Date().getTime()) /10000)*10000) );
_global.Behaviors.Sound.CantStop = new Sound(this._parent.BS_CantStop);
} else {
this.createEmptyMovieClip('_CantStop_',new Date().getTime()-(Math.floor((new Date().getTime()) /10000)*10000) );
_global.Behaviors.Sound.CantStop = new Sound(this.BS_CantStop);
}
_global.Behaviors.Sound.CantStop.loadSound("D:\WE B_Projects\July04www.thevinylists.com\mp3s\Cant StopTheSultrySlutMix.mp3",true);
}
Works Fine
The Stop Button............
on (release) {
//Stop Sound Behavior
_global.Behaviors.Sound.CantStop.stop();
}
easy
Now the following buttons:
FF
REW
PAUSE
I have tried a variety of combos to control the sound at this location
D:\WEB_Projects\July04www.thevinylists.com\mp3s \CantStopTheSultrySlutMix.mp3
Does anybody know where I can find the information to resolve this issue
Many thanks,
Control External Swf
I'm loading an external swf... is there a way i can control this external movie... i'm using this code to call it.
Code:
on (release){
loadMovie (info.swf, _root.zone);
}
I want to be able to play a specific frame from "info.swf" ... i believe that there should be a way to give this external swf a local name and then access it normally, something like: _root.info.gotoAndPlay(5); or not?
thanks in advance for your help
Matt
How Do I Control An External Swf?
how would i go about doing this...
on the main timeline when the playhead gets to 50 it tells an external swf to gotoAndPlay ("framelabel");
External Swf Control?
Hey Kirupa users..... can someone help please!!
When loading an external swf, is there a way (similar to lockroot) where you can stop all access to the main swf.
i.e
stop the external swf from controlling any main swf data, ie. _global vars, level0 vars etc
There must be a way.
Cheers
unkemptrich
External Swf Control?
Hey Kirupa users..... can someone help please!!
When loading an external swf, is there a way (similar to lockroot) where you can stop all access to the main swf.
i.e
stop the external swf from controlling any main swf data, ie. _global vars, level0 vars etc
There must be a way.
Cheers
unkemptrich
How To Control An Flv That Is In An External Swf ?
QI'm going to attempt to clearly explain my problem, hopefully i do ok.
I have a main swf. All the main swf contains is some buttons and an empty movie clip. the buttons load up a bunch of different swfs. I will eventually have like 20 + swfs to be loaded into this main file. Each swf is it's own interface with at least 4 flvs you can play.
In my main swf,
I have a movie clip on the stage that has an instance name of box. And the first swf I have is called "movie1.swf" this swf loads automatically in the 1st frame. This is the "feature".
This is the code I use to load up the swfs.
Quote:
var myLoader:Loader = new Loader()
var myURL:URLRequest = new URLRequest("movie1.swf");
myLoader.load(myURL);
box.addChild(myLoader);
box.x = 0;
box.y = 0;
THIS stuff is my menu button. When You click on the top_btn which is the instance name for my menu button, it pops up a white box over the stage that contains a list of different swfs to jump to.
Quote:
top_btn.addEventListener(MouseEvent.CLICK, openIT);
function openIT(event:MouseEvent):void {
gotoAndPlay(2);
}
This close_btn is in the pop up menu, and tells the menu to go and play frame 13 where the close animation is...
Quote:
close_btn.addEventListener(MouseEvent.CLICK, closeIT);
function closeIT(event:MouseEvent):void {
gotoAndPlay(13);
}
It looks REALLY bad when there is an flv playing in the loaded swf doesn't pause when the menu pops up.
I know this code works to pause a flv if it is in the same swf as the button.
Quote:
pause_btn.addEventListener(MouseEvent.MOUSE_DOWN, pauseit);
function pauseit(event:MouseEvent):void {
Movie_flv.pause();
}
I need some way that when the top_btn pops up, the flv that is in the swf that is loaded at the time pauses.
Thanks so much for ANY help!!!!
External Control
Hello,
Does anyone know how I can make buttons that appear in one movie clip control which frame I go to in another movie clip?
Thank you...
External Mp3 Control
Alright alright. I give in...
I have trawlled many forums attepmting to get answers to solve my sound issue.
Ihave purchased many books to get answers to solve my sound issue.
I have searched the web
Quite simply there is too many different way to arrive at the final destination.
I have now attemted to keep the script simple to produce results and this is what I have so far:
The Play Button............
on (release) {
//Load Streaming mp3 behavior
if(_global.Behaviors == null)_global.Behaviors = {};
if(_global.Behaviors.Sound == null)_global.Behaviors.Sound = {};
if(typeof this.createEmptyMovieClip == 'undefined'){
this._parent.createEmptyMovieClip('BS_CantStop',ne w Date().getTime()-(Math.floor((new Date().getTime()) /10000)*10000) );
_global.Behaviors.Sound.CantStop = new Sound(this._parent.BS_CantStop);
} else {
this.createEmptyMovieClip('_CantStop_',new Date().getTime()-(Math.floor((new Date().getTime()) /10000)*10000) );
_global.Behaviors.Sound.CantStop = new Sound(this.BS_CantStop);
}
_global.Behaviors.Sound.CantStop.loadSound("D:\WE B_Projects\July04www.thevinylists.com\mp3s\Cant StopTheSultrySlutMix.mp3",true);
}
Works Fine
The Stop Button............
on (release) {
//Stop Sound Behavior
_global.Behaviors.Sound.CantStop.stop();
}
easy
Now the following buttons:
FF
REW
PAUSE
I have tried a variety of combos to control the sound at this location
D:\WEB_Projects\July04www.thevinylists.com\mp3s \CantStopTheSultrySlutMix.mp3
Does anybody know where I can find the information to resolve this issue
Many thanks,
Control External Swf
I'm loading an external swf... is there a way i can control this external movie... i'm using this code to call it.
Code:
on (release){
loadMovie (info.swf, _root.zone);
}
I want to be able to play a specific frame from "info.swf" ... i believe that there should be a way to give this external swf a local name and then access it normally, something like: _root.info.gotoAndPlay(5); or not?
thanks in advance for your help
Matt
Control External Swf
hey everyone, I havent done this in a while and pretty much forget.
I have an external swf that loads into a holder. From my main movie, How would I tell this loaded clip placed in the holder to go and play a certain frame in its timeline from a button in my main movie?
*Edit- Just read over my post and I think I need to elaborate more. The external swf has labeled sections and the first to show is an flv netstream connection, so Im presuming that if I press a button in my main movie and want it to go to a different frame label in the external swf, I have to add an action to close the netstream, is this correct?
Control The Mc From External File
hi all,
have anyone come up with the solution to control the mc's with external .txt file. So that for example:
i got this variable in the text file:
&weatherTemperature=30
so now when i load this variable to the movie or in to the mc there should be a script which controls the playahead to gotoAndStop to different frames depending on the value of the weatherTemperature variable.
to load the variables in to .swf works fine but the how to control by the value? i've tryed many things but nah.. maybe my approach is just been wrong from the beginnig so you guys know how to solve this prob?
anyway this ain't the only place to use this kinda of thing. it would give more dynamics to the page and yeah all you have to do is put anew value and tadaa.. but now the tadaa is on holiday or something..
thanks,
X And Y Axis Control Via External Swf - Pls Help
I need your help! I've got this scrolling site I'm building where if you click on a link, it changes the x and y position to "scroll" into view a new image. That part works great ... but then this:
I want to have an external SWF file control this x and y movement. I've loaded the swf just fine and it's buttons animate nicely. Problem is, they won't make the x and y axis of the main movie move.
Can anyone help?? Please?
Here is the code which calls the x and y scroll. It works in the main movie but will not work when used via an external SWF.
on (release) {
targetx = 2970;
targety = 294;
}
Here is the navigation itself:
http://www.prismtheory.com/nav.swf
Here is the main site. The reason it works right now in the main site is because I have each button individually placed in the main movie. I want to add MP3s to each button and THAT is why I need it to be an external SWF.
http://www.prismtheory.com
Thanks!!!!!
- ghostrider
Control External JPEG
I know how to call a jpg in a a movie symbol. But the jpg is always on the right and under of it. Can I center a called JPEG? (I have a lot of different size of JPEGS and I want to center them in my document independantly of their size)
please have some pity for my english
thanks
Control Loaded External Swf How To Plz
i used
loadMovieNum("title.swf", 1);
it loads the movie clip into the movie perfectly.
but now i want to control it, since it has no instance name i dont know how to, basically what i want to do is when i click on the button called home,i want to play frame 4 in the movie clip loaded.
any help would be appreciated very much.
thanx
Control Of External Loaded Swf
Hello all, new here and a seeking little help.
Scenario:
i'm successfully loading an external SWF inside a blank "holder" MC.
A link to the exact code i'm using is here...
http://www.angelfire.com/electronic2...rentframe.html
(note: not my code, it was shared by a kind member on these
boards in an old post and has been very helpful - big thanks
to catbert303)
What i'd like to be able to do:
1) control the loaded SWF with Pause/Play and Restart buttons.
2) have the SWF auto unload when it reaches the last frame.
3) be able to re-load the SWF again by the original load movie button.
I'm guessing #1 is just a matter of getting the control buttons
to communicate with the loaded SWF (or rather, the blank MC the
SWF is loading into). As for #'s 2 & 3 I'm guessing
an if _currentframe == _totalframes evaluation will sort it out.
Thanks for listening. If you are interested in helping with
this please take a quick peek at the code link provided and
let's work from there as a frame of reference.
Any tips are greatly appreciated.
-Tvu
Control Volume In An External Swf
I have a problem I hope someone can help me with.
Layout
Building a media player with 24 songs. Each song is in its own swf (don't load unless the user wants it). I tried other methods like attach sound in the main movie, but that many songs loading in the first frame just didn't work. Also streaming audio didn't work well with dial-up connections.
In each swf, I have the following in frame 1:
myMusic = new Sound();
myMusic.attachSound("song");
myMusic.start();
In the main swf, I can each song with a button action:
on(press){
loadMovieNum("1.swf",1);
}
There is also a volume control in the main movie, which was why I was using the Sound.object method to load each song. It is accessed as _level1.myMusic....
Problem
When I just insert the song into the timeline, the movie plays correctly, but no volume control.
When I use the Sound.object method, the individual swf works right, but not when called from the main movie. Does anyone have any suggestions? An example of what I am trying to do can be found at, [L=New Found Glory's website]http://www.newfoundglory.com/player.html[/L]
Thanks,
Miphi767
Control External Swf Movie
i have 2 swf's in the same html frame. the main one is used for a interactive moving navigation menu. the other one is just a plain animation. when i rollover a button i want the other movie to start playing. which string do i have to use for the button??? i read something about localconnection method. didnt work for me. maybe i did something wrong. maybe it has something to with the nav menu which already has other math scripting in it???
can someone help me out please???
tnx
External Movie Control
In Flash MX ... is there a way to use LoadMovie to load a movie inside an external swf file?
for instance ... I have an HTML page with 2 tables. In 1 table I have an swf file representing a menu and in the other table I have an swf intro. I want buttons in the menu flash file in table 1 to load and unload movies in the into swf file in table 2.
How can this be done?
Tx
Volume Control For External SWF's
I'm trying to find a tutorial that will allow the user to control the volume of external SWF's that load after a particular button is clicked.
I don't want the volume control to affect the volume on my buttons, etc, only on the loaded SWF's.
Any ideas?
One Preloader To Control All External .swf's
I am currently working on a project involving lots of external swf's. Using the load movie works fine. Heres the problem. In my main Movie, i have a preloader that I would like to use for all the external swf's, why add the same preloader to all the other movies, the point is to save time and file size. How can i use the main preloader for all the external swf's. I have the preloader within its own MC in the main movie, when a button is pressed (company button) the action sends to a frame where it stops, within this frame, i have the preoloader MC, the preloader MC does a sequence of animations then comes to a progress meter, here is where i need script to read and control the external swf so that is loads, in this case, company.swf
Thanks for any help, anything is possible
Danny
Control The Size Of The External Swf
i am loadin' an external swf... into my main movie. Can I use actionscript in my main movie, to control the size of the external swf that i m loadin'
Control External Exe With Fscommand
Hi,
I am actually trying to do this with projector but cant get it to work with the regular player either. I have a standalone program called min.exe (it minimises the browser window) I know the program works fine because I have gotten it to function with MSDOS prompt.
I have a button in my movie with this code:
on (press) {
fscommand("exec", "min.exe" add Chr(9) add "Macromedia");
}
It should minimize the window but it doesnt work. Any ideas?
Control An External Swf File
hello again!
it's possible to control an external swf file?
like: play to frame 30, when i press button A. play til frame 60, when i press button B...
how can i do that if it's possible?
if it's possible, post the code plz!
thx
Control Problems In External Swf
Hello,
I have code that loads an external swf file into my main movie.
The external swf is a very simple image gallery with three buttons. It works fine when I preview it on its own, but when it is loaded into my main movie, only one of the buttons works.
Might this be a problem with targeting? I have tried using this. commands, but to no avail. I have given instance names and frame labels to make things super specific, but no luck.
have any of you had this kind of problem?
help.
shotbot
How To Control External Swf File
Hi
I have made one presentation...main slide are in one fla..and for sound i have used external file...there is play and pause button in main fla...if i press pause the sound from external file should pause...and play when play button is press......is it possible...
please help me
Bye
NEXT FRAME Control From External Swf
I'll try my best to explain this...
I have my main swf that randomly loads a number of external swf files in a target (called 'target'). The main swf is 8 frames, each frame along the timeline randomly loads one of the external swfs and stops.
I would like to the buttons on the external swf files to progress the main swf by 1 frame.
This is something I thought I would have no problem with, maybe it's getting late...
Any help would be much appreciated.
Control The Main Swf From An External Swf
Hello,
I am trying to control a movie clip in my main swf file from an external swf file. I have tried unsuccessfully to use _root and _level0 with no success.
does anyone have any idea?
Thanks
Ollivier
External Mc Control On Second Click
Hello to Everyone,
External mc has loaded one more small mc which plays up to its stop, on the same button event another external mc is loading and that small mc is continuing play to its end. It works that way ok.
But whenever I click on the button again, it of course playing small mc from that same frame # I ordered earlier.
I understand there need to be some either counting or true/false statement. I tried if _framesloaded... unload. It does unload but without playing nicely as without if/else ...
Any help would be greatly appreciated.
Thanks,
Andrew
How To Control A Loaded External.swf ?
im loading an "external.swf" into an
empty movieClip in "main.swf".
that part works just fine.
i want to run a chunk of code when the "external.swf" is done playing,
or
// if (externalSWF._currentframe == lastFrame) {.....
how can i do this ???
i've tried figuring the total number of frames in the external.swf,
but since a single-frame movieclip is loading it,
the main.swf always returns the number of frames as "1".
How To Control A Loaded External.swf ?
im loading an "external.swf" into an
empty movieClip in "main.swf".
that part works just fine.
i want to run a chunk of code when the "external.swf" is done playing,
or
// if (externalSWF._currentframe == lastFrame) {.....
how can i do this ???
i've tried figuring the total number of frames in the external.swf,
but since a single-frame movieclip is loading it,
the main.swf always returns the number of frames as "1".
[F8] Any Way To Control An External Child Swf?
I'm wondering if there's any way to control an external child swf loaded into an external parent swf in an empty movie clip.
I have external SWFs that I can't modify, one is a player skin run with code (not by frames) and it loads and controls another SWF of content. When I load these items in my empty container, I'd like to be able to communicate with the content swf, but I'm not sure how to do that.
Any ideas on a way to do this?
I'm not sure if it needs to be a variable in the root swf or if thats even possible. Confused.
Thanks!
Also, I know the skin player swf and content swf filenames, but I'm not sure what kind of code is inside the skin player swf that controls the content swf.
[F8] Control External Movie
Hello everyone,
I have a .swf file thats calling in a external .swf. I've managed to play the external movie and even change the volume.
But I would like to know is there a way to create a slider that can fast forward through the external movie, like the ones you get on movie players.
Thanks
Wayne
Control Movie With External MC
Hello everyone:
Here is the crux of my problem. I have a timeline in my main movie that I want an externally loaded MC to control.
So, I have a dynamic text box called "exitHeader" that I want populated with a rollover from a button within the external MC that I have loaded.
Here is the external MC's button's actionscript...
on (rollOver) {
exitHeader="apple 4b"
}
on (rollOut) {
this.exitHeader=""
}
I know somewhere you have to put "_root" or "this" or "_parent", I just can't seem to figure out where! Please help, thank you.
Glenn
Mc Control Within External Swfs
Hi,
I have been searching the forums for hours I can not find a specific answer for such a simple problem. Any help would be greatly appreciated!
In the main swf, I have a container (main_container) that holds an ext. swf called "about". In the "about.swf" there is a nested mc (loaded_button) that I would like to target from the main swf. This loaded_button needs to control a mc (main_image) in the main swf file.
The "loaded button" has no AS attached to it in its swf, so that it is only programmed from the main movie AS.
Everything loads fine, but I can not seem to target the "loaded button" for the onRelease command. The target path for the "loaded_button" does work however if it is used as a target for the onRelease function, just not as a location of the onRelease button.
This code is attached to the frame on the main swf.
Code:
loadMovie ("support/all/about.swf", _root.main_container);
_root.main_container.loaded_button.onRelease = function(){
_root.main_image._alpha = 40;
}
External Soundfile Control
Hi
I am using a simple variable to load an mp3 into my project,
var my_sound1:Sound = new Sound();
my_sound1.loadSound("http://www.gabba.tv/01.mp3", true);
I would like to know if it is possible to control the parent swf from this?
i.e. is there a code that once the mp3 has played through once,
a
root_GotoAndStop(2);
can be added or a
loadmovie(2);
can be added ?
I just want to change the scene when the music has stopped,
but prefer the sound quality of a file that is streamed rather than embedded in
a swf.
Is this possible?
thanks J
Any Way To Control The Child Of An External Swf?
I'm wondering if there's any way to control an external child swf loaded into an external parent swf in an empty movie clip.
I have external SWFs that I can't modify, one is a player skin that loads and controls another SWF of content. When I load these items in my empty container, I'd like to be able to communicate with the content swf, but I'm not sure how to do that.
Any ideas on a way to do this?
I'm not sure if it needs to be a variable in the root swf or if thats even possible. Confused.
Thanks!
Also, I know the skin player swf and content swf filenames, but I'm not sure what kind of code is inside the skin player swf that controls the content swf.
Need More Control Of External Preloader
Hello! Im either new here, or haven't visited in a *very* long time *grins*!
I followed a tutorial (after hours of searching for one I could understand!) to create an AS3-ish preloader for an external file. It works just great, but I need to alter it to allow the ext.swf to load into a target_mc - like I used to do in AS2, since this code simply replaces all original content - Ive tried adding a var to create the mc, but Im just confusing myself!
I need the original content to remain visable until the user clicks "enter" on the newly-loaded ext.file, & to be able to control where the ext.file sits on stage. Below is the code Ive currently got, & *any* advice would be precious!
ActionScript Code:
var myUrlReq:URLRequest = new URLRequest("newtest.swf");
var myLoader:Loader = new Loader();
myLoader.load(myUrlReq);
myLoader.contentLoaderInfo.addEventListener(Event.OPEN,showPreloader);
myLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,showProgress);
myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,showContent);
var myPreloader:Preloader = new Preloader();
function showPreloader(event:Event):void {
addChild(myPreloader);
myPreloader.x = 650;
myPreloader.y = 380;
}
function showProgress(event:ProgressEvent):void {
var percentLoaded:Number = event.bytesLoaded/event.bytesTotal;
myPreloader.loading_txt.text = "Loading - " + Math.round(percentLoaded * 100) + "%";
myPreloader.rectbar_mc.width = 50 * percentLoaded;
}
function showContent(event:Event):void {
removeChild(myPreloader);
addChild(myLoader);
}
Thank you all in advance, even if you just take a peek!
scotia
|