Loading Issue / Doing Things Right
Ok,
So I think I know that I'm the problem, but how do I fix it?
I build flash movies, and I have heaps of things that attach themselves to the first frame. Problem with this is, loaders never work, because the first frame takes the longest to load. What I do at the moment, is create a invsible clip on the second frame and hide everything in that, but there has to be a better way!!
Can anyone guide me in the right direction?
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 04-20-2007, 03:03 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Those Loading Things...
On some flash presentations, ppl have this preloading screen, where it has a bar, and that bar shows how much of the presentation has been loaded, how do i make one of those cool things?
can i also show how much has been loaded in numbers?
thanks alot
Loading Things In The Background... A Little Help...
It has been a while since i read my actionscripting book, roughly about 1-1&1/2 years. I need some help with making my projects faster. Can someone help me on this matter. Do I have to load sounds and pics from an external swf? A pre loader only loads what is in the swf its on right? That would mean that if I had pics and sounds loading from an ext. swf, if would load quick? I am confused , please help me out! Thanks.
Loading Things In The Background
hi! i'm pretty new to flash and have learned the basics in terms of most stuff minus the action scripting. i want to make an online portfolio and have stuff load in the background while the visitor looks at the front page. if anyone could point me in the direction of another thread or help me out, i'd appreciate it! i honestly just don't know what to search for to find help
Auto Loading Things
another noob question. i couldnt find it in the tutorials area, so i decided to come here. i needed to know how to go to a labeled frame, automatially, meaning when i open the swf, i want the labeled frame to load.
if anyone knows where i can go for a good basics flash tutorial, id appreciate it. even the basics on this website is higher than my current knowlege.
thanks
Things Loading In Background?
Okay so this question might not excatly pertain to actionscript, however I figured this would be the best forum to post in. Ok so on to my problem, I built a interactive presentation, on scene one there is 3 movie clips and also some background colors that set the backdrop. So I did some drop down menus and they work great for all of my inividual MC's. However where I run into probs is when I try to put a action script on the fly out sub menus, I tell it where i want it to go and all that and it does what I tell it to when I click on the button, however for some reason some things still show up in that new page I built, all of the buttons and MC's are still running but u can see them but when u run the cursor around the page it picks up on the buttons and turns to the hand even tho there is nothing showing it's almost like it's still on a layer under the page. Non of those buttons should show up or work becuase this is suppose to be a new page with nothing on it! I am still learning how to organize my MC and how to make everything run smoothy. so in all in all I have 3 MC that basically do the same thing when u roll over them some sub menus fly out and I want to have those sub menus go to other pages, where should I put these pages and how should I do it?
Thanks ahead of time!
Loading Things From Txt File
hi everyone. First sorry for my English I must admin it's not on a very high level.
I'm woring on a webpage project. I almoust finished it but I need some help with one thing.
I want to load external data grom a *.txt file of *.xml. I want to write in my file date and place when my clan will meet.
For example:
2005.08.06."In pub"
2005.04.07."again in pub" etc.
My problem is that I cant write a script to load this data to my movie oe-by-one, then it shoul take system date and compare sys date and "my date". If "my date" is older than sys date it should load next date to find the one that is closest to sys date. Then in a text field it shoul write "Our next meeting is" and then if "my date"=sys date "today" and other things from my file, if "my date" is (I think it's correct) sys date +1 it shoud write "tommorow" and if "my date" is more than 1 day tahn sys date it shoul write for example "Our next meeting is on 2005.04.07 and it's again in the pub".
I don't know what to use xml or txt.
I hope that someone understand what I'm thying to do.
Thanks for any kind of help
[Flash5] Problems With Loading Of Various Things
I dont really want to use Flash5 for this, but its been promised to the client (thanks boss... :s) as flash5 for as wide an audience as poss :/
I have 4 frame movie, with 5 layers. the following actionscript is on these frames:
frame 1:
ads = new Array();
loadVariablesNum("ads.txt",0);
frame 2:
[no actions]
frame 3:
if (done == 1) {
for (i=0; i<_root.total; i++) {
_root.ads.push(this["ad"+i]);
}
holder._x = 0;
holder._y = 0;
} else {
gotoAndPlay(1);
}
frame 4:
holder.loadMovie(_root.ads[random(Number(_root.total))]);
stop();
the contents of the ads.txt is:
&ad0=advert1.swf&ad1=advert2.swf&ad2=advert3.swf&a d3=advert4.swf&total=4&done=1&
All this is supposed to do is load the names of .swfs into an array, then pick a random ad from this array, then load that .swf.
This is where i'm lost.. It works fine in flashMX test environment, and works fine if i load the swf thru windows (default mm flashplayer) but when I put it into a HTML page it wont work.
I've added textfields to find out if the vars were being loaded (i vaguely remember you having to do a frame loop to check that things have loaded before using them, and have done this with the done = 1 at the end of the loaded vars), but it just doesnt seem to be loading the textfile at all :/
the "holder" MC is just an empy clip sat off the stage.
i just dont get it :s any and all help appreciated. ( wish i could do this with loadvars )
Loading Things Into A Mc Problem-urgent
Hi folks,, really could use your help on this one.
I load text from sql into flash using php and it works, but then I make some adjustemnts and it doesnt,, here me out.
I have my main scene, into that scene I place a movieclip, lets call this movieclip mc(also the name of the instance).
In this mc I then make a dynamic textbox,, the variable is named box.
On the first frame I put box="loading"
Second frame I put
loadVariables("test.php", _root, "POST");
if (status eq "loading") {
gotoAndPlay(2);
} else {
gotoAndPlay(3);
}
And the third frame gets stop();
The tesp.php works,, Ive tried it,, when it has all the data from sql it sets &box= something and my flash movie goes to the third frame since it doesnt say loading in the box anymore.
All of the above(altough bad code) actually works, if the textbox named box is in the main scene,, but since its in a movieclip named mc and placed on the main scene it doesnt.
I know it has something to do with sending stuff to the movieclip but I have no idea how.
mc.loadVariables etc??
please help me out.
Things Suddenly Won't Work When Loading SWF In Another SWF.
Hi,
I made a Flash File (init.swf), in wich someone can type the numbers 0-12 in 12 different textboxes, to define an order, where a 0 means that it won't be used.
The number is used to put a variable on a certain position in an array:
_root.presentatie = new Array();
_root.presentatie[0] = "geen";
_root.presentatie[_root.voorpagina] = "voorpagina";
(the script is partly in Dutch)
The next frame in the SWF, I use this array, to display the correct order in a list (with Textfields)..
Later in the Project, This array (and most variables in the SWF) should be passed to anoter SWF..
This example works just FINE when I run the SWF file alone.. But I want to use 1 base SWF, in which I load different other movies:
loadMovie("slides/init.swf", "video_mc");
When I start init.swf from start.swf, It suddenly won't work anymore. I tried _global. but it still won't work.
Other strange fact, is that when i load init.swf in start.swf, suddenly the border around most textboxex isn't visable anymore, also the tekst next to the Checkboxes dissappears too.
Does anybody know how I can fix this. Please keep it Simple, I am a total n00b when it comes to Flash.
Thanx in advance
[Flash 8] Projector Not Loading Things @#%
Any help will be greatly appreciated:
After trying/reading/testing everything I could find related to this issue, I still can't make it work, you see, I'm making an application to be distributed by CD, as I have done so many times before, just that I don't know since when, I think since I installed Flash 8, the .exe version of my swf's (when exported as a Windows Projector, that is) nothing gets loaded.
The specific app I'm bulding right now, which is xml-driven, and loads two of them to work, doesnt work on the projector, how ever, after several testing, I've found any loading-related command wont work, loadMovie, loadMovieNum, XMLConnector.trigger, LoadVars.load.. none of them works... The thing is, the swf works perfectly. When publishing from flash, I have both .swf and .exe files checked . One version loads everything, the otherone does not.
You even have the option (you might have seen it) to make a projector file from a swf when viewing it in the standalone flash player. Even when doing that the .exe output wont work... So I'm pretty much desperated right now... anyone?? ... please??
PS.: Here is my app in case you want to check it, at the xml folder you can find the xml files Im loading
[F8] Preloading... It's Loading Later Things Before It Loads The Preloader
I have made a lot of preloaders before but for some reason this one is being weird.
I set it up how it should be, actionscript is good. Preloader is in scene before new one. Everything works right, but it loads like 60% before it even shows the preloader. It's white for a few seconds then the preloader just jumps to like 60%.
And on the bandwidth profiler it says it has 60kb to load on the first frame... which I have nothing on the first frame.
Would be be because I'm using components? or I have a lot of actionscript in the next scene?
Loading Things Into Scroll Panes Using Buttons
Is there any way to use action script on buttons to load different things into a scroll pane? I have on my main movie thumbnails that I use as buttons and I want them to load descriptions (of the thumbnail pics) into a scroll pane. When clicking on different thumbs, each will load a different description into the scroll pane. I am trying to follow some people's adivce on this forums for using dynamic text boxes, but nothing works....yet. Currently I cut an paste text into text boxes and convert those to graphic symbols and then load them into a scroll pane for descriptions. Is there an easier way of going about doing this?
Does It Make Things Easier To Plan Things Out Before Programming?
I know this may seem like a stupid question, but as a Actionscript beginner i'd like to know if its easier to plan things out before hand. Basically i've got to make a Class that does the following:
- Creates a shape with a size and colour defined by values passed through the constructor
- the initial position of the shape should be passed to the constructor
- the horizontal vertical speed should be passed to the constructor
- the initial direction (up or down) should be passed through to the constructor
- the shape should reverse direction on "impact" with the stage top and bottom.
Now i want to make the thing itself, but i think im going to struggle. unless i make a really decent plan of the class. so can anybody recommend what the best way to plan out this is?
if anyone can help, i'd appreciate it - if not, no worries.
[F8] How Do I Get Things To Follow Things?
I'm trying to get the enemy follow what you control in an overhead game and my current actionscirpt is...
onClipEvent(enterFrame){
function locate(uuuxe) { //function name is locate()
xd=this._x-_root.uuuxe._x //the difference in-between this symbol's x and the other symbol's
yd=this._y-_root.uuuxe._y
npx=(xd+yd)/Math.pow(2,1/2)
npy=(yd-xd)/Math.pow(2,1/2)
if(npx>=0 && npy>=0) {
this._rotation=0
this._y-=2.5
return 1
} else if(npx>=0 && npy<=0) {
this._rotation=270
this._x-=2.5
return 2
} else if(npx<=0 && npy>=0) {
this._rotation=90
this._x+=2.5
return 4
} else {
this._y+=2.5
this._rotation=180
return 3
}
}
}
What am I doing wrong? Thanks!!
FlashNoobXanthus
PLEASE Help Me With This Loading Issue
HI All,
I have 2 scenes in my flash file, "main.swf".
The scene 1 loads an external swf called "sc1.swf", while the scene 2 loads another swf called "sc2.swf".
Is it possible to load the "sc2.swf" in background while the scene 1 is playing the "sc1.swf"?? so that it can play "sc2.swf" immediately after scene 1 is finished playing..
Please Help!
Thanks in advance!
CSS Loading Issue...
I have an .swf with some HTML rendered text fields that use CSS formatting. Everything worked perectly fine when testing from our production server.
Now, after moving the site live the CSS is no longer working. A number of different domains (it's a network of different sites that dynamically brand) reference the same .swf and the .as for the .swf references the CSS file as:
myCSS.load("/vchat/chat.css");
I'm guessing it's an issue with it not referencing a full URL, and the multiple domain thing, but unfortunately it needs to work this way because depending on which site is referencing the .swf, it pulls the appropriate style info for the given site.
Anyone have any ideas, solutions, experoence with this?
Thanks for any help in advance.
---
c
Loading Issue
Im having a loading issue. No matter if I have an audio track and the file is 10 MB or if I remove the track and its 3.5 MB the preloader is taking the same amount of time. Im also getting a white box on launch, then the preloader loads to about 40% and freezes for a bit and then finishes. Does anyone know why this happens? Could this be code in my DreamWeaver file?
Heres the website.
www.mileagesd.com
Thanks
Loading SWF Issue
Hi,
I am working on this site that was originally one swf file with multiple scenes. I have now created a master.swf, preloader.swf, home.swf and swf’s for each of the pages. In my master swf, I have created an empty movie clip that I load the home.swf into. I load the swf files into levels.
Now in my home.swf file, I am loading the pages, like this:-
on (release) {
_level0.myMCL.loadClip("aboutus.swf", 5);
}
The above AS2 is on the button. The problem I have is that when the buttons are clicked, the whole page jumps for a second before the content displays. The current site is setup like this when a button is clicked and doesn't have this issue:-
on (release) {
gotoAndPlay("about", 1);
}
The first frame in my aboutus.swf is the content slowly revealing itself from right to left with a motion tween. How do I stop the screen from jumping before displaying?
Can anyone give me some help?
Flv Loading Issue
I'm using this code:
ActionScript Code:
var my_Video:Loader = new Loader();
import gs.TweenMax;
import gs.easing.*;
function startVideoLoad(loadURL) {
TweenMax.to(images.container, 0.5,{alpha:0, onComplete:continueVideoLoad, ease:Cubic.easeOut});
images.preLoader.visible = true;
}
function continueVideoLoad():void {
trace(loadURL);
my_Video.load(new URLRequest(loadURL));
}
my_Video.contentLoaderInfo.addEventListener(Event.COMPLETE, startVideoListener);
function startVideoListener(e:Event):void {
images.container.addChild(my_Video);
TweenMax.to(images.container, 0.5,{alpha:1, ease:Cubic.easeOut});
images.preLoader.visible = false;
}
my_Video.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressVideoListener);
function progressVideoListener(event:ProgressEvent):void {
var pcent:Number=event.bytesLoaded/event.bytesTotal*100;
images.preLoader.lbar.scaleX=pcent/100;
images.preLoader.lpc.text=int(pcent);
}
And its throwing me this error:
Error #2044: Unhandled IOErrorEvent:. text=Error #2124: Loaded file is an unknown type.
I have no idea what the issue is. The trace(loadURL) returns this:
images/testimonials/volvo/test.flv
What is causing the issue? Also, using this code, is it possible to add a skin to the video? This method works using *.jpg files but gives me issues with *.flv format.
SWF Loading Issue
Dear All,
Stuck with a peculiar problem..
We have developed a course and content file size in that course is 1 MB.
New files get loaded on click of navigation buttons.
Network constraints are such that after we click any navigation button, maxium size of the packet can be 100 K.
So we need to load the 1MB file in packaets of 100 K.
Can we control this using action scripting?
Please let me know if someone can help us..please let me know if any additional information is reqd.
Thanks
XML Loading Issue
Hi fellows
I have a problem loading XML when the file size exceeds 128 K then the xml after that is truncated which is causing a problem is there a way to coupe this problem can anyone tell me the work around for this problem, guys its very very urgent thanx in advance.
Wadood
Xml Loading Issue
hi. im having a strange issue that i cant seem to figure out...
ive got my xml slideshow loaded into a webpage but its not showing up.
however, the slideshow shows up when i go to the absolute url on the server.
its just not showing up within this webpage on the same domain. Any ideas?
FLV Loading Issue
Hi,
I have a slight issue with my movie at the moment. I have to use AS3 for a Flash assignment at Uni to create an IPTV site. I'm pretty new to all this Flash stuff, I've dabbled but never really used AS3 only AS2 very simply .
I have set up a pre-loader in the first scene of my movie for loading everything, the intro movie then comes in scene 2, and the main site is in scene 3 onwards.
The issue I have is that everything pre-loads fine except the FLA files. This causes issues as there is an FLA file that plays at a certain point in the intro with no controls. I want to make this FLA pre-load along with all the graphics so that there is no stuttering of the video but it can't load as it's about to play, as this will split up the flow. The file so far is here http://devarios.com/UniFlash/stargate_video_skip.html
I can't for the life of me figure out how to do this. Can someone help me please?
Here is the AS I'm using so far.
Frame 1 Scene 1 Preloader
Actionscript Code:
stop(); import flash.display.MovieClip; import flash.events.Event;import fl.controls.ProgressBar;import fl.controls.ProgressBarMode;import fl.controls.Label;//Add progress bar vaiable then display the barvar myProgressBar:ProgressBar = new ProgressBar();myProgressBar.indeterminate = false;myProgressBar.mode = ProgressBarMode.MANUAL;myProgressBar.maximum = 256;myProgressBar.setSize(180, 16);myProgressBar.move(205, 240)addChild(myProgressBar);//Add the percent label variable then display the labelvar myLabel:Label = new Label();myLabel.text = "";myLabel.autoSize = TextFieldAutoSize.LEFT;myLabel.move(260, 205 + myProgressBar.height);addChild(myLabel);this.addEventListener("enterFrame",onEnterFrame); function onEnterFrame(e:Event):void { var nProg:int = (Math.ceil((this.loaderInfo.bytesLoaded/this.loaderInfo.bytesTotal)*100)); UpdatePreloader(nProg); if(this.loaderInfo.bytesLoaded == this.loaderInfo.bytesTotal){ this.removeEventListener(Event.ENTER_FRAME,onEnterFrame); removeChild(myLabel); removeChild(myProgressBar); gotoAndPlay("startmovie"); } } function UpdatePreloader(nProg:int):void { //trace(nProg + '% Loaded'); myLabel.text = ( nProg.toString() + '% Loaded'); myProgressBar.setProgress(nProg, 100);}
Frame 1 Scene 2 Intro
Actionscript Code:
//Skip button listeners and events to allow skiping anytime in the introskip_btn.addEventListener(MouseEvent.CLICK, onClick);skip_btn.addEventListener(MouseEvent.ROLL_OVER, onOver);skip_btn.addEventListener(MouseEvent.ROLL_OUT, onOut);function onClick(event:MouseEvent):void { gotoAndPlay(1, "Home");}function onOver(event:MouseEvent):void { event.target.alpha = .5;}function onOut(event:MouseEvent):void { event.target.alpha = 1;}//Load the encoded soundfilevar encodeSound:URLRequest = new URLRequest("encodedSound.mp3");var encodedSound:Sound = new Sound();encodedSound.load(encodeSound);
Frame 230 Scene 2 Intro
Actionscript Code:
//Stop the timeline to allow the video to playstop();//Connect to the video stream and set the video sizes and location on the stage, buffer the video until it is neededvar nc:NetConnection = new NetConnection();nc.connect(null);var ns:NetStream = new NetStream(nc);//ns NetStream.setBufferTime:5;ns.client = this;ns.play("stargate1.flv");var vid:Video = new Video();vid.attachNetStream(ns);vid.x = 0.1;vid.y = 57.5;vid.height = 484.1;vid.width = 798.7;addChild(vid);//Set the onCuePoint function to go to Frame 1 of the Home scene when a cuePoint is found in the video, with the onMetaData to avoid compilation errorsfunction onMetaData(infoObject:Object):void{ trace("metadata");}function onCuePoint(infoObject:Object):void{ trace("cue data"); gotoAndPlay(1, "Home");}//Remove the old skip button listeners as they do not apply to streaming contentskip_btn.removeEventListener(MouseEvent.CLICK, onClick);skip_btn.removeEventListener(MouseEvent.CLICK, onOver);skip_btn.removeEventListener(MouseEvent.CLICK, onOut);//Skip button listeners and events to allow skiping anytime in the streaming videoskip_btn.addEventListener(MouseEvent.CLICK, onClickV);skip_btn.addEventListener(MouseEvent.ROLL_OVER, onOverV);skip_btn.addEventListener(MouseEvent.ROLL_OUT, onOutV);function onClickV(event:MouseEvent):void { gotoAndPlay(1, "Home"); ns.close(); removeChild(vid);}function onOverV(event:MouseEvent):void { event.target.alpha = .5;}function onOutV(event:MouseEvent):void { event.target.alpha = 1;}
Frame 1 Scene 3 Home
Actionscript Code:
//Define the upgrade flash link locationvar upgradeFlash:URLRequest = new URLRequest("http://www.macromedia.com/go/getflashplayer");//Add the listeners to the navigation buttonshome_btn.addEventListener(MouseEvent.CLICK, homeClick);profiles_btn.addEventListener(MouseEvent.CLICK, profileClick);media_btn.addEventListener(MouseEvent.CLICK, mediaClick);upgrade_btn.addEventListener(MouseEvent.CLICK, upgradeClick);function homeClick(event:MouseEvent):void { trace("Home");}function profileClick(event:MouseEvent):void { trace("Character Profiles");}function mediaClick(event:MouseEvent):void { trace("Media");}function upgradeClick(event:MouseEvent):void { navigateToURL(upgradeFlash); trace("Upgrade");}//Halt the timeline herestop();
Thanks for the help in advance
Adam
FLV Loading Issue AS3
Hi,
I have a slight issue with my movie at the moment. I have to use AS3 for a Flash assignment at Uni to create an IPTV site. I'm pretty new to all this Flash stuff, I've dabbled but never really used AS3 only AS2 very simply .
I have set up a pre-loader in the first scene of my movie for loading everything, the intro movie then comes in scene 2, and the main site is in scene 3 onwards.
The issue I have is that everything pre-loads fine except the FLA files. This causes issues as there is an FLA file that plays at a certain point in the intro with no controls. I want to make this FLA pre-load along with all the graphics so that there is no stuttering of the video but it can't load as it's about to play, as this will split up the flow. The file so far is here http://devarios.com/UniFlash/stargate_video_skip.html
I can't for the life of me figure out how to do this. Can someone help me please?
Here is the AS I'm using so far.
Frame 1 Scene 1 Preloader
Actionscript Code:
stop(); import flash.display.MovieClip; import flash.events.Event;import fl.controls.ProgressBar;import fl.controls.ProgressBarMode;import fl.controls.Label;
//Add progress bar vaiable then display the bar
var myProgressBar:ProgressBar = new ProgressBar();myProgressBar.indeterminate = false;myProgressBar.mode = ProgressBarMode.MANUAL;myProgressBar.maximum = 256;myProgressBar.setSize(180, 16);myProgressBar.move(205, 240)addChild(myProgressBar);
//Add the percent label variable then display the label
var myLabel:Label = new Label();myLabel.text = "";myLabel.autoSize = TextFieldAutoSize.LEFT;myLabel.move(260, 205 + myProgressBar.height);addChild(myLabel);
this.addEventListener("enterFrame",onEnterFrame); function onEnterFrame(e:Event):void { var nProg:int = (Math.ceil((this.loaderInfo.bytesLoaded/this.loaderInfo.bytesTotal)*100)); UpdatePreloader(nProg); if(this.loaderInfo.bytesLoaded == this.loaderInfo.bytesTotal){ this.removeEventListener(Event.ENTER_FRAME,onEnterFrame); removeChild(myLabel); removeChild(myProgressBar); gotoAndPlay("startmovie"); } } function UpdatePreloader(nProg:int):void { //trace(nProg + '% Loaded'); myLabel.text = ( nProg.toString() + '% Loaded'); myProgressBar.setProgress(nProg, 100);}
Frame 1 Scene 2 Intro
Actionscript Code:
//Skip button listeners and events to allow skiping anytime in the intro
skip_btn.addEventListener(MouseEvent.CLICK, onClick);skip_btn.addEventListener(MouseEvent.ROLL_OVER, onOver);skip_btn.addEventListener(MouseEvent.ROLL_OUT, onOut);
function onClick(event:MouseEvent):void { gotoAndPlay(1, "Home");}
function onOver(event:MouseEvent):void { event.target.alpha = .5;}
function onOut(event:MouseEvent):void { event.target.alpha = 1;}
//Load the encoded soundfile
var encodeSound:URLRequest = new URLRequest("encodedSound.mp3");var encodedSound:Sound = new Sound();encodedSound.load(encodeSound);
Frame 230 Scene 2 Intro
Actionscript Code:
//Stop the timeline to allow the video to play
stop();
//Connect to the video stream and set the video sizes and location on the stage, buffer the video until it is needed
var nc:NetConnection = new NetConnection();nc.connect(null);
var ns:NetStream = new NetStream(nc);//ns NetStream.setBufferTime:5;ns.client = this;ns.play("stargate1.flv");
var vid:Video = new Video();vid.attachNetStream(ns);vid.x = 0.1;vid.y = 57.5;vid.height = 484.1;vid.width = 798.7;
addChild(vid);
//Set the onCuePoint function to go to Frame 1 of the Home scene when a cuePoint is found in the video, with the onMetaData to avoid compilation errors
function onMetaData(infoObject:Object):void{ trace("metadata");}function onCuePoint(infoObject:Object):void{ trace("cue data"); gotoAndPlay(1, "Home");}
//Remove the old skip button listeners as they do not apply to streaming content
skip_btn.removeEventListener(MouseEvent.CLICK, onClick);skip_btn.removeEventListener(MouseEvent.CLICK, onOver);skip_btn.removeEventListener(MouseEvent.CLICK, onOut);
//Skip button listeners and events to allow skiping anytime in the streaming video
skip_btn.addEventListener(MouseEvent.CLICK, onClickV);skip_btn.addEventListener(MouseEvent.ROLL_OVER, onOverV);skip_btn.addEventListener(MouseEvent.ROLL_OUT, onOutV);
function onClickV(event:MouseEvent):void { gotoAndPlay(1, "Home"); ns.close(); removeChild(vid);}
function onOverV(event:MouseEvent):void { event.target.alpha = .5;}
function onOutV(event:MouseEvent):void { event.target.alpha = 1;}
Frame 1 Scene 3 Home
Actionscript Code:
//Define the upgrade flash link location
var upgradeFlash:URLRequest = new URLRequest("http://www.macromedia.com/go/getflashplayer");
//Add the listeners to the navigation buttons
home_btn.addEventListener(MouseEvent.CLICK, homeClick);profiles_btn.addEventListener(MouseEvent.CLICK, profileClick);media_btn.addEventListener(MouseEvent.CLICK, mediaClick);upgrade_btn.addEventListener(MouseEvent.CLICK, upgradeClick);
function homeClick(event:MouseEvent):void { trace("Home");}
function profileClick(event:MouseEvent):void { trace("Character Profiles");}
function mediaClick(event:MouseEvent):void { trace("Media");}
function upgradeClick(event:MouseEvent):void { navigateToURL(upgradeFlash); trace("Upgrade");}
//Halt the timeline here
stop();
Thanks for the help in advance
Adam
Ok, Loading Issue..
Alright here is what I have.
I have a main movie. I have buttons in the main movie. I have a target clip set up directly in the middle.
The way I have been doing things is, when a button is pushed, it loads an external movie into the target clip.
But the way I have been doing it, is defeating the purpose of the loader on my external movie.
Here's an example of the simple code I have been using on the button...
On (realease) {
LoadMovie("external.swf", "_root.targetclip");
then of course, on my target clip I have
OnClipEvent(load) {
play;
This is actually loading the movie before it even shows up i think, correct?? Then when I have the preloader at the start of the external movie, it just skips the preload and goes right into the main scene.
What I am asking is I guess, how do you just call the movie to go into a _root clip without loading it??? Or is there a better way to do this??? Thanks
Loading Issue With MP3
MP3 player trouble...
Hi. I built an MP3 player in Flash that works great with the exception of a few problems.
Details: Version 6; I am loading the MP3 from the server as an event.
Here are the problems:
1) When behind a firewall or an anti-virus program that performs a similar function the MP3 fails to load.
2) Sometimes, without the interference of a firewall - the MP3 loads but the loading info in not being updated - so the user has no idea that it is working.
Below is my main function - any advice is welcomed.
I omitted all of my other functions and variables because they should be inconsequential due to the nature of the problem. Thanks in advance to anyone who feels like helping.
If you'd like to help out a frustrated person - feel free to email me privately @ viennadreams2000@yahoo.com
code:--------------------------------------------------------------------------------
this.onEnterFrame = function() {
if (!_global.isLoaded) {
disableButtons();
loaded1 = myMusic.getBytesLoaded()/1024;
total1 = myMusic.getBytesTotal()/1024;
if (loaded1 != undefined) {
perc = int((loaded1*100)/total1);
progressBar.bufferPosition._xscale = perc;
status.text = "Loading: ";
status.text += perc;
status.text += "%";
if (loaded1>4 && loaded1 == total1) {
if (!_global.isStarted) {
enableButtons();
playSound();
ppbutton.gotoAndStop("play");
}
_global.isLoaded = true;
}
} else {
myMusic.loadSound(_global.sourceFile, false);
}
} else {
_global.dur = myMusic.duration;
_global.pos = myMusic.position;
this.totalTime = _global.dur/1000;
this.elapsedTime = _global.pos/1000;
}
showTime(this.totalTime, this.elapsedTime);
};
Can Anyone Help Me In A Loading Issue
Friends, Am doing a mapping application. I've produced functions to display the state wise and zip wise maps. I also included highways. As the database is very huge, it's getting too slow in drawing the routes. I get the values from the databse in XML and processes each point and then plots each point. I know that'll be the reason why it's too slow. Can anyone tell an alternate solution for this. What do u think about creating a static route and then displaying it when the appropriate location is produced.????
Any idea Guys!!!!!
Loading Issue...Please Help
I'm an amateur at Flash and I worked really hard on this project. I don't want it to go to waste just because it is too big. Can you guys help me make it smaller or help me find a way to make it load faster? Thanks! They won't let me attach it here. Is there anywhere I can upload it so you guys can take a look?
I tried putting it on my website but it's so big it won't load. The .fla file is 5,168 kb and the .swf is 370kb. I didn't put the .fla file on my site b/c that would just be stupid. I used this code to upload the .swf file on my website:
Code:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="550" height="400">
<param name="movie" value="tour.swf" />
<param name="quality" value="high" />
<embed src="tour.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="550" height="400"></embed>
</object>
It worked fine before when I barely had anything on the flash movie, but after updating it, it doesn't work. Are there any details that you guys want to know before you can help me? Sorry for bothering you guys. Thanks.
Loading Variable Issue
I have a movie loading a set of variables from a text file. When I preview the swf locally, everything works fine, yet when I put it online and test it, none of the variables load. Anyone out there have an idea why?
Issue Loading Array..Please Help
I have been at this problem every way I can think of for hours now. Im loading an array from an asp page with the following line
loadVariablesNum("search.asp",0,"GET");
I can see that the array values are arriving into flash because I have a textarea set to display the value of
_root.drinkname_a[0]
However I need to reference the array with a variable and I have tried to replace that 0 with variables that I am also showing the value of, but it NEVER displays if I set my text area to
_root.drinkname_a[anyvariable]
I thought its possible that you cant call a variable into the value of a text area so I attempted to use another variable as the display and set the variable like thus
onClipEvent (enterFrame) {
_root.drinkname1 = _root.drinkname_a[l];
}
where l is manually set to 0.
I am really stumped on this one so I would appreciate any help I can get.
Thanks
Site Loading Issue
Hello, need help on loading my website. I have and understanding of Flash MX but hardly any experience with actionscript, only simple button functions, etc.
My problem is this, I have a movie that is about 750k in size, I would like the movie to completely load before it displays the first frame, is this possible? (example of my site can be viewed here: www.wordnow.com/liz/gbeboweb_hum.html).
I would like my site to load in sections as some of my pages contain multiple .jpgs that are still not loaded when the first page of my site is displayed. Other unpredictable results also occur if the site is not fully loaded, i.e. when a user presses other buttons they are forwarded to the wrong page/frame. Should I be using functions like 'loadMovie', loadMovieNum, or even load my .jpgs externally? If yes, is there any good examples of the actionscript so I don't have to dive to in-depth with actionscript, as that side of brain (logic/math) just doesn't seem to function well
I feel that I have compressed my site enough, but I could be wrong. Isn't it reasonable for a person to have a 56K modem to wait for a 700K movie to load or is that asking too much?
Help or Advice would be greatly appreciated by this frustrated neebie
Thanks,
Liz
External Swf Loading Issue
alright...here's the skinny.
in my main movie
there is a button menu.
the button for pictures loads and external movie that has 4 more buttons.
i have a placeholder in my main movie called LOADWINDOW
now, when those 4 other buttons load...they call movies that are to load back into the LOADWINDOW in the main stage.
i'm not sure what my code needs to be to do this.
help please please please.
Preloader Issue With Loading MC.. Please Help
Hey guys!!
now i making a preloader that preloads the current movie but also want to pre-load a movie that is to be loaded and played later in this movie.
onClipEvent (enterFrame)
{
if (this.percent == null)
{
loadMovie("tilegame.swf", _parent.shell);
_parent.shell._alpha = 50;
this.percent = 0;
}
this.percent = ((_parent.getBytesLoaded() + _parent.shell.getBytesLoaded())/(_parent.getBytesTotal()+_parent.shell.getBytesTot al())*100);
this.bytes = _parent.getBytesTotal()+_parent.shell.getBytesTota l();
this.loadedbytes = _parent.getBytesLoaded() + _parent.shell.getBytesLoaded();
trace(_parent.getBytesLoaded());
trace(_parent.shell.getBytesLoaded());
trace(_parent.getBytesTotal());
trace(_parent.shell.getBytesTotal());
_parent.loadingtext = Math.floor(this.percent);
_parent.loadingbar._x = (this.percent*5.8);
if (this.percent == 100)
{
_parent.play();
}
}
What is happening, is that it is loading the movie in the loadmovie section while holding up the first frame's content from loading, and when i trace the bytesloaded/total, it is just loading the current movie (and also the reason why the loading bar starts at 70 percent..)
How can this be fixed??
thanks so mUCH MAN!!
Greg
Loading Issue...safari
im loading a couple of galleries and one works but one that is a copy of the first just with a different initial for the images being called ( thumbB1.jpg as opposed to thumbA1.jpg ) doesnt work. in safari i get this in the activity window
file:///Users/mikeb/Desktop/yes/images/thumbb9.jpg(45)
the number (45) just keeps getting bigger and the browser hangs. what is that ?
i tried changing the names of the "A" image and thumbs to "B" and that didnt help.
Loading External MP3 Issue
I am working with loading external MP3 files dynamically and for purposes of this posting, it works... However, when the sound loads and plays, it is extremely sped up and sounds like chipmunks singing... What is causing this?? How can I fix it??
Help please.... TIA
What's Wrong Here? (swf Loading Issue)
i have recently made my first "intro" with flash mx 2004, but am having troubles. In flash, the swf displays and works correctly. On internet explorer it works correctly, mozilla, it does not. I also had two friends test the URL, but only a blank flash screen is displayed.
the url is...
http://smithxi.brinkster.net/smith/start/start.html
and here are my project files...
http://smithxi.brinkster.net/smith/files/start.zip
any help is greatly appreciated. Help me out here guys.
Thanks dudes.
Loading External Swf Issue
Hey everyone - I'm sure this is easy, I just don't know how to pull it off at the moment.....
I'm loading an external swf into a MC from the main movie. I need to be able to call in the swf, THEN go to a specific frame of that swf.
Normally I'd use:
_root.content.loadMovie("whatever.swf");
Can I add something on to that to direct it to the frame number or name of whatever.swf??
Any help is appreciated!!
Rick
Loading Additional Swf's Issue
I want my site to have a photo gallery which will load on visitors demand.
Now I've made all the swf's neccesairy and I've coded everything.
The only problem is that no matter where I place my empty MC ( in the main swf ) the gallery will load on top of the page.. over my header and stuff...
how do I place the external swf in the window designed for it?
Jpeg Loading Issue
i have a flash loadin data and pics. everything is pretty simple as far as the pictures - load them into empty mc using loadMovie
it just seems that the flash can sit there at 0% loaded on the first load for some reason. like the first request to the server gets eaten up or something.
2nd, 3rd pic you open (same clip, dynamically loaded) open just fine, no choke
anybody else have this?
2nd question - if i check bytesLoaded and it's zero or less, i should/can do loadMovie again?
Loading External Jpg Issue
I don't know if anyone can tell me what I'm doing wrong here...
I'm trying to import a .jpg into a movie from an external source. I can successfully do it using this static phrase:
Code:
_root.imageHolder.loadMovie("images/1907.jpg");
and it looks great
However, the jpg name is dynamically generated and the variable is imported to the _root of the movie. The script that I usually use for importing a movie with a variable name doesn't appear to work:
Code:
_root.imageHolder.loadMovie("images/"+_root.jpgID+".jpg");
and I cannot work out why... I have the same script working using the same dynamically imported ID number in the same movie, but it is on a button and getURL:
Code:
on (release) {
page="image.aspx?&id="+_root.jpgID;
getUrl(page);
}
Is this something anyone else has come across before?
Thanks for any help
Loading MC Into ScrollPane Issue
Can someone have a look at this please and explain why the text is loading into the dynamic text field inside the MC but is not loading into the scroll pane. I am using Flash 8.
Thanks,
Mike.
LoadMovie And Loading Issue
I'm freaking out, so please, please help me!!!
I have a main movie, with an empty container, some buttons that load a swf in the container. This is a code:
on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = "home";
container.loadMovie("home.swf");
} else if (_root.currMovie != "home") {
if (container._currentframe >= container.midframe) {
_root.currMovie = "home";
container.play();
}
}
}
And now what I want to do, is use a preloader to preload the swf's before they are played..
I tried to add a preloader to every single external swf, but for some reason that doesn't work.
Any help, links would appreciated! Tnx in advance!
Image Loading Issue
Hi all,
I have a quiz that I created 2 years ago (in Flash MX) that brings in different question types (text type, single image question type, 3ximage question type etc) from an XML file.
Only now when coming to use the quiz again and needing to have a couple of '3ximage questions' appear one after another have I spotted an issue. The copy is updating for the question but the images are not re-loading. Only the first 3 images loaded appear for subsequent questions.
There is a lot of code, so without sharing it all I think the issue is with the code below. Can anyone spot anything obvious that would stop the images re-loading?
FRAME 1 OF 3xIMAGE QUESTION MC
------------------------------------------------------------------
stop();
------------------------------------------------------------------
FRAME 2 OF 3xIMAGE QUESTION MC
------------------------------------------------------------------
currentQuestion = _root.quiz.questions[_root.cq-1];
//Gets current question data and puts in variable
myLoader = new com.qlod.LoaderClass();
for( var i=1; i<4; i++){
currentImage = currentQuestion.childNodes[i].attributes.src;
//Gets url for image
var mc = createEmptyMovieClip("holder" + i, i);
var url = currentImage;
myLoader.load(mc, url);
}
holder1._x = 11;
holder1._y = 119;
holder2._x = 177;
holder2._y = 119;
holder3._x = 343;
holder3._y = 119;
stop();
------------------------------------------------------------------
Many thanks for reading. Any pointers much appreciated.
Adrian
Animation Loading Issue
Hi boys and girls,
I need to sort out something and I was wondering if somebody could help me, here.
I've got this little looping animation on a black web page, but while loading a blank (white) square of the size of the animation appears.
Now, I don't need a preloader, really, is that a way to mask this blank space maybe to be black?
Or what would you suggest?
Thanks!
Movie Loading Issue
Salutations,
I created an empty movie clip on the main stage where I load a movie into it.
Everything works fine when I "Test Movie." But, when I move everything over to the server... its not working.
the empty movie clip is named "bots" and its on the _root level.
the movie that is loaded into the empty MC has a button named "but2" that I want control... but, its not working.
Any help would be awesome...can you help? I hope so.
Thanks,
Tasker
[F8] Issue With Swf Not/partially Loading
I am using an xml framework, and for whatever reason the swf simply will not load the menu.
I have been at this for nearly 3 days, and I am going right insane. The site can be seen here:
www.skysurfboards.com
I have the fla files, and can quote the code. I also attached the zip with the file. Can someone look at it and tell me where I am fudging up?
Image Loading Issue
Hi all,
I have a quiz that I created 2 years ago (in Flash MX) that brings in different question types (text type, single image question type, 3ximage question type etc) from an XML file.
Only now when coming to use the quiz again and needing to have a couple of '3ximage questions' appear one after another have I spotted an issue. The copy is updating for the question but the images are not re-loading. Only the first 3 images loaded appear for subsequent questions.
There is a lot of code, so without sharing it all I think the issue is with the code below. Can anyone spot anything obvious that would stop the images re-loading?
FRAME 1 OF 3xIMAGE QUESTION MC
------------------------------------------------------------------
stop();
------------------------------------------------------------------
FRAME 2 OF 3xIMAGE QUESTION MC
------------------------------------------------------------------
currentQuestion = _root.quiz.questions[_root.cq-1];
//Gets current question data and puts in variable
myLoader = new com.qlod.LoaderClass();
for( var i=1; i<4; i++){
currentImage = currentQuestion.childNodes[i].attributes.src;
//Gets url for image
var mc = createEmptyMovieClip("holder" + i, i);
var url = currentImage;
myLoader.load(mc, url);
}
holder1._x = 11;
holder1._y = 119;
holder2._x = 177;
holder2._y = 119;
holder3._x = 343;
holder3._y = 119;
stop();
------------------------------------------------------------------
Many thanks for reading. Any pointers much appreciated.
Adrian
|