Why Doesn't CSS Work In A Loaded Movieclip?
hello I'm having a rather irritating issue with stylesheets and have found no solution on this forum or the net in general. I am loading a css file into a text area to provide basic formating of html (link, hover etc.) - now when the textarea is on the main timeline this works perfectly. However when the textarea is in a movieclip the CSS gives me the middle finger. any help would be greatly appreciated, thanks in advance
:theory
ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 01-27-2006, 06:18 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
SetProperty Doesn't Work With Movieclip Inside Of Movieclip
I originally had this set up this way and it worked.
var hita:Boolean = false;
logotop.onEnterFrame = function() {
hita = this.hitTest(this._parent.middle.hitme);
if (hita == true) {
setProperty ("logotop", _alpha, "0");
}
}
Then I put everything in a new movieclip with the instance name "printme".
Now it doesn't work and doesn't give me an error.
var hita:Boolean = false;
printme.logotop.onEnterFrame = function() {
hita = this.hitTest(this._parent.printme.middle.hitme);
if (hita == true) {
setProperty ("printme.logotop", _alpha, "0");
}
}
Do you see anything wrong with the above code?
Duplicated Movieclip Doesn't Inherit Loaded Movieclip
I'm loading an image into a blank_mc within a movieclip called 'background_mc' using the MovieClipLoader object; when the onLoadInit for the MovieClipLoader object is fired, i then attempt to clone my 'backgound_mc' object and the loaded image it contains so i can do something with it (i,e a funky masky/blur thing, not important right now)
I'm successfully loading my image into the blank clip within background_mc, the onLoadInit behaviour fires and duplicates background_mc once the image has been loaded, but in a disappointing turn of events, my clone of background_mc no longer has an image attached, and has instead reverted back to it's original form, just as ti was before it had the jpeg image loaded in.
Has anyone ever encountered something like this this before regarding the duplicateMovieClip command, and if so can anyone suggest a workaround?
*goes off to boost karma by helping others*
Thanks!
Chris
Hittest Doesn't Work In Loaded Mcs?
I've tried _lockroot, as well as using _root, this, setting a global variable to 'this' and using it, but nothing seems to work!?
I set up the attached files (testDrawPolyShell.swf loads drawPoly.swf), so that the first mouseClick uses attachMovie to add the poly and the second clip does a hitTest between the poly and the cursor position. It works fine stand-alone, but the hitTest doesn't work in the loaded movie...here's the code that's in drawPoly.swf:
Code:
this._lockroot=true;
this.createEmptyMovieClip("draw_area", 5);
this.onMouseDown = function() {
poly = new Object();
poly.x = _xmouse;
poly.y = _ymouse;
draw();
};
function draw() {
if (this["draw_area"].start_point.hitTest(_root._xmouse, _root._ymouse, false)) {
removeMovieClip(this["draw_area"].start_point);
} else {
temp = this["draw_area"].attachMovie("start_point", "start_point", 2);
temp._x = poly.x;
temp._y = poly.y;
}
}
Any ideas??
Thanks!!!
HitTest Doesn't Work In Loaded Mcs?
I've tried _lockroot, as well as using _root, this, setting a global variable to 'this' and using it, but nothing seems to work!?
I set up the attached files (testDrawPolyShell.swf loads drawPoly.swf), so that the first mouseClick uses attachMovie to add the poly and the second clip does a hitTest between the poly and the cursor position. It works fine stand-alone, but the hitTest doesn't work in the loaded movie...here's the code that's in drawPoly.swf:
Code:
this._lockroot=true;
this.createEmptyMovieClip("draw_area", 5);
this.onMouseDown = function() {
poly = new Object();
poly.x = _xmouse;
poly.y = _ymouse;
draw();
};
function draw() {
if (this.draw_area.start_point.hitTest(_root._xmouse, _root._ymouse, false)) {
removeMovieClip(this.draw_area.start_point);
} else {
temp = this.draw_area.attachMovie("start_point", "start_point", 2);
temp._x = poly.x;
temp._y = poly.y;
}
}
Any ideas??
Thanks!!!
HitTest Doesn't Work In Loaded Mcs?
I've tried _lockroot, as well as using _root, this, setting a global variable to 'this' and using it, but nothing seems to work!?
I set up the attached files (testDrawPolyShell.swf loads drawPoly.swf), so that the first mouseClick uses attachMovie to add the poly and the second clip does a hitTest between the poly and the cursor position. It works fine stand-alone, but the hitTest doesn't work in the loaded movie...here's the code that's in drawPoly.swf:
Code:
this._lockroot=true;
this.createEmptyMovieClip("draw_area", 5);
this.onMouseDown = function() {
poly = new Object();
poly.x = _xmouse;
poly.y = _ymouse;
draw();
};
function draw() {
if (this.draw_area.start_point.hitTest(_root._xmouse, _root._ymouse, false)) {
removeMovieClip(this.draw_area.start_point);
} else {
temp = this.draw_area.attachMovie("start_point", "start_point", 2);
temp._x = poly.x;
temp._y = poly.y;
}
}
Any ideas??
Thanks!!!
Loaded MC Doesn't Work - External Does
Ok, I'm stuck. I've got a swf that works fine on its own, but when I load it into a scrollpane nothing displays (it's all dynamically created from XML).
Here's the code in the SWF:
Code:
var url = "singleScreen.as";
var x = new XMLloader();
x.ignoreWhite = true;
var myListener = new Object();
x.addEventListener("onLoad", myListener);
x.load(url);
myListener.onLoad = function(evt:Object):Void
{
_root.screen = new EditScreen(_root);
screen.parseXML(evt.target.firstChild);
screen.draw();
screen.setMode("move");
}
and the code that loads it in the scrollPane:
Code:
pane_mc._lockroot = true;
pane_mc.contentPath = "editScreenLayout.swf";
Anyone have an idea why it doesn't work?
Loaded External Swf Doesn't Work
Hello everyone,
I have a swf gallery, and it works perfectly if I run the gallery.swf directly, but I have an index.swf where I'm loading the gallery.swf. Everything works and it loads all the different thumbnails on the xml file, but I can't load the bigger images.
It works if I run the gallery.swf directly, but it doesn't work if I run it inside the index.swf. I simply use the following loading method:
Code:
var loader:Loader = new Loader();
var request:URLRequest = new URLRequest("gallery.swf");
loader.load(request);
addChild(loader);
'MovieClip.Prototype' Doesn't Work :(
Hi !
What's wrong with my following code ?
MovieClip.prototype.onLoad = function() {
this.myX = random(500)+200;
this.myY = random(300)+200;
}
mc1.onEnterFrame = function() {
trace("My original x value "+this.myX);
trace("My original y value "+this.myY);
}
It doesn't show x & y values in output window. Anyone could please tell me the answer ?
TIA
MAhesh K.
Why MovieClip.beginGradientFill() Help Example Doesn't Work ?
Hi, very very simple situation:
I've just copied and paste example code from FlashMX 2004 Help
to newly created file and tested the movie - BUT NOTHING HAPPENS AT ALL !!
example code (the simpliest one):
_root.createEmptyMovieClip( "grad", 1 );
with ( _root.grad )
{
colors = [ 0xFF0000, 0x0000FF ];
alphas = [ 100, 100 ];
ratios = [ 0, 0xFF ];
matrix = { a:200, b:0, c:0, d:0, e:200, f:0, g:200, h:200, i:1 };
beginGradientFill( "linear", colors, alphas, ratios, matrix );
moveto(100,100);
lineto(100,300);
lineto(300,300);
lineto(300,100);
lineto(100,100);
endFill();
}
when i try example code of MovieClip.beginFill() function everything goes fine and I can see the result.
code here:
_root.createEmptyMovieClip( "grad", 1 );
with (_root.grad){
beginFill (0xFF00FF, 100);
lineStyle (1, 0x000000, 100);
moveTo (0, 0);
lineTo (0, 20);
lineTo (50, 20);
lineTo (50, 0);
lineTo (0, 0);
endFill();
}
So - where the problem ? any ideas ?
I didn't modified anything - just copied and paste help example...
CacheAsBitmap Doesn't Work In MovieClip
Hello,
I'm using a gradient flash shape as a mask, and it works fine until I nest it in a comp, then it doesn't work anymore. Here how my code structured:
movieClipName_mc.clipToBeMasked_mc.cacheAsBitmap = true;
movieClipName_mc.mask_mc_mc.cacheAsBitmap = true;
movieClipName_mc.clipToBeMasked_mc.setMask(mask_mc);
Does anyone know what might be the problem? Thank you for your help in advance!
Ext. Movie Loaded, But Code Doesn't Work
I have this movie ,www.kreativdesigns.com/soccer it loads the player roster movie dynamically, and the player roster movie loads the bios dynamically. if you click on this one www.kreativdesigns.com/soccer/player.swf you'll notice that you can scroll, and click on the first player (jimmy ivacic) and it loads his 'bio' fine. But on the original page www.kreativdesigns.com/soccer i am not able to scroll, and it loads the movie into the wrong place.
Loaded External Movie Nav Doesn't Work
I have a main fla 'rock.swf' that pulls in an external movie called 'basenav.swf'. The 'basenav.swf 'has four buttons with the following code on each button.
on (release) {
this.targetx = -325;
slide.gotoAndPlay("move");
}
The 'basenav.swf' works perfectly when tested alone but when I test the main movie 'rock.swf' - the navigation in 'basenav.swf' doesn't respond.
I have the following code within the 'rock.swf' movie that pulls in 'basenav.swf'.
loadMovie("basenav.swf", "basenav");
Both of these files sit in a folder on the main level and I think that this is a path problem but i'm not sure how to go around fixing it. Please could someone enlighten me?
Tasvin
Masking A Dynamically Loaded JPG.. Doesn't Work
i found a couple of topics on this problem, but it wasn't resolved
I load a jpg into a masked layer and it comes up with nothing. If i take the mask away it loads fine
Is there a workaround for this?
Many thanks
Preloader Doesn't Work When Loaded Into Another Movie
There must be a simple explanation for this. Can someone help me?
I have a main.swf and a child.swf. The child.swf is loaded into the main.swf using the loadMovie method. The preloader script is in the child.swf and works fine when the child.swf is run by itself, but doesn't work when loaded into the main.swf. Any ideas? I'm using Flash 5 mx.
External Swf Loaded Into Main Swf Doesn't Work
Hi all,
I have use loadmovieclip to load an external swf into my main swf. but the external is not working after loaded into the main.. it is a guestbook that i found on the internet but i got the source files. the guestbook doesn't work BUT it DOES load into my main swf.
Do i have to change anything in the guestbook.swf in order for it to work? their values are all referenced by _root.xxxxxx = xxxxx.
Thanks in advance.
Preloader Doesn't Work When Loaded Into Another Movie
I've got this preloader working nicely on a standalone movie. The problem arises when I load it into a main movie. It loads and counts up to 100% but the playhead doesn't go on to frame 3 with this.gotoAndStop(3);
I've also tried it with unique variable names but still no success. Why does it work alone but not in another movie?
Form Doesn't Work When Loaded Onto Server
I have a pretty simple form with only 3 variables and a dynamic text field to display the results sent back from the server.
It works fine when I test the movie from flash but when I load the swf file onto my server, it doesn't work. It looks as if the variables arent being sent. Anybody help?
Why Doesn't Load Vars Work When Loaded Into A Mc?
Hi, i have been wondering, why doesn't the loadVars(); work when you load an external swf (with the loadVars();) into a mc in a different swf?
any ideas??
Regards,
Martin
Gaming Help And Info:
http://gaming.webrevolt.biz
Resizing Loaded Image Should Work, But Doesn't...
I have a movie in which I have a series of buttons that load an image in a movieclip that's on the root called photo_holder_holder.
I use this code on the buttons that load the images:
Code:
on(release){
var mcl:MovieClipLoader = new MovieClipLoader();
var listener:Object = new Object();
mcl.addListener(listener);
mcl.loadClip(_parent.photo_loc[current_photo],
listener.onLoadInit = function (){
if (_root._photo_holder_holder._width >= 200 ) {
var ctnrWidth = _root._photo_holder_holder._width;
// Calculate percentage by which image will need to change to fit
scalePercent = (ctnrWidth > maxWidth)?maxWidth*100/ctnrWidth:scalePercent;
_root._photo_holder_holder._xscale = scalePercent;
}
if (_root._photo_holder_holder._height >= 100) {
var ctnrHeight = _root._photo_holder_holder._height;
// Calculate percentage by which image will need to change to fit
scalePercent = (ctnrHeight>maxHeight)?maxHeight*100/ctnrHeight:scalePercent;
_root._photo_holder_holder._yscale = scalePercent;
}}
this code should work. but it doesn not do a single thing...
Is there anything wrong with it? cause I can not find it...
I'd really appreciate some help on this... Many thanks, kind regards game
Input Text In A Movieclip, Doesn't Work :(
hi
I am having a trouble with Input Text.
I put a text box in the first scene,first frame.I set it as InputText and Var. name is "Name".
I have a mc in frame 88 and inside this mc there is another mc.In that last mc I put another text box,InputText and set Var. name as "Showname"
I add this code into the first frame to a button;
on (release, keyPress "<Enter>") {
Showname = Name;
gotoAndPlay(2);
}
I want the move go on from frame(2) to (88) and show the text in the mc.
But it doesn't
What do I do wrong?
Thanks for your time
Scrollpane Doesn't Work Inside A Movieclip
I don't know if I am correct or not, but I have tried everything to make a scrollpane work inside another movieclip, but yet unsuccessful. But when it is on the main stage it works great!
Any ideas why this is?? Am I doing something wrong? Has anyone been successful with this?
Thanks,
Eric Ehle
[F8] Blog-like Scrolling Movieclip Doesn't Work.
Hi there!
I'm trying to do a mini-blog type of layout where I can post one box (a movieclip called "page") everytime I add an entry throught my XML. Nothing fancy, simple text and an image.
The problem I have is that, as soon as I try to load the movieclips over one and the other, only the last one appears. I've used that previously straight on the _root and it worked... but if I put it in a movieclip it doesn't seem to work (and I need the movieclip since I want to be able to make it scroll). Anybody's got an idea on this ? My script looks like that:
PHP Code:
for (nbPage=0; nbPage<2; nbPage++) {
holder.attachMovie("blog_page","pages_"+nbPage,this.getNextHighestDepth(), {_x:0, _y:nbPage*90});
}
Thank you in advance!
Button Inside Movieclip Doesn't Work
Hello, I am quite new with flash and actionscript and I have a problem making a button symbol work in one of my movieclips.
This is what i have so far: click here
On the first frame, i have:
quote:stop();
menustrip_mc.onRollOver = function (){
gotoAndPlay("over");
}
"menustrip_mc" is a movieclip with only one frame. It contains the whole orange strip and the red square. The square is a simple button symbol.
So when i go over "basic" (picture one), the strip slides out with a simple motion tween. (picture two).
On frame 30 (end of motion tween), i wrote this code:
quote:stop();
menustrip_mc.onRollOut = function (){
gotoAndPlay("out");
}
When I roll out, the strip goes back in and the animation stops on frame 1 again.
All this works well except the button doesn't work, if i go over it during the motion tween, i can see the over state of the button but when the motion tween ends, it goes back to up state and doesn't do anything.
I tried many ways and nothing works (this one works best). Does anyone have an idea how to solve the problem?
(F8AS2) Movieclip Button Doesn't Work
okey, i made a movieclip button and everything works fine except that when i press the button it's supposed to send me to the next scene, but it doesn't, nothing happens. What am i doing wrong??
here's the script i did in the frame 1 of the scene:
stop();
this.botonix.onRollOver = function() {
botonix.gotoAndPlay("over");
};
this.botonix.onPress = function() {
botonix.gotoAndPlay("down");
};
this.botonix.onRelease = function() {
botonix.gotoAndPlay("Scene 3",1);
};
any ideas???
Button Inside Movieclip Doesn't Work
Hi guys
Sorry for what is probably a stupid question.
I'm building a navigation menu.
In the first frame of the main time line i have 7 movieclips which are buttons. Within these movieclips there are additional buttons with a simple rollover function to change the background colour.
The problem I'm having is that the action on the buttons doesn't work. I'm guessing this is something to do with the AS i have within the mc.
I've had a good look through the forums and on Google but have yet to find the answer. So I'm hoping someone here can help or point me in the right direction.
I've attached the fla.
Thanks for reading
Russ
LoadMovie : Loaded Movie Contains Scrollpane That Doesn't Work :(
I have a photo gallery which is divided into different sections chosen from a menu. The menu consists of several movieclips within a scrollpane. Each movieclip contains a button which will load a different gallery section into an empty movieclip (empty_clip) on the main stage. This works fine, I pasted the code below:
on (release) {
_root.empty_clip.loadMovie("g_030214.swf");
_root.empty_clip._x=207;
_root.empty_clip._y=112;
}
However, the loaded movieclip ("g_030214.swf") also contains a scrollpane with several thumbnails (buttons). Clicking the thumbnails will display larger versions of the images (each image is located in a different frame within the loaded movie). This is where I have a problem as I can't get this to work.
This is the code for one of the buttons:
on (release) {
_parent.gotoAndStop("feb03_11");
}
When I click the button, nothing happens. "feb03_11" is the frame label containing img11 from this section.
I am quite new to Flash and I suppose I'm just mixing up the terms here, but I really don't know how to sort this out. Can anyone please help me out?
Thanks
tori03
Form Loaded Into Main Movie Doesn't Work
Hi
I have created a main swf file which holds a movie container which other swf's load into. One of the sections has a form in it. When I preview this section on its own the form works, but when I preview through the main swf file (or online) the text fields cannot be typed into. How can I fix this? Files can be downloaded from;
www.fullfatdesigns.co.uk/files.zip
or you can view the site as it is online
www.fullfatdesigns.co.uk
Thanks
Wayne
[MX04] Loaded Variable Doesn't Work With Array
Hi All,
First frame:
Loaded external variables from txt file. "movies" is the variable I need to work with the arrays in the last frame. "data" is the variable that changes to 1 when the variables are loaded.
PHP Code:
done=0;
movies=0;
loadVariables("data2.txt",_root);
Second frame: checks if load is complete:
PHP Code:
if(done==1){
gotoAndPlay(4);
}
Third frame: loops:
PHP Code:
gotoAndPlay(2);
Last Frame: has arrays on it:
PHP Code:
//new array
arr1 = [];
//create entries with number of entries as required
for (var n=0; n!=movies; n++) arr1.push(n);
//new array
arr1b = [];
//create entries with content from arr1 +".swf"to string
for (var b=0; b!=movies; b++) arr1b.push(arr1[b]+".swf");
stop();
Now I know that the variables successfully load, and if I declare the variable "movies" as a number instead of loading it the arrays work also.
So why can't I get the loaded variable to work in the last frame?
HELP PLEASE!
AttachMovie() Doesn't Work Properly When Swf Is Loaded Externally
I'm using Actionscript 2 in CS3.
My problem is a little bit hard to explain, so I just try to make it as clear as possible . . .
I have a main swf, which loads another swf using loadMovie, like so:
PHP Code:
loadMovie ("photogallery.swf", _root.empty_mc);
This swf (photogallery.swf) then loads other external movies depending on which button is clicked, in the same way:
PHP Code:
loadMovie ("ranges/obsession.swf", _root.empty_mc);
The other external swfs (such as "obsession.swf" in the example above) are slideshow galleries which load clips from the library using attachMovie(), show them for an amount of time specified by an interval, then attach the next movie over the top.
The code for these is a bit long winded, but looks like this:
PHP Code:
stop();
delay = 9000;
total = 7;
p = 0;
currThumb = "";
prevThumb = "";
names = new Array ("one_mc", "two_mc", "three_mc", "four_mc", "five_mc", "six_mc", "seven_mc");
xPosition = new Array (130, 97, 165, 128, 73, 131, 101);
yPosition = new Array (25, 104, 52, 52, 52, 22, 47);
th_names = new Array (th_one_mc, th_two_mc, th_three_mc, th_four_mc, th_five_mc, th_six_mc, th_seven_mc);
firstImage();
function displayPictures (pic, xPos, yPos)
{
tran_mc.gotoAndPlay("play");
empty_mc.attachMovie(pic, "pic_mc", this.getNextHighestDepth(), {_x:xPos, _y:yPos});
};
function nextImage()
{
if (p < (total-1)) {
p++;
displayPictures(names[p], xPosition[p], yPosition[p]);
currThumb = th_names[p];
currThumb.gotoAndPlay("over");
prevThumb = th_names[(p-1)];
prevThumb.gotoAndStop("up");
picture_num();
slideshow();
}
};
function firstImage()
{
displayPictures(names[p], xPosition[p], yPosition[p]);
currThumb = th_names[p];
currThumb.gotoAndPlay("over");
prevThumb = th_names[(total-1)];
prevThumb.gotoAndStop("up");
picture_num();
slideshow();
};
function slideshow()
{
myInterval = setInterval(pause_slideshow, delay);
function pause_slideshow()
{
clearInterval(myInterval);
if (p == (total-1))
{
p = 0;
firstImage();
} else {
nextImage();
}
}
} ;
So far, so good - the swfs all load OK and the galleries work how they should . . . the first time around. But if you click a button in the main swf that takes you a different part of the timeline, then return to where you were (i.e. loading both lots of external swfs again), the galleries go a bit haywire - the first interval gets very short, much less than the 9000 milliseconds it's supposed to be, and some of the clips in the library don't load.
I put in a series of diagnostic trace statements, and as far a I can tell from that, the code still runs through (i.e. it's not skipping anything), but for some reason it doesn't execute properly - instead of showing the first picture followed by the second, it shows the first, third, fifth; then if you click away and then back again it shows the first, fourth, seventh and so on.
I can't figure this out, because as far as I can tell, the external swfs should just be doing their own thing every time you click on them. There are no functions in the main movie that affect them or anything.
Does anyone have any suggestions or explanations? I would welcome any help that anyone could give. Sorry the post is such an epic . . .
Dynamic Text Box W/ Loaded <a Href ... Doesn't Work
I have a movie clip that resides off stage until triggered to a certain _x/_y coordinate by way of a rollover movie clip on stage
Inside the movie clip that jumps to the specified location are three dynamic text boxes that pull from a text file. In the text file I have all the &blah= variables set up for each item that I pull.
the two of the 3 boxes that I populate are just basic html links but yet the dynamic boxes don't render them html even with the selection on.
Is this something easy I'm not doing or does this dig way into a vast wonderland of items I don't dare touch.
Thanks for any help you can provide.
OnEnterFrame Doesn't Work For A Clip Loaded With LoadMovie
I haven't been able to find documentation on why loaded movies via
'loadMovie' into another movie clip don't seem to obey onEnterFrame
commands. The following code represents a movie clip, 'container',
which has a loaded external .swf file, 'box.swf'.
I have set the container to begin a decreasing alpha change. I've also
added a trace to see if the onEnterFrame is performing at all. What
happens is that the box does not appear to have an alpha change. There
is, however, a trace that returns an output of '100' only. But no
other numbers, suggesting that the command has stopped.
// Start
container.loadMovie("box.swf");
container.onEnterFrame = function () {
trace(container._alpha);
container._alpha -= 1;
}
// End
Check Answers Doesn´t Work In Loaded Movie Is
Hello , I have a fla that is a quiz with drag and drop questions.
I have a function to check the answers.
It works alright if the movie is running alone, but not if it´s loaded in another movie.
I have it loaded in another movie so I would be greatful if someone could help me to get it to work.
I attach fla´s in mx2004 and mx.
The quizfla itself (=quiz) and a fla thats load the quizfla (=loader).
OnEnterFrame Doesn't Work For A Clip Loaded With LoadMovie
I haven't been able to find documentation on why loaded movies via
'loadMovie' into another movie clip don't seem to obey onEnterFrame
commands. The following code represents a movie clip, 'container',
which has a loaded external .swf file, 'box.swf'.
I have set the container to begin a decreasing alpha change. I've also
added a trace to see if the onEnterFrame is performing at all. What
happens is that the box does not appear to have an alpha change. There
is, however, a trace that returns an output of '100' only. But no
other numbers, suggesting that the command has stopped.
// Start
container.loadMovie("box.swf");
container.onEnterFrame = function () {
trace(container._alpha);
container._alpha -= 1;
}
// End
MC Center Alignment Doesn't Work When Loaded Movie
Ok, I have a really weird problem. I've followed the tutorials but can't seem to get this simple thing right (am i losing my marbles?!)
Hopefully, someone can help.
My main movie features just a holder MC and some AS. I want to load an intro animation from an external swf which has all the animation based on the main timeline.
I have put this code on my main movie:
Code:
holder_mc._x = Stage.width/2;
holder_mc._y = Stage.height/2;
///////////Center Align Code//////////////////
Stage.align = "TL";
Stage.scaleMode = "noScale";
var stageL:Object = new Object ();
stageL.onResize = function(){
holder_mc._x = Stage.width/2;
holder_mc._y = Stage.height/2;
}
Stage.addListener(stageL);
///////////////////////////////////////////////
_root.holder_mc.unloadMovie();
_root.holder_mc.loadMovie("intro.swf");
_root.holder_mc._quality = "BEST";
stop();
The intro swf is loading fine but it places itself on the bottom right corner of the page. Its almost as though the intro swf has a registration point set to the top left corner but is that actually possible if all the animation was done on the main timeline of that movie??
I hope I am making sense, it's been a long day
HitTest Doesn't Work When Swf Loaded Into Director Projector
When I use hitTest in a swf that is loaded into a director projector it doesn't work - ie always returns a negative result, even though in the same swf it works fine running on its own in the flash player outside the director shell.
Anyone come across this or know why it happens?
I've checked the paths and they are fine, I'm not using "_root" or "_level0", I've also checked the co-ordinates of each movie clip and they are as they should be.
cheers,
Alex
External .swf Loaded Into Movieclip Doesn't Respond
Ok. I have a flash movie that contains a movieclip called "m_externalSection" and when a user presses a button it loads one of many external .swf's.
These .swf files are basically filled with some buttons that move around when you click them and some text fields that change depending on what button you've clicked.
The external .swf files work fine on their own, but when you load them into "m_externalSection", they don't do anything, none of the buttons does anything at all. Flash 'sees' the buttons (the cursor changes to a hand) but when you click nothing happens.
What could I be doing wrong so that my external .swf isn't working when it's loaded into a movieclip?
Thanks.
--Xezton
External .swf Loaded Into Movieclip Doesn't Respond
Ok. I have a flash movie that contains a movieclip called "m_externalSection" and when a user presses a button it loads one of many external .swf's.
These .swf files are basically filled with some buttons that move around when you click them and some text fields that change depending on what button you've clicked.
The external .swf files work fine on their own, but when you load them into "m_externalSection", they don't do anything, none of the buttons does anything at all. Flash 'sees' the buttons (the cursor changes to a hand) but when you click nothing happens.
What could I be doing wrong so that my external .swf isn't working when it's loaded into a movieclip?
Thanks.
--Xezton
Expert Question? Why Does MovieClip::removeMovieClip() Doesn't Always Work ?
Why does the MovieClip method removeMovieClip doesn't always work ??
I have a little FBanner class with a method that fade out a movieclip that destroy it.
code:
FBanner.prototype.FadeAndDestroy = function ()
{
this.onEnterFrame = function ()
{
this._alpha -= 5;
var currentAlpha = parseInt(this._alpha);
if (currentAlpha <= 0)
this.removeMovieClip();
}
}
but it only works half of the time.
All object are created in the same manners
code:
this.banner_xml.CreateBanner = function ()
{
var banner_mc = this.parent.attachMovie("FBanner", "banner" + this.cpt, this.cpt * -1);
this.lastbanner.FadeAndDestroy();
this.lastbanner = banner_mc;
this.cpt++;
//superfluous code removed
}
And if someone from macromedia read this, I always wanted to know why does removeMovieClip() and unloadMovie() doesn't return a boolean value indicating if the operation worked ??
Thanks in advance
Martin
[MX Prof. 2004] Actionscript Doesn`t Work In Movieclip
Hey guys.
If used this fotogallery : http://www.dreamweavercafe.com/cafe/...d=23754&page=2
The only problem is, when i put this fotogallery into my website, or when i load the gallery.swf extern into my website the picture doesn`t show. Everything else works just fine.
I`ve made a .rar file so you guys can see my problem:
http://home.quicknet.nl/qn/prive/j.hoogeboom/foto.rar
I hope someone can help me.
Thx in advance
Var ButtonsSpecial:MovieClip = This.disclaimer_mc && This.favorites_btn; Doesn't Work
var buttonsSpecial:MovieClip = this.disclaimer_mc && this.favorites_btn && this.homepage_mc && this.searchBar_mc && this.settings_mc;
buttonsSpecial.menu = contextMenu2;
In Above code buttonsSpecial.menu doesn't get recognised, why and how does it get recoginized? I also tried + instead of &&, in vain. (same result)
complete context menu is:
PHP Code:
// right-click menu1
// function literal (not standard function) must be put before ContextMenuitem
function getURLmichaellobrycom() {
getURL("http://www.michaellobry.com", _blank);
}
// ContextMenuItems
getURLmichaellobry = new ContextMenuItem("Homepage MichaelLobry.com", getURLmichaellobrycom);
// ContextMenu
MENU = new ContextMenu();
// deleting built-in ContextMenuItem
with (MENU) {
builtInItems.print = false;
//print, quality, zoom,play, loop, rewind, forward_back,
builtInItems.quality = false;
}
MENU.customItems.push(getURLmichaellobry, showButton);
_root.menu = MENU;
////////////
////////////
////////////
////////////
////////////
////////////
////////////
// right-click menu 2
var contextMenu2 = new ContextMenu();
// function firstly
// function gotoAndStop copyrightFrame
getURLfunction = function () {
getURL("gotoAndPlay(copyrightFrame");
//? still need to create
};
// function hiding green buttons
hideButtonFunction = function () {
this.settings_mc._visible = false;
this.settings_mc.enabled = false;
this.disclaimer_btn._visible = false;
this.disclaimer_btn.enabled = false;
this.disclaimer_mc._visible = false;
this.disclaimer_mc.enabled = false;
this.favorites_btn._visible = false;
this.favorites_btn.enabled = false;
this.searchBar_mc._visible = false;
this.searchBar_mc.enabled = false;
// also hideButton must become _visible = false
};
showButtonFunction = function () {
this.settings_mc._visible = true;
this.settings_mc.enabled = true;
this.disclaimer_btn._visible = true;
this.disclaimer_btn.enabled = true;
this.disclaimer_mc._visible = true;
this.disclaimer_mc.enabled = true;
this.favorites_btn._visible = true;
this.favorites_btn.enabled = true;
this.searchBar_mc._visible = true;
this.searchBar_mc.enabled = true;
// also hideButton must become _visible = false
};
function menuHandler(obj:Object, menu:ContextMenu) {
if (obj == (enabled=false)) {
showButton._visible = true;
hideButton._visible = false;
} else {
showButton._visible = false;
hideButton._visible = true;
}
}
contextMenu2.hideBuiltInItems();
contextMenu2.builtInItems.zoom = true;
contextMenu2.builtInItems.save = true;
contextMenu2.builtInItems.print = true;
var copyright = new ContextMenuItem("Copyright 2006 (C)", getURLfunction);
var hideButton = new ContextMenuItem("Hide buttons", hideButtonFunction);
var showButton = new ContextMenuItem("Show buttons", showButtonFunction, false, true, false);
contextMenu2.customItems.push(copyright, hideButton);
contextMenu2.onSelect = menuH
[F8] External JPG Loads Into MovieClip, But Mask Doesn't Work, JPG Not There
It's all in the title!
I'm loading a JPG into a movieclip. This movieclip has an animated mask on it.
The picture definitely loads as the preloader percentage I have is working! But when it reaches 100% and is told to start the next frame of the movieclip, the animation works (2 lines crossing paths, mask rectangle grows to show photo) there is NO PHOTO!
What should I be looking for? Can this be done in Flash 8? (Mask Moviclip with external JPG)
Urgnetly need help! Thanks!
GoToAndPlay Action Doesn't Work From Inside A Movieclip?
I have a button that is 2 levels under the main timeline inside of a movieclip and it will not accept a simple "onrelease gotoandplay" action. do i need to add something in the code to tell it to play on the root timeline?
Right now it just says:
on (release) {
gotoAndPlay("testimonials", 11);
}
and it's two levels under the root timeline.
MovieClipLoader.loadClip Doesn't Work, But MovieClip.loadMovie Does?
ActionScript Code:
private function init()
{
var mclLoader:MovieClipLoader = new MovieClipLoader();
var objLoadListen:Object = new Object();
var mcTarget:MovieClip = _mcParent.createEmptyMovieClip("_mcGraphic" + _nCounter.toString(), _mcParent.getNextHighestDepth());
/*objLoadListen.onLoadStart = Delegate.create(this, onLoadStart);
objLoadListen.onLoadProgress = Delegate.create(this, onLoadProgress);
objLoadListen.onLoadComplete = Delegate.create(this, onLoadComplete);*/
objLoadListen.onLoadInit = Delegate.create(this, onLoadInit);
//mcTarget.loadMovie(_strFile); //This Works...
mclLoader.addListener(objLoadListen);
mclLoader.loadClip(_strFile, mcTarget); //This Doesn't...
}
Code is pretty simple...for some reason the loadMovie statement processes fine, but the loadClip statement does not. No error, no nothing...it just doesn't load the image.
Button Inside Symbol(movieclip) Doesn't Work. Plz Help. Thanks
I created a drop down menu which contains 3 buttons(home, contact, game). I had tried to put onRelease on its button itself, it couldnt work. Same as another method which the script on the layer actions. Can anyone please tell what is wrong with my flash? I'm still begginer in flash and i'm really clueless now. I had attached my file into this thread. Please have a look. Thousand thanks
Rollover Buttons Inside Movieclip Doesn't Work
Hi guys
sorry i have this stupid beginner problem here
and I have tried to search related issues but I still can't figure the way to make my buttons work
http://www.angiehu.com/upload/showroom/test2.fla
here is my fla file...
Basically I have a rollover buttons inside a movieclip and my action script in the first frame of the scene is the following
_root.designer_mc.b1_01.onPress=function(){
goto("designer01");
}
b1_01 is the instance of the button inside designer_mc movieclip~ however I realized that buttons won't work in movieclip
and i just don't know what's other solution
I will be really appreciated if anyone can teach me how to get this fixed~ i m so stuck and I have wasted my past 2 days trying to figure this out and still no result...
I have learned flash at least 5 years ago and now I found out that actionscript works a lot different than before and I can't make things work (damn it)
MovieClip.prototype And Return Doesn't Work, Trace Does?
Hi all,
I am trying to put together a movieclip prototype, like
Code:
MovieClip.prototype.generateWord = function() {
words = new Array();
//prepare to load our external .txt
//our ext. variable is wordlist
//and get a random word
lv = new LoadVars();
lv.onLoad = function() {
fl = this.wordlist;
words = fl.split("|");
//get a random word
k = Math.floor(Math.random()*words.length);
word = words[k];
trace("word "+word]);
};
lv.load("data.txt");
return word;
}
which I want to use like
Code:
MC.randomText.text= generateWord();
Now the
Code:
trace("word "+word]);
part works but
Code:
return word;
doesn't I think or am I using return completely wrong???
Please advice
Loaded XML Info Doesn't Work When The Movie Is .loadMovieNum'd. Is Fixable?
I've got an swf file that is a calendar that loads information from some xml files that are located in the same directory. It works fine as a stand-alone swf file, but I need to load this movie into a main interface (swf file that is a graphic that looks like a window border). When I use the LoadMovieNum() method, the file shows up, but the XML data hasn't been parsed.
Is this something that I may be doing wrong (in which case I'll look further into it) or is this just a limitation of Flash that I have to live with?
Vic :-)
Guestbook Doesn't Work When Loaded Into Empty Movie Clip?
I use flash mx (6)
I will initially explain my problem before I upload any files to the forum or the server and pray to god you can help (I have a deadline approaching)
I have made a simple site with some simple transitions. each button on my site loads in an external swf file into an empty movie clip.
One of these swf files is a guestbook which works when i dont load it into the empty clip and test it alone on my server (sending in the guestbook swf, html, php, and empty text file)
Now then, when i load in the guestbook into the main swf, nothing happens on the server when I test it - I am lost and now come to you people for advice. It obviously has something to do with being loaded into an empty movie clip that is causing conflict.
I am very new to actionscript and know nothing about php. As I said earlier, I will upload any files for you to look at but I thought i'd ask first, so you could have a think about whether or not you might be able to help.
I DESPERATELY need help here.
Thank you very much.
Guestbook Doesn't Work When Loaded Into Empty Movie Clip?
I will initially explain my problem before I upload any files to the forum or the server and pray to god you can help (I have a deadline approaching)
I have made a simple site with some simple transitions. each button on my site loads in an external swf file into an empty movie clip.
One of these swf files is a guestbook which works when i dont load it into the empty clip and test it alone on my server (sending in the guestbook swf, html, php, and empty text file)
Now then, when i load in the guestbook into the main swf, nothing happens on the server when I test it - I am lost and now come to you people for advice. It obviously has something to do with being loaded into an empty movie clip that is causing conflict.
I am very new to actionscript and know nothing about php. As I said earlier, I will upload any files for you to look at but I thought i'd ask first, so you could have a think about whether or not you might be able to help.
I DESPERATELY need help here.
Thank you very much.
|