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




Transition When SWF Loads Out



Without using the timeline and only AS. Is there a way to fade out an image being displayed in the swf when it's loading out?

Cheers



KirupaForum > Flash > Flash 8 (and earlier) > Flash MX
Posted on: 01-15-2005, 11:54 AM


View Complete Forum Thread with Replies

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

Transition When SWF Loads Out
Without using the timeline and only AS. Is there a way to fade out an image being displayed in the swf when it's loading out?

Cheers

External Movie Loads, But The Dynamic Text That Loads With It Won't Render HTML?
I have a set of SWFs that load when a button is pressed on the parent SWF file...they all load into an empty placeholder, and each contains it own dynamic text field. the problem i'm having is, the text loads, but the HTML won't render, so i get plain text and html tags

the script in my external SWF files is as follow.


var lv = new LoadVars;
lv._parent = this;
lv.onLoad=function(success){
if(success)this._parent.home.text = this.guide;
}

lv.load("guide.txt");


everything is filled out correctly in the Property menu, someone PLEASE help

2 QUESTIONS: 1)get Internet Browser 2)htmltext Loads After Image Loads
1) is it possible to check whether the user is using internet explorer, or firefox, opera, etc. /retrieve the browser info?

2) how can i tell a text to load once it's html text has loaded. as in if it had an image tag in the htmlText, and i want the text to size itself [_width = textWidth] but it will do it too early, and i need it to function when the htmlText is loaded.

EDIT: i made a button to go to the second frame when clicked, and the second frame would resize the text. so i clicked it once the image loaded. however the text still went to like 1x1. so it doesnt register an image as text..obviously..soo..how could i make it size itself to the image.

Load Movie By Number 1.swf Loads 2.swf Loads 3.swf
hey everybody,

i have a main movie in which i load an externel "1.swf". i've got plenty of swf's to load (2.swf, 3.swf, 4.swf and so on) how can i make a link in 1.swf which automatically loads 2.swf.

i don't want to specify load 2.swf - i want it to load mynumber+1.swf (i think you get the idea). so that i don't have to make every link. i want 1 code for all.

thanks for helping me out on this one

MC That Loads Another MC That Loads Another MC, Images Look Pixellated. WHY?
Is there something I can do to prevent this? I unclicked the "anti-alias" button in the properties of the imported image, and also tried making it lossless (png). For some reason the images, when I test the parent MC, still come out pixellated. Here is the hierarchy in case u don't understand where the images are:

Parent SWF (my portfolio) contains "container"
|
Loads MC (printwork.swf) into it
|
printwork.swf has a "container"
for loading external swfs
|
brochure1.swf is loaded
into the "container" on
printwork.swf.

The image brochure1 comes out very pixellated....anyone know why>???

Transition Causing Colors To Be Off In Transition
I'm trying to recreate a transition/fade of an image from a flash file that I only have the swf to. It looks great on my box, but once live a viewed through Firefox, the colors get almost pschycodelic during the transition. I am using a tween between 0% alpha setting to 100% alpha, and selecting the blend to 'Hard Light'.

Has anyone else seen this and know of a work around?

Thanks.

jean

In/out Transition From Voetsjoeba : Problem With The Out Transition
hello,
I have some problem with a in and out transition Voetsjoeba explain here
My problem is that my 'out' transition is in a movieclip in the clip loaded so i tried to target it like this
ActionScript Code:
on (release) {    if (this.currMovie == undefined) {        this.currMovie = "print";        container.loadMovie("print.swf");    } else if (this.currMovie != "print") {        if (container._currentframe == container.midframe) {            this.currMovie = "print";            container.content.play(14);            trace("???");        }    }}
It is the code i have for my buttons that load the page, the trace command is read succesfully but it won't play my animation out.
On my loaded movie i have
ActionScript Code:
midframe=content("out")
on frame 1 because my transition is in the movieclip content.
The button that load the file is 'print' and 'web' in the soumen movieclip. I've posted my file here :
FILES
If someone can help me, it would be a great help !!

Thanks
Ubik

In/out Transition From Voetsjoeba : Problem With The Out Transition
hello,
I have some problem with a in and out transition Voetsjoeba explain here
My problem is that my 'out' transition is in a movieclip in the clip loaded so i tried to target it like this
ActionScript Code:
on (release) {    if (this.currMovie == undefined) {        this.currMovie = "print";        container.loadMovie("print.swf");    } else if (this.currMovie != "print") {        if (container._currentframe == container.midframe) {            this.currMovie = "print";            container.content.play(14);            trace("???");        }    }}
It is the code i have for my buttons that load the page, the trace command is read succesfully but it won't play my animation out.
On my loaded movie i have
ActionScript Code:
midframe=content("out")
on frame 1 because my transition is in the movieclip content.
The button that load the file is 'print' and 'web' in the soumen movieclip. I've posted my file here :
FILES
If someone can help me, it would be a great help !!

Thanks
Ubik

AS2.0 Fade Transition - Value Before Transition
I've been all over the forums this evening trying to find my answer before posting but I haven't quite found the answer.

I have a navigation section that has a series of buttons and when those buttons are rolled over I want to initiate a few actions. One action being a fade in of a movieclip that contains a graphic element.

Using the mx.transitions.fade class I have been able to sucessfully fade the mc in when I rollover the specified button. My problem is that I don't want the mc to be visible until it is faded in, and since the fade doesn't happen until I rollover a button I'm not sure how to setup the mc to be "invisible". Also when fading in I'm not sure what value that is affecting. I don't want to have it re-fade in if I rollover a neighboring button while it is still visible. I know I need to have some kind of check in place I'm just not sure what it is.

Maybe it's just my train of thought, but I've tried to think this through and I'm having some troubles. Can anyone offer any suggestions please?

Which Way Loads Best ?
Hi there,

I've been poring through these forums and have found them really helpful but still have a couple of questions about loading in external swfs.

sorry ... I can tell it's becoming a bit of a tired topic.

As a new-head I'm trying to keep things relatively simple. I have a blank main movie, into which I've loaded in my menubar and homepage animation using 'loadMovie' as a frame action. From here the plan is to load my pages 'onRelease' of the menubar buttons. As I understand it from what's been written, this is alot better for 56k users in terms of breaking up the download.

My questions to the mighty panel are :

1. My individual pages, for good reason, have large images on them. I've put a pre-loader at the beginning of each page but don't like the flow of that too much. I wondered if there was a way to intelligently preload them ... ie. while the user is reading one static section, use the spare bandwidth to work on the next ?

I read a long thread about streaming bugs with the Flash 6 player that seemed to suggest that once you begin loading something, it's progress cannot be stopped. If that's still true it looks like an obstacle.

2. Well, perhaps an alternative ... could the large images be pre-loaded (intelligently ... with background spare bandwidth again) though some shared library thus making the swfs. smaller ?

3. A simple one. If you import an swf to level 1 and then another to level 2 is there any way to preserve the transparency in the imported swfs. so that you can see the movie playing underneath ?



Sorry about the mammoth essay. Just trying to be concise.


Thanks in advance to anyone for taking up the mantle.

cheers


morg.

XML How Much Loads?
hey there,
when you load XML does ALL the data load or just the relevant data?
say if i have a 4kb XML file, and each section is only 0.5kb will i haffa load the full 4kb? or will i just haffa load the 0.5kb to display one sections?
bLIndchILd

Loads On PC But NOT Mac?
Hello everyone,

A co-worker created a pop up loading window in Flash 4 on a PC. This pop up loading window will show up on PCs, but not on Macs. Does anyone know why this happens? Could it have something to do with the Flash Plug In?

Also, is there a way for the designer to make sure the online viewer sees the fonts they intended to be viewed?

Thanks for you help.

Loads Old Swf
for some reason when i updated my site it always goes back to the old swf file for some reason its still caching the old file, is there a way to fix this?

Loads Old Swf
for some reason when i updated my site it always goes back to the old swf file for some reason its still caching the old file, is there a way to fix this?

Swf Which Loads Another Swf Which Loads CSS
Hello,
I have a text field with some Css appiled to it which is working on its own. This is basically just an swf with a latest news box in it. However, in my complete animation this swf is loaded by another main.swf, and when i test this, the css or the dynamic text does not load correctly.

The code is:var format = new TextField.StyleSheet();
var path = "news_styles.css";
trace(1);
format.load(path);
trace(2);
format.onLoad = function(loaded) {
if (loaded) {
trace ("onLoad called");
trace(3);
output.styleSheet = format;
myLoadVar = new LoadVars();
myLoadVar.load("news.txt");
myLoadVar.onLoad = function(success) {
if (success == true) {
trace(4);
output.variable = "intro";
output.htmlText = myLoadVar.intro;
}
};
} else {
output.text = "Error loading CSS file!";
}
};
When i compile this to an swf which is loaded by the main swf it comes up with the error "Error loading CSS file!".

I think it is some porblem with the referencing to the new textfield.stylesheet call but im not sure what.

Does anyone know why the CSS wont load when it is in an swf being loaded by another swf?

Thanks

Getting URL Where Swf Loads
Hi!

Does anyone know how I might obtain URL of the page where the flash actually loads, as opposed to the URL of the flash file?

Thanks!

2 MC Loads In 1
OK hey,

I have a Flash Movie called " Mix.swf "
and i also have 2 other Flash Movies Called " ebar.swf " and " Main.swf "

ok in the MIX.swf. i have 2 empty MCs, one called " bar_p " and sec is call " main_p".

aslo those 2 movies ebar and main, have for each one a Preloader.

So when you go to MIX.swf u will find 2 preloader running over there. but the problem that one movie is loading before the other ispite that both have the same size.

SO how to make a Preloader in MIX, that count the Percent for the other 2 Movies in the same time,so they will together and using one Preloader.

Thanks In advance chawww

Preloader Says NaN%, Then Loads Okay Why?
Okay,
I have a site which has 5 .swf files. In my preloader I want it to display how much of each .swf file has loaded, one at a time.
To do this I've used 6 seperate frames (the first is to load the actual preloader, very small).
My problem is that my percentage loader is coming up with NotANumber (NaN) below 20%. After that it loads fine.
For example, the 3rd .swf file to load is called in level 3 (specified earlier in the programme)

output = Math.floor((_level5.getBytesLoaded()/_level5.getBytesTotal())*100)

Where output is simply a dynamic text box.
Why would this display NaN and then after 20% start to display the percentage?
Thanks for any help.

Preloader Loads To Much
Need help, my main movie is fairly small, it calls other movies that are fairly big. In scence1 the preloader loads the main movie and its movies linked to it!!(hope your still with me) this is the code on the preloader clip
onClipEvent (enterFrame) {
ifFrameLoaded (2) {
_root.gotoAndPlay(2);
}
}
how can I load the main movie without the linked movies?? or should I go about this another way....
http://members.home.net/pascalyotis
(it does work, just takes forever, and preloader is basically useless, piece of shyt, jarbig)heelp

What Loads Faster?
Hi,

I may be showing my ignorance here (and likely stupidity), but if you have one movie that is say 250 kbs, would this load at exactly the same speed as say 5 movies on the same page that are say 50kbs?

Also, should all movies on a page have a preloader, in the case of having say 5 swfs on the page?

Any help appreciated,

Jged

Help W/ Seamless Swf Loads
I'm having trouble getting swfs to load and unload into and out of a Flash Projector File.

In the first frame of the main timeline of my parent file (the projector), I set up a frame action:

var swfs = new Array();
swfs[0] = "intro.swf";
swfs[1] = "middle.swf";
swfs[2] = "end.swf";
currSwf = -1;//currently showing nothing

underneath this coding, I created a function to load the next swf into a movie clip call "targetMC (center stage, main timeline). Coding:

function loadNext()
{
currSwf++;
targetMc.loadMovie(swfs[currSwf]);
}

In the last frame of each external swf, I put this action:

_root.loadNext();
stop();

To start the whole thing off, in the second frame of the main timeline I called the loadNext() function in a frame action. Code:

loadNext();

I can't get this to even start. Can anyone spot what I might be doing wrong?

Wierd JPG Loads But Sometimes Don't
Im working on a gallery and on my way i've found this freaking issue!!! i got 3 jpg's named esc01.jpg esc02.jpg and esc03.jpg <-- these 3 jpg's loads perfectly but the ones named g101.jpg thru g109.jpg just dont load !!!! im using this code --> loadMovieNum("g109.jpg", _root.myPic);

can someone tell me whats happening ?

How Do I Know When My Jpeg Loads?
I have a statement:

loadMovie("mypicture.jpg",shape);

where shape is an empty MC on the stage.

To check when "mypicture.jpg" is loaded, I could have done the old-fashioned polling look method with two frames checking for: shape._framesloaded to look right.

But this is Flash MX, and I wanted to use

shape.onLoad = function() {
//do something here
}

The problem is, it doesn't work. When the image loads, it isn't called. (btw, a shape.onUnload will work when the loadMovie() statement is invoked)

Am I doing something wrong? Will I have to do a clumsy polling loop instead?

I See A White Box Before My Swf Loads?
I have a flash intro that shows a white box, whichis the size of the flashfile before it loads? My background is black in the flash file, and I even have a preloader scene? I am still seeing the white box?
Any suggestions?

Mike

.jpg Loads OK But .gif Is Not Visible
I have a simple movie that loads a .jpg file into a placeholder MC when a button is pushed. It works great with .jpg format files. But when I try to load the same file but converted to .gif there is nothing to see. There are no errors or anything like that.

I am using photoshop and image ready to do the conversion to .gif. I have also tried using Irfanview to do the conversion and still, I can view the .jpg version of the image, but the image.gif does not show anything.

Any help is greatly appreciated.

Multiple Loads
Ok, is it possible to load stuff more dynamically than just loading the entire movie before it plays. Can I set it to load only certain scenes or even objects or jpegs or whatever, so that it cuts down on initial load time?
Thanks

Button That Loads MC
ok heres the deal i want to have a MC load/play when i click on the button..right now i dont have a MC but i just have my button tell the scene to goto a certain frame which is fine(is guess) but the problem is i now have over 200 frames now, i think i could greatly reduce this by moving the actions to a MC and then have my button call the MC that is approprate...

heres the file, so you can maybe understand what im looking for (its under bio)

Url Always Loads In Same Window ?
Hi,

when I create a new window with the javascript window.open command in the GetUrl action in flash, no problem, everything is ok, dimensions,.. but when I use it again it will load the new url in the previous window, so I can't use new dimensions
I would like a method that uses the javascript, so I can use the features of it, but that opens a new window everytime I use it

If somebody could help me with this problem I would greatly appreciate it,

thanks,

seti

Text Loads But Cant See It.
Hello all;

I am having a slight problem. I recently made an upgrade for a site www.mgtrainer.com, I am using the textarea component in Mx 2004 with external text and CSS files. when i test each swf file locally everything loads fine, but when I test it on the web the text that should appear does not. the funny thing is, my text area component shows a scrollbar. the mx 2004 component allows a scrollbar to appear once your text surpass the intial allocated component window on the screen. So if the scrollbar appears, where is my text. Has anyone gone through this before.

Thanks.

The Way A Page Loads
does anyone know of the sequence in which a web page loads images, swf's, etc. is there anyway to control it?

Movie Never Loads...
Hi everyone!

I have a flash site, entitled "office2.fla" that has in it a button called "slideshow." When you click slideshow, a slideshow is supposed to start in the center of the screen. I think I have my actionscripting right, but nothing ever happens! help?

Loads Of Problems
Help,
I am making a movie, and when it has finished loading i put in the AS 2.0 code stop() so it stops, then i put in a button so it starts again, but the button doesn't work ! (can you give me the action code ) on the macromedia forums, they told me : play() but that doesn't work when you add it on the button, the start of the film is Layer 1 : Frame 3... PLEASE HELP !!
I would also like to know, why do you add in loads of layers, i only use one...

It Loads But It Hesitates
i made an animation and put a loader in it.When you log on to the website it loads ( i also checked if it loads the swf's size right yeah it does) but while animation is played it hesitates.But when you refresh the page the anime plays right because it is loaded from cash.I think i am having problem with my loader but i have used it many times and a problem like that never occured.So what can be the problem?

Looking For Example Of .swf That Loads Random .swf's
Guess I should explain that better. What I'm looking for is a piece of Actionscript whereas it calls up any one of say, 10 different external .swf files and loads one of them up at random. So everytime the page is loaded the .swf is different. Kind of like a rotating banner ad but not exactly the same thing.

Preloader Loads Everything But Itself
Please have a look-see at:
http://www.perryballard.com/nhh/html...rmishmash.html

This is a very large movie, so I set up a preloader. Everything works great except for the fact that the preloader screen doesn't appear until the movie is over 80 percent loaded. I thought it was a "top-down", "bottom-up" issue (which you checked when you export a movie), but I couldn't tell a difference between the two. ....

Any ideas anyone?

Thanks!

Button That Loads An SWF
I currently have an SWF created. Once this movie is done playing it has a "learn more" button. I would like this learn more button to load another SWF and play it. What can I do?

I'm using MX 2004 Professional and I searched the tutorials but didn't find anything, atleast under Professional.

Thanks a lot!

Text Loads In FF But Not IE
I am using a Flash Rich text editior for the admin section on a website that I am developing. I have a dropdown where the admin can select the file they want to edit and when they select a new sa new section is switches to it. When I do this in Firefox the content from this new section is loaded in...In Internet Explorer nothing happens at all.
Here is the code from my combo box:

Code:
on (change)
{
_root.cont2edit = this.selectedItem.data;
_root.setStatusMsg("Loading: " + _root.loadURL + "?id=" + _root.cont2edit);
_root.importHTML(_root.loadURL + "?id=" + _root.cont2edit);
}

Here is the function that it calls:

Code:
function importHTML(loadScriptURL)
{
txtTransport = new LoadVars();
txtTransport.load(loadScriptURL);
txtTransport.onLoad = function (success)
{
if (success)
{
// Place the loaded text into the editor field
_root.editingPane.label.htmlText = this.inText;

// Update the background color if present
if (this.bgColor != undefined && this.bgColor != "")
{
_root.backgroundColor = this.bgColor;
updateBGColor();
}
_root.setSafeToExit(true);
}
else
{
_root.setStatusMsg("Error: Could not load text into editor.");
}
}
}

_root.loadURL is being set in the HTML and I know it works because the initial document loads...I just can't change it when using IE.
[EDIT]I got it working...I had a question mark seperating variables in my HTML instead of an amperstand.

.swf Loads Into Other But Is Tiny
hi
i have a gallery of pictures which is a .swf and i have it loading into my main .swf at a certain point in the timeline. the problem is that in the gallery i have a load of thumbnails (30 in total) which start off-screen and you use the mouse to navigate between them. they scroll vertically, leaving the screen at the top and bottom. but when i load the movie into the main movie it seems to automatically resize the movie and make it smaller so that all the pictures fit on the screen - how can i stop it doing this and keep the movie at the size i want it to be??
help!
emma.

Mc Loads On Resize?
Below I have included the fla. The file is a zoom nav, basically what I want to know is can I have a movieClip play after a square has been clicked on and have resized? If so, how? (The idea is trying to preserve the clean menu look, but still having cool content when each section is loaded)

Can anyone give me a clue how to do this, or show me?

Any help wold be greatly appreciated.

Preloader Only Loads Once..
Hi all

I'm having a bit of a strange problem with my preloader today. I've made a preloader wich works as any other regular preloader (just a 100 frame loading animation, but with some extra's after those frames) and which is controlled by AS on the main timeline using two EventListeners attached to the loaderInfo.

(Link here, but you'd better read first )

The first one calculates the percentage and tells the preloader to gotoAndPlay that number.

The second one catches the complete event and tells the pop-up text (which I forgot to mention; it's just a MC which start playing when the frame is entered) to continue to play (bounce down again).

At the end of the pop-up text timeline, there's this code:


Code:
MovieClip(parent).pl.play();
which tells the preloader to start playing again (remember the extra frames I mentioned above). At the end of that there's this code:


Code:
MovieClip(parent).play();
which obviously makes the main timeline running again.

PROBLEM: When I upload the swf, the loader works, but when I refresh the window, it shows the full preloader, but then refuses to do anything :s

If anyone needs more code or something, let me know, and thanks for reading my way too long explanation

[CS3][AS2] SWF Loads Automatically
I have been following this tutorial:
http://www.gotoandlearn.com/player.php?id=27

and I saw that when I tested movie, the loader movie clip is always showing so I added this script to the movie clip

Code:
onClipEvent (load) {
setProperty("", _alpha, "0");
}
but now the SWF loads automatically

Here is the script from the tut

Code:
var mcl:MovieClipLoader = new MovieClipLoader();

var mclL:Object = new Object();


mclL.onLoadProgress = function(target,loaded,total) {
loader.percent.text = Math.round((loaded/total) * 100) + "%";
}

mclL.onLoadInit = function() {
loader._visible - false;
loader.percent.text = "";
}

mcl.addListener(mclL);

mcl.loadClip("uploader.swf", holder);

upbut.onRelease = function() {
loader._visible = true;
mcl.loadClip("uploader.swf", holder);
}
Please help

[CS3] XML Loads In .exe But Not In HTLM
I'm having trouble getting my XML doc to load when opening swf file in IE. I can run the exe file locally and it works fine, but when I put it on my server and try to access it thru IE it will not load the data. Is there a secuirty issue that I need to deal with?

Thanks

Xml Loads In IE, Not In Firefox.
I'm attaching the file.

It SHOULD pull a list of dealerships from an xml file.

Also, as a test, this file is also doing a "getURL" of that xml file.

Browse it in IE, everything works. Browse it in Firefox, the ad is getting hung up waiting for the xml file to get loaded.

Container Swf Loads New Swf At End
I've got a container loading in external swf's.

I'd like to have the my main.as file load the new swf into the container when the current container movie is at it's end. I'd like to do this with labels in the external swf if possible (which I think you can do with AS 3.0) , but haven't been able to figure it out. Something like:

var label:String = CurrentLabel

container.onEnterFrame=function(){
loadMovie("test1.swf", "container");
if( label = "end"){
loadMovie("test2.swf", "container");

}
}

FLV Loads But Won't Play
hello,
I am creating a video player that loads some info from an xml file, places it in a little scrolling menu thingy. When you click on each of the menu items, it is to play the flv referenced in the xml to the side. The xml appears to be coming in fine and everything looks right. The problem lies in that
a) The only video loading is the first one.
b) When the video loads, it pauses on the first frame. Everything I try has no affect on the displayed video.
The script is as follows (I apologize for the clumsyness of my code. I only have a year at this crap so far):


var my_xml = new XML();
my_xml.ignoreWhite = true;
my_xml.html = true;
my_xml.onLoad = function(success) {
if (success) {
var videos = this.firstChild.childNodes;
var number_vids:Number = videos.length;
for (var i = 0; i<number_vids; i++) {
var currVid = videos[i];
var currVidElements = currVid.childNodes;
var currVidTitle = currVid.firstChild;
var currVidImageFile = currVidTitle.nextSibling;
var currVidImageFile_str = currVidImageFile.firstChild.toString();
var currVidHead = currVidImageFile.nextSibling;
var currVidVidFile = currVidHead.nextSibling;
var currVidVidFile_str = currVidVidFile.firstChild.toString();
var currVidLength = currVidVidFile.nextSibling;
var currVidLink = currVidLength.nextSibling;
var currVidLink_str = currVidLink.firstChild.toString();
var the_video = _root.vid_menu.vidClips.attachMovie("vidclip_maste r", "vidclip_"+i, 10+i, {_x:0, _y:90*i});
the_video.onRelease = function() {
var connection_nc:NetConnection = new NetConnection();
connection_nc.connect(null);
var stream_ns:NetStream = new NetStream(connection_nc);
stream_ns.setBufferTime(1);
thevideo.attachVideo(stream_ns);
stream_ns.play(currVidVidFile_str);
stream_ns.onStatus = function(infoObject:Object) {
trace("infoObject: "+infoObject.code);
if (infoObject.code == "NetStream.Play.Start") {
}
if (infoObject.code == "NetStream.Play.Stop") {
}
};
trace(currVidVidFile_str+" VIDEO:"+i);
};
B_lank.onRelease = function() {
getURL(currVidLink_str, "_blank");
};
the_video.highlighter.onEnterFrame = function() {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this._alpha = 100;
} else {
this._alpha = 0;
}
};
the_video.image_holder.loadMovie(currVidImageFile_ str);
the_video.Clip_number.htmlText = currVidTitle.firstChild;
the_video.Title.htmlText = currVidHead.firstChild;
thevideo.Duration.html = true;
the_video.Duration.htmlText = currVidLength.firstChild.nodeValue;
}
}
};
_root.vid_menu.scroller.up_but.onRelease = function() {
clearInterval(moving_dn);
};
_root.vid_menu.scroller.dn_but.onRelease = function() {
clearInterval(moving_up);
};
_root.vid_menu.scroller.up_but.onDragOut = function() {
clearInterval(moving_dn);
};
_root.vid_menu.scroller.dn_but.onDragOut = function() {
clearInterval(moving_up);
};
_root.vid_menu.scroller.up_but.onReleaseOutside = function() {
clearInterval(moving_dn);
};
_root.vid_menu.scroller.dn_but.onReleaseOutside = function() {
clearInterval(moving_up);
};
_root.vid_menu.scroller.up_but.onPress = function() {
clearInterval(moving_up);
moving_dn = setInterval(move_em_dn, 10);
};
_root.vid_menu.scroller.dn_but.onPress = function() {
clearInterval(moving_dn);
moving_up = setInterval(move_em_up, 10);
};
function move_em_up() {
if (vid_menu.vidClips._y>=(-1*(vid_menu.vidClips._height-150))) {
_root.vid_menu.vidClips._y -= 1;
}
}
function move_em_dn() {
if (vid_menu.vidClips._y<=10) {
_root.vid_menu.vidClips._y += 1;
}
}
my_xml.load("videos_r2.xml");

Thank you for any help anyone can provide!

_warren

Same Swf; Sometimes Loads Other Times Not
http://www.ventanaman.com

Just finished this one and sometimes, taking a section link, such as 'bathrooms' within the portfolio section, the full file doesn't load. Other times, it does. Or, it loads all the graphics but doesn't respond to user clicks.

All files are saved as Flash 8, access network only, security code line for its own domain: System.security.allowDomain("http://www.ventanaman.com");

But I can't see why the loading is so bizaar. The preloaders publishing settings are exactly the same as the sections.

Preloaded Swf Loads Twice
Hi,
I'm a pretty unexperienced flash user . I want to create a ProgressBar for a slide presentation (done with the template of Flash 8). I used a Progress Bar sample designed by Joshua Hirsch that I customized. In the sample the progress bar refers to a labeled frame in the timeline. The first problem is that a slide presentation template cannot be imported as a Movie Clip (it just displays all images together). So I inserted the swf into a Loader component. But then the progress bar was referring to the size of the component and not to its content. So I imported the swf as a Movie Clip that is not displayed to give the progress bar a good frame size on the frame it was referring. I know it's a strange trick.
Now the Progress Bar do work but I think that the slide presentation is loading again after (look here), which is really annoying. I guess I have to change the action script of Joshua Hirsch but I have no clue how:

class Preloader extends MovieClip{

private var target_mc:MovieClip;
private var progress_mc:MovieClip;
private var pct_str:String;

private var dispatchEvent:Function;
public var addEventListener:Function;
public var removeEventListener:Function;

function Preloader(){
// initialize with EventDispatcher so the preloader can broadcast events
mx.events.EventDispatcher.initialize(this);
}

public function startPreload(t:MovieClip){
// set a reference to the timeline that is loading
target_mc = t;

// reveal the preloader clip
this.gotoAndPlay("IN");
}

private function onAnimateIn(){
this.stop();

// this is called from the preloader mc timeline on the last frame of the 'in' animation
// starts checking the load progress of the target movie clip on each frame
this.onEnterFrame = this.checkLoadProgress;
}

private function checkLoadProgress(){
// get the total bytes and the loaded bytes of the target clip
var bl = target_mc.getBytesLoaded();
var bt = target_mc.getBytesTotal();

// calculate the percentage of bytes loaded
var pct = bl/bt;

// get the current frame and total frames of the progress clip
var cf = progress_mc._currentframe;
var tf = progress_mc._totalframes;

// calculate the frame that corresponds with the load percentage
var f = Math.ceil(tf * pct);

// if the current frame of the progress mc is less than the value of f then let the clip play
// otherwise, stop the progress clip to wait for f to catch up with the current frame
// this prevents the animation from jumping ahead if the target clip is loading faster than
// your progress animation
if(f > cf){
progress_mc.play();
}else{
progress_mc.stop();
}

// set percent display in preloader_mc based on percentage of frames that have played
this.pct_str = (Math.round(cf/tf * 100)).toString();

// if the clip is entirely loaded, and the progress clip has played all the way through
// then the preloading is complete
if(bt > 20 && bl == bt && cf == tf && progress_mc){
onPreloadComplete();
}
}

private function onPreloadComplete(){
// stop the check load call
this.onEnterFrame = null;

// animate the preloader
this.gotoAndPlay("OUT");
}


private function onAnimateOut(){
this.stop();

// dispatch event that tells any listeners that the preloader is done
dispatchEvent({target:this, type:'onPreloaderOut'});
}
}
Thanks to everybody wo can help

Multiple Loads
I am trying to create something similar to the image loading on http://www.praystation.com

For example, 5 images load, each with a preloader, and I assume each image is a jpg. I am creating a site that needs this functionality. I know how to change the alpha of each image according to what number is rolled over, but I don't know how to dynamically load the jpegs one after the other and have the loader bar and text correlate to each image. Any psuedo code, or helpful instructions are greatly appreciated.

thanks
-Sean

XML Loads But Don't Shows...
Hi guys,

I'm on a game clan (GRAW2), I'm trying to make a kind of "Games Stats" with the xml generated by the game self but can't. I'm using AS2. I'm sure it loads the xml file but don't show the information.

But when I take away all the next line it shows


Code:
<match_statistics version="1.0" 01_05_2008 00:42>
<match map="tdm_arroyo" gametype="Recon Vs Assault" rounds="2" winner="Bravo" score_team_a="0" score_team_b="2">

Replaced by

<match_statistics>
The solution should be to ignore this line but I don't know the way to do this.

This is the code i'm using on Flash, AS2:


Code:
var xmlObj:XML = new XML();
xmlObj.ignoreWhite = true;
xmlObj.load("xml/match_info.xml");
xmlObj.onLoad = function(success) {
var rootNode:XMLNode = xmlObj.firstChild;
if (success) {
trace(this);
}
/* Crear variables Nodes +3*/
var extraNode0:XMLNode = rootNode.firstChild.firstChild;
var extraNode1:XMLNode = rootNode.firstChild.firstChild.nextSibling;
var extraNode2:XMLNode = rootNode.firstChild.firstChild.nextSibling.nextSibling;
var extraNode3:XMLNode = rootNode.firstChild.firstChild.nextSibling.nextSibling.nextSibling;
var extraNode4:XMLNode = rootNode.firstChild.firstChild.nextSibling.nextSibling.nextSibling.nextSibling;
/* --------------------- */
for (i=0; i<=4; i++) {
pName0 = extraNode0.attributes.name;
pKill0 = extraNode0.firstChild.attributes.total_kills;
pDeath0 = extraNode0.firstChild.attributes.deaths;
pSuicide0 = extraNode0.firstChild.attributes.suicides;
pFired0 = extraNode0.firstChild.nextSibling.attributes.bullets_fired;
pAccur0 = extraNode0.firstChild.nextSibling.attributes.accuracy;
///////////////////////////////////
pName1 = extraNode1.attributes.name;
pKill1 = extraNode1.firstChild.attributes.total_kills;
pDeath1 = extraNode1.firstChild.attributes.deaths;
pSuicide1 = extraNode1.firstChild.attributes.suicides;
pFired1 = extraNode1.firstChild.nextSibling.attributes.bullets_fired;
pAccur1 = extraNode1.firstChild.nextSibling.attributes.accuracy;
///////////////////////////////////
pName2 = extraNode2.attributes.name;
pKill2 = extraNode2.firstChild.attributes.total_kills;
pDeath2 = extraNode2.firstChild.attributes.deaths;
pSuicide2 = extraNode2.firstChild.attributes.suicides;
pFired2 = extraNode2.firstChild.nextSibling.attributes.bullets_fired;
pAccur2 = extraNode2.firstChild.nextSibling.attributes.accuracy;
///////////////////////////////////
pName3 = extraNode3.attributes.name;
pKill3 = extraNode3.firstChild.attributes.total_kills;
pDeath3 = extraNode3.firstChild.attributes.deaths;
pSuicide3 = extraNode3.firstChild.attributes.suicides;
pFired3 = extraNode3.firstChild.nextSibling.attributes.bullets_fired;
pAccur3 = extraNode3.firstChild.nextSibling.attributes.accuracy;
///////////////////////////////////
pName4 = extraNode4.attributes.name;
pKill4 = extraNode4.firstChild.attributes.total_kills;
pDeath4 = extraNode4.firstChild.attributes.deaths;
pSuicide4 = extraNode4.firstChild.attributes.suicides;
pFired4 = extraNode4.firstChild.nextSibling.attributes.bullets_fired;
pAccur4 = extraNode4.firstChild.nextSibling.attributes.accuracy;
}
///////////////////////////////////
};

This is the kind of XML generated by the game:


Code:
<match_statistics version="1.0" 01_05_2008 00:42>
<match map="tdm_arroyo" gametype="Recon Vs Assault" rounds="2" winner="Bravo" score_team_a="0" score_team_b="2">
<players>
<player name="Gamekos">
<summary rank="1" total_kills="14" assisted_kills="2" instant_kills="0" deaths="12" suicides="0" scores="0" tags="0"/>
<weapon name="crye" bullets_fired="353" grenades_thrown="0" enemies_killed="14" teamates_hit="0" teammates_killed="0" accuracy="16" far_kill_range="66" short_kill_range="6" avg_kill_range="24"/>
<weapon name="m61" bullets_fired="0" grenades_thrown="2" enemies_killed="0" teamates_hit="0" teammates_killed="0" accuracy="0" far_kill_range="0" short_kill_range="0" avg_kill_range="0"/>
</player>
<player name="[HI]ARCAN">
<summary rank="1" total_kills="32" assisted_kills="1" instant_kills="1" deaths="19" suicides="0" scores="0" tags="0"/>
<weapon name="crye" bullets_fired="580" grenades_thrown="0" enemies_killed="31" teamates_hit="0" teammates_killed="0" accuracy="15" far_kill_range="76" short_kill_range="4" avg_kill_range="31"/>
<weapon name="m61" bullets_fired="0" grenades_thrown="16" enemies_killed="1" teamates_hit="0" teammates_killed="0" accuracy="6" far_kill_range="44" short_kill_range="44" avg_kill_range="44"/>
</player>
<player name="bohy010">
<summary rank="1" total_kills="6" assisted_kills="1" instant_kills="1" deaths="12" suicides="0" scores="0" tags="0"/>
<weapon name="rx4" bullets_fired="49" grenades_thrown="0" enemies_killed="6" teamates_hit="0" teammates_killed="0" accuracy="36" far_kill_range="96" short_kill_range="18" avg_kill_range="40"/>
</player>
<player name="AIKI70">
<summary rank="1" total_kills="10" assisted_kills="0" instant_kills="0" deaths="7" suicides="0" scores="0" tags="0"/>
<weapon name="crye" bullets_fired="195" grenades_thrown="0" enemies_killed="9" teamates_hit="0" teammates_killed="0" accuracy="17" far_kill_range="53" short_kill_range="1" avg_kill_range="18"/>
<weapon name="m416" bullets_fired="10" grenades_thrown="0" enemies_killed="1" teamates_hit="0" teammates_killed="0" accuracy="10" far_kill_range="13" short_kill_range="13" avg_kill_range="13"/>
</player>
<player name="kipkorn">
<summary rank="1" total_kills="10" assisted_kills="0" instant_kills="0" deaths="7" suicides="0" scores="0" tags="0"/>
<weapon name="crye" bullets_fired="88" grenades_thrown="0" enemies_killed="5" teamates_hit="1" teammates_killed="0" accuracy="15" far_kill_range="60" short_kill_range="8" avg_kill_range="32"/>
<weapon name="g36" bullets_fired="41" grenades_thrown="0" enemies_killed="3" teamates_hit="0" teammates_killed="0" accuracy="9" far_kill_range="43" short_kill_range="8" avg_kill_range="22"/>
<weapon name="g36_compact" bullets_fired="30" grenades_thrown="0" enemies_killed="0" teamates_hit="0" teammates_killed="0" accuracy="0" far_kill_range="0" short_kill_range="0" avg_kill_range="0"/>
<weapon name="grenade_launcher" bullets_fired="2" grenades_thrown="0" enemies_killed="2" teamates_hit="0" teammates_killed="0" accuracy="100" far_kill_range="27" short_kill_range="25" avg_kill_range="26"/>
<weapon name="m61" bullets_fired="0" grenades_thrown="2" enemies_killed="0" teamates_hit="0" teammates_killed="0" accuracy="0" far_kill_range="0" short_kill_range="0" avg_kill_range="0"/>
<weapon name="m8_compact" bullets_fired="2" grenades_thrown="0" enemies_killed="0" teamates_hit="0" teammates_killed="0" accuracy="0" far_kill_range="0" short_kill_range="0" avg_kill_range="0"/>
<weapon name="rx4" bullets_fired="7" grenades_thrown="0" enemies_killed="0" teamates_hit="0" teammates_killed="0" accuracy="0" far_kill_range="0" short_kill_range="0" avg_kill_range="0"/>
<weapon name="saw" bullets_fired="10" grenades_thrown="0" enemies_killed="0" teamates_hit="0" teammates_killed="0" accuracy="0" far_kill_range="0" short_kill_range="0" avg_kill_range="0"/>
</player>
<player name="joliver">
<summary rank="1" total_kills="0" assisted_kills="1" instant_kills="0" deaths="7" suicides="0" scores="0" tags="0"/>
<weapon name="crye" bullets_fired="38" grenades_thrown="0" enemies_killed="0" teamates_hit="1" teammates_killed="0" accuracy="5" far_kill_range="0" short_kill_range="0" avg_kill_range="0"/>
<weapon name="m61" bullets_fired="0" grenades_thrown="2" enemies_killed="0" teamates_hit="0" teammates_killed="0" accuracy="0" far_kill_range="0" short_kill_range="0" avg_kill_range="0"/>
</player>
</players>
</match_statistics>

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