View Full Version : Red Box where movie clip should be?
WillyGee
02-06-2008, 04:57 PM
Hello,
I have a really basic site which pretty much consists of a really long movie clip that is scrolled horizontally with some links at the top to jump to categories.
It works fine on my computer but when I publish it I get a giant red box where the movie clip should be.
Anyone ever have a problem like this?
I should probably mention that the movie clip is really just one long psd file that I imported. when I say long i mean LONG - like 12,000 pixels long - but like I said, it works fine on my machine.
thanks for your help...Will
This is what it looks like on my machine....
http://williamgregory.ca/images/Picture-1.jpg
This is what it looks like when Published....
http://williamgregory.ca/images/Picture-2.jpg
Hi WillyGee
I think it might have something to do with the length of that clip... Think Flash only supports up to like 2800 pixels or something.
Try this:
Create a smaller clip - 2700 pixels or so and see if it works, then try a bigger one until it stops working. That way you will easily find Flash's limit.
Good luck!
atomic
02-06-2008, 05:50 PM
Max size is +/- 2880 pixels...
You'll have to slice it into different movie clips...
WillyGee
02-06-2008, 05:51 PM
Thanks for your reply Morg. If that was the case wouldn't it not work on my machine either?
The same .swf file works if I open it on my machine but not it if I open it using the published html file. I had a colleague try the .swf file on her machine and i wouldn't work for her.
very odd. I wish it wouldn't work at all if it's a length issue instead of getting my hopes up ;)
Yes. Quite strange that it works on local. I have noticed the web player seems to run about 10% slower online than offline too... Perhaps it just has enough processing power to crack it offline and not online.
But I would suggest that what I mentioned was the problem. :) Again, good luck!
WillyGee
02-06-2008, 05:59 PM
Thanks - will do.
Can anyone point me towards a tutorial on joining movie clips if I need to chop it up?
I'd still need it to scroll as if it were one and those little icons at the top make it jump to set "x" points on the time line.
hmm... I am reading this on Adobe's website: "it can use excessive amounts of memory, bitmap caching will not work if the dimensions of a cached movie clip are larger (or become larger) than 2880 pixels"
Are you using caching of the bitmap? Runtime caching?
atomic
02-06-2008, 06:03 PM
You can use an onEnterFrame on each mc, setting it's x coordinate based upon the previous mc's own x coordinate + it's width...
WillyGee
02-06-2008, 06:10 PM
Sounds perfect but I think I am too new to be able to write that kind of actionscript on my own. I'll dig around and see if I can't find an example somewhere though. I love to learn new tricks!
@Morg - that probably is the case. I had hoped that I had dodged a bullet with the length but clearly not. Serves me right for trying to be sneaky!
WillyGee
02-06-2008, 07:15 PM
Would I need to nest them all in the first movie clip in order to scroll them?
I'm guessing it's not as easy as ...
myMovieClip.onEnterFrame = function() {
nestedClip.x=10;
};
atomic
02-06-2008, 07:42 PM
The only clip you're really scrolling is the first one... The others follow the first one...
So assuming the first clip is the scroll_mc, then on the one that follows you'd code...
follow1_mc.onEnterFrame = function(){
this._x = scroll_mc._x + scroll_mc._width;
this._y = scroll_mc._y;
};
On the next one...
follow2_mc.onEnterFrame = function(){
this._x = follow1_mc._x + follow1_mc._width;
this._y = scroll_mc._y;
};
Etc...
The following clips may be anywhere on or off stage, not necessarilly tagged to the scroll_mc...
Actionscript is what will get them in line with the scroll_mc, when you run the movie...
WillyGee
02-06-2008, 08:30 PM
Thanks atomic!
I've been playing around with this but I can't seem to get them in line. The only way I've been able to get the mc to show is when I put the script you gave me on the first frame of the movie. It's nicely in line but it isn't part of the mc that scrolls.
Is there any way to attach it to the first frame of the movie so that it too scrolls?
(does any of this make sense?)
Thanks again!..Will
atomic
02-06-2008, 08:40 PM
Can you attach your .fla or mail it to me?
I'll provide an address through a PM, if you want to go the e-mail route...
The .fla should be in a Flash 8 format, no higher.
WillyGee
02-06-2008, 08:43 PM
it might be easier to email - thanks!
atomic
02-06-2008, 08:52 PM
Check your PM's.
atomic
02-07-2008, 03:06 AM
Try this...
stop();
goLeft = false;
foRight = false;
_root.left.onRollOver = function() {
goLeft = true;
};
_root.right.onRollOver = function() {
goRight = true;
};
_root.left.onRollOut = function() {
goLeft = false;
};
_root.right.onRollOut = function() {
goRight = false;
};
onEnterFrame = function () {
if (goLeft) {
_root.first._x -= 3;
}
if (goRight) {
_root.first._x += 5;
}
};
cabinets.onEnterFrame = function(){
// What I told you to use...
// I in fact substracted 40, to move the cabinets mc closer to the first picture...
this._x = _root.first._x + _root.first._width - 40;
// Changed it from 94 to 64... Looks better and clears the buttons when scrolling
this._y = 64;
};
WillyGee
02-07-2008, 04:28 PM
AWESOME! Thanks so much!
If you are ever in Toronto, Canada I owe you a pint!
atomic
02-07-2008, 04:31 PM
Grrrreat! ;)
I'm in Montréal, so I could take you up on that some day!
WillyGee
02-07-2008, 07:17 PM
Wow! Small world - I was just there last weekend!
Got it all working perfectly now!
The only thing I need to figure out now is how to make the bottom scroll less choppy.
atomic
02-07-2008, 07:36 PM
Was last in Toronto in 2002... Flying back from the States...
Because of stormy weather, missed the last connecting flight to Montréal...
Spent the night at the Airport... On a bench! And bars were closed! :eek:
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.