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




Loadmovie Woes



I have a problem getting a loaded movie to load another movie. My guess is it is a pathing issue...

Let's say I have three mc's, mc1 is the root which loads in mc2, mc2 then loads in mc3. Both mc2 and mc3 are in the same directory, but mc1 (the root clip) is up one directory.
My question is this, if mc1 (the root) is located in a directory one level above and loads in mc2, then when mc2 calls it's load function does it have to adjust the pathing even though originally they were in the same directory on the server?

My thought is that when mc2 is loaded into the top level swf, the path to mc3 changes accordingly. Just a theory that I'm going to try tonight but was curious if anyone knew offhand.

thanks!



ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)
Posted on: 06-14-2004, 08:47 AM


View Complete Forum Thread with Replies

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

LoadMovie Woes
Ok i am building an entire site in flash and to be bandwith friendly i want to load in images as they are needed on various pages instead of all at the beginning. I know i need to make the images SWFs and load them into a level above the main site. What i don't know is a) how to make a loader that will display while a particular SWF is loading and b) why on slower connections it seems that a loaded swf just never appears at all...

If someone could help me with either of these two questions I would be greatly obliged. Thanks!


Dave

LoadMovie Woes
hi

i have a main swf

mfc.swf

which has a menu

who we are
what we do
where we are

on frame one of mfc.swf it

load movie("WHOWEARE.swf",2);

...

frame one of whoweare.swf is stopframe to blank, frame 2 is the graphics.
....


when the where we are button is clicked in the menu, it

on (press){
_level2.gotoAndStop(2);
}

....

no movie is showing at all.

nothing nada. zip

any ideas what i am doing wrong?

thanks

LoadMovie Woes
-Sorry for the Duplicate post, wasnt sure what forum would be best-

I am building a site for a friend. I have a movie that will look something like this



It is for an artist's website so each section will be rich in content. I have been learning about loading external movies and thought this would be perfect. I could split the full site into smaller portions. Not only would it be easier to change on the fly (I would just have to update images on the smaller movies) but it would be more organized and much easier to manage.

I though I could load all movies (Part1, Part2, etc) into the MAIN movie (into separate movie clips) at the beginning and then display/use them as needed. But it appears you can only load into a movie clip that is currently on the stage at that momement.

I want to avoid loading each menu as needed. Since this site is for an artist there will be a lot of images. I would like to be preloading them as the viewer as looking at other things. I know this is what flash would do if it was all one movie (Streaming the data until fully loaded) but can it not do this with external movies as well?

So basically I need to know:
1.) Am I overestimating the ability of loadMovie.
2.) If not, how do I go about doing this
3.) If so, what would be the best way to do a project like this. I have read a lot about working with flash, but there doesnt seem to be much on the way to set up a large complicated move.

Any help or suggestions would be appreciated.

Thanks Jeff

LoadMovie Woes
Hey guys,

I have an empty movie clip with an instance name of box_mc.

I'm trying to load an external movie clip into it when the user presses a button. The movie clip is a pairs card game with a fair amount of interactivity.

The swf loads fine, but all you can't do anything with it- the buttons aren't working and it's just 'frozen'.

Anyone got any ideas why this could be?

Thanks!

LoadMovie Woes
Hi, i am loading a picture into a movieclip called container and I want the picture to stay the same size as the container!

is this possible?



Regards,

Martin

Gaming Help And Info:
http://gaming.webrevolt.biz

LoadMovie And _parent Woes Help
This is part of a preloader, but Im having trouble getting it to load the movie

Code:
loadThis = _parent._parent._parent.content;
_parent._parent.holder.loadMovie((loadThis)+".swf"));
_parent.loadBar._height = 0;
I get this from the debugger:

Quote:




Symbol=Preloader Code, Layer=Layer 1, Frame=1: Line 2: ';' expected
_parent._parent.holder.loadMovie((loadThis)+".swf" ));




So I try this:

Code:
loadThis = _parent._parent._parent.content;
loadMovie((loadThis)+".swf"), _parent._parent.holder);
_parent.loadBar._height = 0;
and I get this from the debugger:

Quote:




Symbol=Preloader Code, Layer=Layer 1, Frame=1: Line 2: Wrong number of parameters; loadMovie requires between 2 and 3.
loadMovie((loadThis)+".swf"), _parent._parent.holder);




Can you tell me whats wrong with my syntax?
I know this method is possible because this works:

Code:
f = 1;
_root.Holder.loadMovie((f)+".swf");
stop ();
Please, please help!
John Ziebro
Liquid Genius

Oh Help Me Wise Ones LoadMovie Woes Flash MX
k, here's the deal:
I have a main movie/template. Page loads nicely, in the middle little quick flash presentation, nothing fancy. flash presentation plays in the main movie area where external swf's are going to be loaded on top of. one of the animations goes outside the rectangle (intentional) where movies will be loaded to.
buttons on the bottom. click on the button, external swf's pop up nicely where it should.

Problem #1: let's say someone wants to click on one of the buttons before the mini flash presentation (on the main page) ends.
issue: remember that little animation that goes outside the boundaries in the initial mini flash presentation on the main page? well it looks ridiculous when you load a new movie on top and this little thing pops out.
solution: i need to be able to have the main page go to a static image or to the end of the movie or a certain frame right before it loads external movies.

Problem #2: everytime I click on one of the buttons on the bottom to load a new page, a flash of the initial main page shows. it's like the movie unloads completely but a milisecond you see the initial main page before the new movie pops up.
solution: i just one each external .swf when clicked to replace the other .swf seamlessly without seeing a flash of the level 0 area.

here is the code i am using on the buttons:


on (release) {
_root.createEmptyMovieClip("area", 1);
loadMovie("festival.swf", "area");
setProperty("area", _x, 5.5);
setProperty("area", _y, 102.0);
}


any help would be so appreciated.

thanks
Jhernelyn
jjparinas@hotmail.com

LoadMovie Woes... Not A Noobie.. Doing Everything "right"
This is so frustrating. I've tried the following code:_root.master.bg.loadMovie("bg.jpg");
loadMovie("bg.jpg",_root.master.bg);
loadMovie("bg.jpg",master.bg);

and created a blank MC and tried dumpin it there
no such luck. It's not a file-path error, and I can load other people's examples of loadmovie and theirs works fine. What the heck?

Using Flash MX...

Anyone have some light to shed?

-jm

More Woes
I have a button inside of a movieclip. My main movie has two scenes. When this button is clicked it should forward to the next scene, but it doesn't...

Code on button:

on (release) {
gotoAndPlay("Scene 2", 1);
}

<img> Tag Woes
i'm having big problems with the <img> tag in an html text field.
i want one photo to be in the corner, and then the text to flow around it. this should be easily possible.

if i use the <img> tag with a jpeg, the image doesn't load straight away, which is understandable. but when it does load, it appears behind the text - the text is not flowing around it. and then inexplicably if i click the textfield or the picture, after half a second or so it rearranges and flows around the picture, how i want it. but this is no good - i can't have it wrong and then suddenly right, it looks terrible.

then i thought, maybe it's something to do with loading remotely, so i'll try using a movieclip - using the linkage feature. when i do this, it works straight away - or sort of. something appears straight away, and the text is where it should be, flowing around the right size box, but the image that appeared is actually only the first 20 or so rows of pixels of the image.

what's going on?

the reason i don't just hard code the text and picture in is that the text must be dynamic - updateable by my client. the picture will remain but i can't flow dynamic text around a picture any other way. or if there is a way i'd love to know it.

thanks a lot

AS Woes.
Okay, here is another problem that I've come upon. This isn't so much a problem as a nuisance. Now what I've got set up is so that the BG of the site is randomly chosen. However, the way it is currently set up, the BG just shows up. I tried adding the first 'while' loop so that it would randomly change BG's before settling on one color.

The problem is that it doesn't rotate, it just modifies the variable l to 10000 and then starts the second 'while' loop. This happens in under 10 seconds. I just want it to rotate between colors that I can see.


Code:
onClipEvent (load) {
//setInterval(tinter, 1000)
//function tinter(){
l=0
while (l <10000) {
blue = random(150);
red = random(150);
green = random(150);
var transformObject:Object = new Object();
//Attach your random values
transformObject.rb = red;
transformObject.gb = green;
transformObject.bb = blue;
//Now we need a color object attached to "this"
var myColor:Color = new Color(this);
//Finally, attach the transform object to the color object
myColor.setTransform(transformObject);
l++
trace(l)
}
mynumber = random(20);
i = 0;
while (i != mynumber) {
i = random(100);
blue = random(150);
red = random(150);
green = random(150);
trace(mynumber+" "+i);
//trace(red+","+green+","+blue);
//Create a transform object
var transformObject:Object = new Object();
//Attach your random values
transformObject.rb = red;
transformObject.gb = green;
transformObject.bb = blue;
//Now we need a color object attached to "this"
var myColor:Color = new Color(this);
//Finally, attach the transform object to the color object
myColor.setTransform(transformObject);
}
}
Now I'm going to try and add new lines of code that start onClipEvent (enterFrame) for the first loop, but we'll see.

Any suggestions?

Thanks,
DaVuLf

Pop Up Woes
Hi. Im kinda got pushed into falsh really quickly. I have a webssite with small images. I created a click to enlarge button so people can see my artwork bigger. i use a beginner script to do it.

on (release) {
getURL("file:///C:/Documents%20and%20Settings/HP_Administrator/My%20Documents/jontest/XLImages/driver1finalXL.html","_blank");

}

For some reason the pop up only works when i view it on my home computer but it will not work on the internet at all. Could anyone tell me why? By the way my site is
www.jellisart.net

Maybe it will help to see what im talkin about.

[F8] XML Woes
Hey,

I'm having some problems and i don't know how to fix them. I'm relativley new to flash.

Here is my actionscript:


Code:
//create a new xml object
urlXML = new XML();
//when the xml data has loaded, we want the XML Object to run the convertXML function
urlXML.onLoad = convertXML;
//Write to your text area that the data is loading.
content_feed_display = "Loading data...";
//now load up the url.
urlXML.load("song.xml");

function convertXML() {
if(this.loaded) {
content_feed_display = "Data loaded.";
}
mainTag = new XML;
elementTag = new XML;
articleList = new Array;
elementList = new Array;
mainTag = this.firstChild.nextSibling;
if(mainTag.nodeName.toLowerCase() == "moreovernews") {
articleList = mainTag.childNodes;
content_feed_display = "";
for(i=0;i<=articleList.length;i++){
//initialize a couple of variables to hold xml data we want displayed
document_url = "";
headline_text = "";
if(articleList[i].nodeName.toLowerCase() == "article") {
//we get the child node array beneath the articles, aka the meat and potatoes we are after
elementList = articleList[i].childNodes;
//and loop through that looking for the data we need
for(j=0;j<=elementList.length;j++) {
elementTag = elementList[j];
elementType = elementTag.nodeName.toLowerCase();
if(elementType == "headline_text"){
headline_text = elementTag.firstChild.nodeValue;
} else {
if(elementType == "url"){
url = elementTag.firstChild.nodeValue;
}
}
}
content_feed_display += "<p><font size="+2"><a href="" + url + "" target="_new">"+ headline_text +"</a></font></p>";
}
}
}
}
I'm getting this error when i test the movie:


Quote:




WARNING: This movie uses features that are not supported in the Flash 5 player
Scene=Scene 1, layer=Layer 2, frame=1:Flash MX Text Field Instance Name




What do i need to change, get rid of, or do differently?

Thanks!

FLV Woes...
Hi,
I have this program I have been asked to "update". They had the videos for it redone about a year ago (the company who did the vids is no longer around) the FLVs they have are compressed for flash player 8 or higher... here is the issue... the program they need to go into has to be published as 7 for they older code to work with the older LMS/script.

So the flv's will not play when published as 7. Is there anything I can do to the flvs to re-compress them with the player 7 compatible codec????

I only have access to the flvs and not to the original whatever they were filmed in files.

Any suggestions at this point would be helpful.

Thank you!

Ie6 Woes
Hi All,

I have a question for anyone using IE6. I recently completed this site. It works fine on all the browsers that I have tested it on.

Someone has recently gone onto the site and has said that when they click on the "enter" button the get a page can not be found error message.

I have tested it on my browser - IE5.2, and it works perfectly, so I am wondering if it something to do with the conflicts that were predicted with flash and IE6?

Would any of you with IE6 possibly test it for me and see if that is the reason for this user getting the message please?

If it is caused by IE6 does anyone know how I can put it right please?
Be grateful for any suggestions, pointers and help in putting this error message right.

Hope someone can help.
D

XML Woes
I have an SWF that loads an XML file. It works fine on my computer but it won't work on the server. The XML and SWF are in the same directory. It works fine in Internet Explorer, not in mozilla and not on Mac via Safari. The problem is even there when I access the SWF direct blahblah.com/xmltest.swf(no html embed/object)

Tried a few different servers, windows 2003 and fedora (linux). Any guesses

XML Woes?
I am having a ****ens of a time trying to find out how many items I have in each of my libraries. I can get the count of childNodes in the furniture which is 4, I can drill down and get the names of the libraries, Tables, Chairs, Sofas and Hutches. But I can't figure out how to get the count of the items in the libraries.

What I want to have happen is when I click on the library value in the combo box the out put window would say for Table: 2 items, end_table and rd_table... etc... for each item clicked in the combo box.

But I can't figure it out.

Please help.

Here is the XML:

Code:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<furniture>
<tables name="Tables">
<item title="End Table">end_table</item>
<item title="Round Table">rd_table</item>
</tables>
<chairs name="Chairs">
<item title="Recliner">chair</item>
</chairs>
<sofas name="Sofas">
<item title="Leather Sofa">sofa</item>
</sofas>
<hutches name="Hutches">
<item title="Double Hutch">hutch</item>
</hutches>
</furniture>
Here is the flash code

Code:
var myXML:XML = new XML();
myXML.ignoreWhite = true;
libraryList_ar = new Array();
libraryItems_ar = new Array();
//combo_list.dataProvider= ["Library", "Tables", "Chairs", "Sofas", "Hutches"];
combo_list.dataProvider = libraryList_ar;
myXML.onLoad = function(success) {
if (success) {
//trace(this);
//
var libraries = this.firstChild;
var libCount = libraries.childNodes.length;
trace(libCount);
var libItems = libraries.childNodes.childNodes.length;
trace(libItems);
for (var i = 0; i<libCount; i++) {
//libraryList_ar[i] = libraries.childNodes[i].childNodes[0].firstChild.nodeValue;
libraryList_ar[i] = libraries.childNodes[i].attributes.name;
}
}
};
myXML.load("myXML.xml");
//
combo_list.change = function(eventObj) {
//trace("Value changed to "+eventObj.target.value);
};
combo_list.addEventListener("change", combo_list);

Xml Woes
for some reason, i can't seem to get the node values i need from this simple xml.. it's mindboggling! I'm sure i'm overlooking something b/c i've been screwing around with this too long.

I originally started doing it the way i usually do by creating vars to store nodes and referencing the vars to call child nodes. that seemed to give me an array structure at that point and I could no longer reference any nodeValues.

what i have should work though, but i'm getting null and undefined.

here's code:

Code:
getIPLocation=function(ip){
retXML=new XML();
retXML.ignoreWhite=true;
retXML.onLoad=function(){

trace("XML: "+this);
trace("status: "+this.status);


info=this.firstChild.firstChild.nextSibling.nextSibling.nextSibling.firstChild;
trace("info: "+info);
_global.userLoc=new Object();
userLoc.cityState= info.firstChild.firstChild.nodeValue;
userLoc.countryName= info.firstChild.firstChild.nextSibling.nodeValue;
userLoc.countryAbbrv=info.firstChild.firstChild.nextSibling.nextSibling.nodeValue;
var Coords:String= info.firstChild.firstChild.nextSibling.nextSibling.nextSibling.firstChild.firstChild.nodeValue;
trace("coords string: "+Coords);
trace("city/state: "+userLoc.cityState);
trace("country name: "+userLoc.countryName);
trace("country abbrev: "+userLoc.countryAbbrev);
trace("location coords: "+userLoc.latLong);


};


retXML.load("http://api.hostip.info/?ip="+ip);
here's the xml:

Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<HostipLookupResultSet version="1.0.0" xmlns="http://www.hostip.info/api" xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.hostip.info/api/hostip-1.0.0.xsd">
<gml:description>This is the Hostip Lookup Service</gml:description>
<gml:name>hostip</gml:name>
<gml:boundedBy>
<gml:Null>inapplicable</gml:Null>
</gml:boundedBy>
<gml:featureMember>
<Hostip>
<gml:name>Grandville, MI</gml:name>
<countryName>UNITED STATES</countryName>
<countryAbbrev>US</countryAbbrev>
<!-- Co-ordinates are available as lng,lat -->
<ipLocation>
<gml:PointProperty>
<gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
<gml:coordinates>-85.7561,42.9038</gml:coordinates>
</gml:Point>
</gml:PointProperty>
</ipLocation>
</Hostip>
</gml:featureMember>
</HostipLookupResultSet>
I should definitely mention that this works:

Code:
userLoc.cityState=info.firstChild.firstChild.nodeValue;
while the others do not!

ActionScript Woes With NS
Hi! I'm pretty much a "newbie" at action script, and I think I've made pretty good progress so far.

HOWEVER ... I've got something that should be VERY simple that's giving me BIG troubles.

I've made a drag-n-drop interaction that will be used as a review question of sorts. Anyway, it works BEAUTIFULLY in IE, but in Netscape, all of my targets that SHOULD have an alpha setting of zero at the beginning are showing up as 100% in NS. You can drag the draggable items, but the correct targets aren't recognized as correct.

After reading through some of the posts, I've come to the conclusion that it's a pathing issue, and that Netscape requires absolute pathing. The script that currently works in IE (for one of the draggables) is shown below. I've tried replacing the slashes with "_root.", but that hasn't worked, either. Any suggestions?

on (press) {
startDrag (decision_out, true);
}
on (release) {
stopDrag ();
if (_droptarget eq "/decision_in") {
setProperty ("/decision_in", _alpha, "100");
setProperty ("/decision_out", _visible, false);
tellTarget ("/decision_in")
gotoAndPlay ("in");
setProperty ("/notcorrect", _alpha, "0");
setProperty ("/correct", _alpha, "100");
} else {
setProperty ("/notcorrect", _alpha, "100");
setProperty ("/correct", _alpha, "0");
}
}
[Edited by heidster on 06-25-2001 at 08:53 AM]

Preloader Woes.
Hello.

I have made a movie which will be loading in level 0.

But I have not made any room at the start of this movie for a preloader to check if all the frames/bytes are loaded.

I now need a preloader to display a loading message while the rest of the 100K movie loads.

I was thinking of a separate movie on level 1 which would hide the level 0 movie and display 'loading etc' while it checks if the movie on level 1 has loaded or not.

Does anyone have any suggestions, bits of script etc so that I can continue with this project.

I have tried a few things already and haven't managed to accomplish what I wanted.

Cheers.
References to any movies within flashkit would be good.

Gav

Alpha Woes
Hey guys... I've been using Flash 4 to design a site
http://dru-hill.cjb.net/
but I found it inadequate to my needs (ie I couldn't make custom cursors etc) so I thought... hmmm I'll use Flash 5.

Anyway, I need to know how to vary alpha settings of instances via a button (check my site http://www.eggman56.f2s.com/druhill/druhill.swf and u'll see a button that sez 'lighten' and below it 'reset'... this was done in flash 4 but I am gonna use 5 to finish the site) lighten drops the alpha to 50 so the text is more viewable... reset resets it... i want to know how to change the alpha in increments of say, 10 (ie sort of like the text.scroll - 10 command)... please help... can it be done or am I just jerking off?

Button Woes (something New... I Think)
This should be fairly simple, but the solution is eluding me. I have a button, with a mc on the over frame. When you click the button, it shrinks and spirals away, but if you mouseover it as it does so, the mc will still play (obviously). My question is-- how do i get it so after you hit the button, the mouseover part is disabled? i would put up the .fla, but i dont have a server, so if you dont understand, i can email it to you.

btw-- ericlin if you read this, i have a question on your fading script.

thanks!

HitTest Woes..
PreStuff:

I have four Walls named "Wall1" through "Wall4", on a frame w/ a stop action. _root.NoWalls = 4; is also on this frame.



The PROBLEM:

I Have an MC named "Zakarus", he has an action that says if i hit the "UP" key, to gotoAndStop on "Zakarus"'s frame 2. On frame 2 of "Zakarus" I have another MC named "ZakarusUp". On the first frame(named "run_up") of "ZakarusUp" I have this:

for (I=1; I > _root.NoWalls; I++) {
if (not (ZakarusUp.hitTest("/Wall"+I))) {
_root.Counter += 1;
if (_root.Counter == _root.NoWalls) {
setProperty ("/Zakarus", _y, getProperty("/Zakarus", _y)-8);
}
}
}

On each of the other 5 frames of "ZakarusUp" i have

call("run_up");

To me this looks all good and dandy.. BUT, always a but, it plays all the frames and does as it is told, except for the fact that is doesnt move up 48 pixels, in fact it doesn't move up at all, just lays dormant showing the animation.

I thank you in advance and if i missed something key in explaining what I have just tell me and i will post up what it is. PLEASE i really need your Flash O' powerful knowledge on this one..

LoadVariables() Woes
Hi, I'm having troubles with loadVariables() - no matter what I do, it's not sending any variables, and refuses to POST, always performs a GET. Anybody else had this problem, or know how to get around it?

Caching Woes
Hi, I am having problems with IE caching my swf's. This causes a lot of problems eg leaving changed values unchanged.
Is there a way to stop them being cached?
I have read about the meta tags..but also the fact they do not always work.
I once read that you can generate a random name for the swf when it is in the cache so that it is not called again..but cannot remember how to do this.
Does anyone have any ideas?
Thanks

Loadvariable Woes
I am having trouble loading variables from a text file for use in my action scripting. I've read every post and tried a lot of different stuff with the same affect. Here is the code I've been working on

button = new Array();
var frametoshow = 0;
myDate = new Date();
addon = myDate.getTime();
_root.loadVariables ("siteadmin.dat?" + addon, "");
frametoshow = button.length + 1;
stop ();

If I use dynamic text areas to display the values of the array and the frametoshow variable the frametoshow shows up first everytime and then very quickly thereafter the values of the array fill into the fields. Im suspicious that I need to verify the load prior to checking the array length, but I can't seem to figure this out.

Any help would be greatly appreciated.

Button Woes....
hi all,

i have a simple mc that plays on the overstate of a button...but when i ctrl>enter...the mouseover event happens straight away...??? its not happeneing when 'mouseover'...why is this so??

thanks guys

ClearInterval Woes
When I select an item in a listbox the function
showDetails is invoked,(via Flash Remoting but I
don't think that's relevant).

showDetails provides data for several text fields which I want to show on the screen sequentially by making them visible after varying times. I use setInterval to achieve this. The first time this works fine but when I switch
to another item in the list box the timings are off. Tracing the displayText function shows that it runs continuously

function showDetails {

// lots of stuff

_root.fieldname1._visible = false;
var intervalID;
intervalID = setInterval( displayText, 600 );

// more stuff
}

function displayText {

_root.fieldname1._visible = true;
clearInterval( intervalID );
}

Where am I going wrong

Preloader Woes....
Hi All,

I am using the following code as the guts of my preloader...

code:
____________________________________________
loadedbytes = getBytesLoaded();
totalbytes = getBytesTotal();
loadedkbytes = Math.ceil(loadedbytes / 1000);
totalkbytes = Math.ceil(totalbytes / 1000);
frame = Math.ceil(loadedbytes / totalbytes * 100);
_root.loaderin.gotoAndStop(_root.frame);
if(loadedbytes == totalbytes){
nextScene();
}
____________________________________________

it works, but my load bar doesn't

if you could have a quick look and let me know why...

http://www.millenniumit.freewebsitehosting.com

Cheers for your help and time

Preloader Woes....
Hi All,

Im still having trouble with my preloader..

http://www.millenniumit.freewebsitehosting.com/

everything works except for the freakin' loader bar...it just seems to loop bacl to the start every second

heres the code im using...(thanks to XFM ):

Code:

loadedbytes = getBytesLoaded();
totalbytes = getBytesTotal();
loadedkbytes = Math.ceil(loadedbytes / 1000);
totalkbytes = Math.ceil(totalbytes / 1000);
frame = Math.ceil(loadedbytes / totalbytes * 100);
_root.loaderin.gotoAndStop(_root.frame);
if(loadedbytes == totalbytes){
nextScene();
}


If someone could help me with this, that would be great

Cheers boys

Preloader Woes...
Hi,

I built a pre-loader for a short 49K movie of mine. The loader has its own scene and the main movie is in its own scene. When the preloader finishes I have a gotoandplay command that points to the next scene and frame 1.

PROBLEM: The scene that gets loaded, doesn't play from scene one. It is already at the end of the movie clip. Do I need a stop command in the scene I am using the pre-loader for?

Confused,
Keith

Preloader Woes
My preloader won't work, it won't start to be precise. When my movie starts the preloader screen appears, but it doesn't do anything, and all the sound from the next scene start playing. Could I email it to someone, since I don't think I could understandably post it here and I can't upload anything because my comp freezes up every time I try?

LoadVariablesNum Woes
Ok what I'm attempting to do is create an interface that will allow you to select a mix-and-match type image with different eyes, noses and mouths and then send variables based on those selected images into an ASP page so that you can print them out.

I have already set up a database and ASP code and I have tested that so I know it works fine. The ASP is declaring all the facial variables that I need and I have found that if I enter in solid variables into that script without the Flash movie picking them, it displays the printable images on the HTML page perfectly.

I'm wondering if the scripting that I'm using is incorrect in some fashion.

Code:
on (release){
trace (eyes);
trace (nose);
trace (mouth);
loadVariablesNum ("MyASP.asp", "0", "POST");
}

It seems that none of the variables are actually passing through the ASP script and into the database. I know the ASP script works, and I know that the database can call up the images correctly.

If someone can give me an little assistance with this, I would greatly appreciate it.

Murphy1976

Preloader Woes
Hi:

A have an intro that I get to preload properly.

Here is the script I am currently using:


Code:
onClipEvent (load) {
_visible=true;
}
onClipEvent(enterFrame) {
percentloaded=Math.round(_level1.getBytesLoaded()/_level1.getBytesTotal()*100);
percentDisplay=percentloaded + "%";
if(percentloaded==100 && !initialized) {
initialized=true;
_visible=false;
_level1.gotoAndStop (1);

}
}


I tried using the above script as a single frame in a "preloader" scene (above Scene 1) in the main (intro) movie, but the percentage always shows up at around 60% loaded, then immediately disappears, and the movie starts to play.

Now, as you can see (i.e.,_level1), I created an empty movie, containing nothing but my preloader script & the (percentDisplay) text field, then loaded my intro into it.
The preloader starts from 0% in this case, but the movie still starts at around 60-70%, while the preloader is still counting down on screen.


I use this same preloader to load music sound tracks on my portfolio site, and it works fine.

Also, I tried using another preloader with this intro, the one which I use to preload my portfolio, but it doesn't work either, altough it works great on my site, under the same circumstances, i.e., as a preloader scene.

Can anyone offer an suggestions as to why these don't work with this intro? I don't want the intro to start playing while the preloader is still on screen counting down, and I'm not catching on as to why I have to load this intro into level one, and preload it from another movie. Any advice?

The intro can be found here:

http://www.ekigroup.com



Thanks,



James
He is risen!!!

If-then Statement Woes
Kinda an additional to an aerlier post, but worded a bit different to make it simple and universal...

i'd like to make an if-then statement that says..

if ((variableX) == (this or this or this or this)){
do this;
}


What i mean is, if variableX is equal to anyone of several options, then do the statement.


Here's my exact script:

if ((_root.selectState.getSelectedItem().data) == (("AL") || ("AR") || ("FL") || ("GA") || ("KY") || ("LA") || ("MS") || ("NC") || ("SC") || ("TN") || ("TX")))
{
_root.shipperName = "SAIA";
_root.shipperNumber = "1-800-765-SAIA";
_root.shipperWeb = "www.saia.com";
}


but it only works if my user has selected "Alabama" from the dropdown menu.

On the button that activates the above script (which is inside a fuction call), there is another function that clears my dynamic boxes. If anything other than Alabama is selected, the boxes get cleared.
I think i have narrowed the problem down to the syntax of my if-then statement..

Help?
-myk

CreateEmptyMovieClip Woes
Creating empty movie clips. Applying onEnterFrame functions to them. Previewing them shows the functions attached. Which is good.

Creating empty movie clips. Applying onEnterFrame functions to them. Loading JPGs into them. Previewing them shows the functions gone and the actions do not occur. Which is bad.

Any help?

Preloader Woes...
I have a preloader for my web page...(which is pretty rough flash usage, i know)...but it doesn't seem to work.
When I load the page for the first time with IE6.0, it seems to want to load the whole thing before playing any of the preload. I am running straight from the .swf file online, could this be my problem?

(I just found that integrating the .swf file in html is 1 extra step and it's not best for all screen sizes.)

Note: The preloader will work if I completely load the page, go to IE and delete all offline content (while still on the page), and then press the reload button. But otherwise it's completely useless.


Any help's much appreciated...

- stsren

below is the link to the page (1.5 meg page, mind you..)which has the preloader that doesn't really preload.
http://ssquad.clanpages.com/Flash/menu_sshots.swf

Navbar Woes...
I have a horizontal scrolling navbar, and I want it to move back to the center position when the mouse is out of the navbar area.

I have it sort-of-working... It only moves back to the center as long as the mouse itself is being moved... You can see I tried a while loop to get it to move back independant of mouse movement, but it just 'snaps' straight back without moving there (which is obvious in hindsight).

I've just got the loops commented out for the moment...
I'd appreciate some advice on getting this to work.


Code:
onClipEvent (mouseMove) {
xmousepos1 = _xmouse;
ymousepos1 = _ymouse;

if (xmousepos1>xmousepos2 && ymousepos1>-25 && ymousepos1<25) {
_root.mc_navbar.prevFrame();
}
else if (xmousepos1<xmousepos2 && ymousepos1>-25 && ymousepos1<25) {
_root.mc_navbar.nextFrame();
}

else if (ymousepos1<-25 || ymousepos1>25) {
if (_root.mc_navbar._currentframe < 60) {
//while (_root.mc_navbar._currentframe < 60) {
_root.mc_navbar.nextFrame();
_root.mc_navbar.nextFrame();
//need to refresh the frame?
//}
}
else if (_root.mc_navbar._currentframe > 61) {
//while (_root.mc_navbar._currentframe > 61) {
_root.mc_navbar.prevFrame();
_root.mc_navbar.prevFrame();
//need to refresh the frame?
//}
}
}

else {
stop ();
}
xmousepos2 = _xmouse;
ymousepos2 = _ymouse;
}

Flash 5 And VB.NET: The FSC Woes....
I wrote a cool little game in VB.net and I Am using alot of flash in the program. Poblem is, the flash loads and plays too fast for other instances to fall into place.

So enter the infamous FScommand....

I entered this into my main form:

Private Sub FlashMovie_FSCommand(ByVal command As String, ByVal args As String)

Dim Drunk As New Drunk()
Dim TwentyBeers As New TwentyBeers()
Dim tenBeers As New TenBeers()
Dim ThirtyBeers As New ThirtyBeers()
Dim FortyBeers As New FortyBeers()
If command = "loserDone" Then Drunk.ShowDialog()
If command = "TenDone" Then tenBeers.ShowDialog()
If command = "TwentyDone" Then TwentyBeers.ShowDialog()
If command = "ThirtyDone" Then ThirtyBeers.ShowDialog()
If command = "FortyDone" Then FortyBeers.ShowDialog()

And in the flash movie(s) I entered in action, selected fscommand: and typed in (command) TenDone. Second movie had a fscommand of TwentyDone, and so on...

I build the project and it doesn't work.
Now mind you, everything worked fine before I tried playing with the fscommand. The problem was, I have a flash movie that I want to play and from that load a frmWindow depending on the tenDone, twentyDone.... Frmwindow doesnot open from flash but from the VB program. Unless I put the frmwindow open commands in flash?

The program is a slot machine and I have a movie for spinning, but the little popup windown I had for winning were popping up before the actual spinning was done. Which is why I Want to enter the fscommand signaling "Done" so go a head and load the winner window...

Does this make sense?

Any suggestions?
LB

Navigation Woes
I have put together some pages for my Web Site and need some help/ideas with the navigation. I was wondering if I need to make one nav bar with a simple text rollover to apply to all my pages on a separate document. Or do I create a nav bar on every page? Or do I import the original made one to each page?

I want to make a bar with a gradient @ 400 px wide and 40 px height.
I then will type my text (12px) and make each one a button on its own layer. Edit with an over state and only change text color.

IS this the proper way to make that type of nav? ANY HELP will be appreciated!


For iaskwhy,

I am using MX. I created several Fla movies and would like to add navigation to them as a site. I made the usual Home, about, contact, etc. All doc sizes are 760 px X 420 px. I have room at the bottom to fit a nav bar as I mentioned in my above post. I am not sure of my limitations with the nav having to be created for every movie or just on my home page and have the other movies load over top of the home fla. Then where would the nav be? I am not sure how to approach this. Appreciated!!

Function Woes...
Hey, everyone. (My very first post!)

Here's my exact problem. I've written a little actionscript function that creates a new instance of a movie clip (already existing on the stage). Here it is:

function makeInstance(x, y, square, name) {
duplicateMovieClip(square, name, 0);
trace(name.length);
name._x = x;
name._y = y;
}

("x" & "y" are the coordinates to stick the instance - each one a copy of whatever "square" is. "name" is whatever name I've fed into the function to name the particular instance.)

The problem is: it doesn't work. ;-) Any idea why?

----

Preloading Woes...
hello all...
here we go...
intro.swf = 200k, main.swf = 600k

2 seperate files...i want to preload intro.swf when you first come to the site...now it's going to preload intro.swf...but how do i tell it to preload main.swf in the background???

Is there a way to preload external .swf's?

Thanks in advance.

webDev2k2


this sh*t is driving me crazy

Combo Box Woes :(
I have a combo box set up so that when a item is selected from it, certain text will be displayed in dynamic text boxes. It works, but only once. I can only choose 1 item, and I cant choose anymore after that. here is the code i have so far. What do I need to add so I can make multiple choices(not all at the same time), but 1 after the other. bare with me, I'm a actionscript newbie :P

roster is the combo box
name, age, location, ... are the dynamic text boxes


function rosterSelect (roster) {
value = roster.getValue();
if (value == "Smartsuite") {
_root.name.text = value;
_root.age.text = "20";
_root.location.text = "Michigan";
_root.aim.text = "smartsuiteDBD";
_root.quote.text = "Zx should die!";
_root.kills.text = "15137";
_root.deaths.text = "11048";
_root.flags.text = "178";
_root.games.text = "104";
_root.nickname.text = "****er of the Goats";
_root.picture.text = "N/A";
}
if (value == "Squadkiller") {
_root.name.text = value;
_root.age.text = "25";
_root.location.text = "Virgina";
_root.aim.text = "squadkillerDBD";
_root.quote.text = "Garth Brooks Rules!";
_root.kills.text = "14836";
_root.deaths.text = "11428";
_root.flags.text = "67";
_root.games.text = "103";
_root.nickname.text = "Mini-Van Man";
_root.picture.text = "N/A";
}
if (value == "Rabbiz") {
_root.name.text = value;
_root.age.text = "20";
_root.location.text = "Washington, DC";
_root.aim.text = "rabbi2153";
_root.quote.text = "";
_root.kills.text = "11361";
_root.deaths.text = "6076";
_root.flags.text = "45";
_root.games.text = "91";
_root.nickname.text = "Funny looking kid";
_root.picture.text = "N/A";
}
if (value == "Kap") {
_root.name.text = value;
_root.age.text = "13";
_root.location.text = "Arizona";
_root.aim.text = "g m p lyng";
_root.quote.text = "";
_root.kills.text = "60451";
_root.deaths.text = "4891";
_root.flags.text = "143";
_root.games.text = "60";
_root.nickname.text = "The Kaptain of Loooveeee";
_root.picture.text = "N/A";
}
}

Preloader Woes
I have the preloader at my portfolio site working except for the fact it seems to take longer then it should for the preloader to come up. My preloader contains some simple text, some vector panels made in Flash and a small JPEG in the background. You can check it out here: http://likely.reallyrules.com

Any help would be very much appreciated.

My Sound Woes..
Hello all, I have been searching for one particular sound, but cannot find it anywhere, so I am turning to you guys.
The sound is the one beep (like a high pitched tick) that you get when you hover over a button.

Hrmm.... okay, something a bit like what they have over at 2advanced. Oh and no, I am not some freak like Chudian.com trying to rip them off.

So if anyone can help, I will be grateful twice and thrice over.


I am looking for a url, and that is all I need.


Thank you so much for any suggestions, and replies.



Ionsurge Inc™

Preloader Woes
We need a preloader that will load show percentage however when I put one together it is loading the entire movie and it's very large so it took a few minutes. Anyone know of a way to only load like the first half before playing but for the percentage to still go up to 100%?

Preloader Woes
Trying to make a preloader, the bar works ok
but the dynamic text (counterpercent) is not displayed

The following code is in the bar movie clip instance


Quote:




onClipEvent (load) {
//set the status bar width to zero;
_xscale = 0;
}
onClipEvent (enterFrame) {
//calculate the load as a percentage;
counter = math.floor(_root.getBytesLoaded()/_root.getBytesTotal()*100);
_root.counterpercent = counter+"%";
//if loaded, play;
if (counter>=100) {
gotoAndPlay(2);

} else {
//if not loaded, set the status bar width;
_xscale = counter;
_root.counterpercent = counter+"%";
}
}






Any ideas what I'm doing wrong?

Javascript Woes......
I have a button with this code on it:

on (release) {

varHeight="600"
varWidth="800"

getURL ("javascript:window.open('ProDev.html','ProDev','w idth=755,height=550,top='+((screen.availHeight/2)-(" add varHeight/2 add"))+',left='+((screen.availWidth/2)-(" add varWidth/2 add "))); void(0);");
}


It works like a charm. BUT, yes there's always a but, If I have window1 open and then press this button in window2, so window 3 opens, it loads the content for window3 into window1. FYI window1 was opened thru javascript also. Each page has a different name and different sizes, but it takes window3's content, disreguards the size info and puts it in window 1, which is behind window2. So it looks as if its not opening or its coming up minimized.

Did I explain this clearly or just further confuse anyone trying to help me out???

Button Woes
Hello

I've got a number of buttons that are all text which I want to
change color over time (5-frames), which can be done simply enough
with a tween_mc attached to the button my problem is:
I have 20ish buttons so don't want 20 "tween_mc" clips because,
I'm aiming for a really lean filesize. Is there a way to create
just one button but change the text within it by way of a script?

something like:

var button txt;
button txt = about; //attached to button one
button txt = contact; //attached to button two

etc.

cheers

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