Problem With Path Of Movieclip
i am making a little window with the flash drawing api, and im having a slight problem. first, the code:
function createWindow(where){
where.createEmptyMovieClip("window", 10000001)
}
function rectangle(mc, x, y, w, h){
with(mc){
lineStyle(1, 0x999999, 100)
moveTo(x, y)
lineTo(x+w, y)
lineTo(x+w, y+h)
lineTo(x, y+h)
lineTo(x, y)
}
}
function win(x, y, w, h, name, depth){
Name=new String(name)
window.createEmptyMovieClip(Name, depth)
with(Name){
rectangle(Name, x, y, w, h)
}
this.name=Name;
}
createWindow(this)
window.wins=[new win(5, 5, 195, 10, drag, 100000101),
new win(5, 18, 195, 15, title, 100000202),
new win(5, 38, 195, 100, main, 100000303),
new win(5, 146, 195, 13, status, 100000404),
new win(15, 50, 175, 70, content, 100000505)];
what I originally thought this would create was a container movie clip called "window", and then the movieclips "drag", "status", "title", "main" and "content" inside it.
but then one function called for content's visible to be false.
so i tried
content._visible=false; //didnt work
_root.content._visible=false; //didnt work
window.content._visible=false; //didnt work
_root.window.content._visible=false; //didnt work
what do i do? what am i missing? thanx in advance for your help
FlashKit > Flash Help > Flash Newbies
Posted on: 09-01-2002, 11:19 AM
View Complete Forum Thread with Replies
Sponsored Links:
Path Confusion To Movieclip Inside Another Movieclip
I'm trying to get the right path to my embedded movieclips.
I have movieclips (I'll call baby1_mc) loading into another movieclip (I'll call it the momma_mc)
Then from the main time line I want to check if the movieclip that loaded is baby1_mc or baby2_mc, etc.
How do I target the babies to check which moviclip they are?
Thanks so much!
And if you have any questions, just let me know.
View Replies !
View Related
Movieclip Path
I am trying to get to a movie several levels in. I can only make it part way before it stops.
_root.centermovie.gotoAndStop(15);
_root.centermovie.displays.gotoAndStop(8)
this only gets me to the frame 15 and stops. i need to go into the movie "displays" which is on frame 15 and then go to another movie on frame 8 of "displays"
View Replies !
View Related
Change Movieclip 'path' ..
Hi,
I used to have this piece of code when pressing a button to retrieve variables:
-----------------------------------------------
for (i=0; i<Descriptions_length; i++) {
this["parameter" + i]=this["MyMovie" + i].checkbox.getValue();
this["idnumber" + i]= this["MyMovie" + i].idnummer; }
-----------------------------------------------
Because I wanted to use the mask tool, I had to create an new movieclip where I had to put the items of 'MyMovie' into this 'child'- movie which I named MyMovieB.
How do I retreive these values based on the above piece of script.
I tried:
--------------------------------------------------
this["parameter" + i]=_root.MyMovie["MyMovieB" + i].chkbox.getValue();
--------------------------------------------------
It didnt work of course
Can anyone help me please?
Kind regards
Patrick
Patrick
[Edited by cuboctahedron on 08-04-2002 at 04:19 PM]
View Replies !
View Related
Attaching Movieclip To A Path
hi
im just getting started in AS, using MX.
how can i attach a movieclip to a path on the stage, and have it follow the path at a given speed and direction?
just a push in the right direction would be great.
thanks
ben
View Replies !
View Related
Path To Scene In Movieclip?
hello!
I have two movie clips and would like to make a path from Movieclip 1 to a scene in Movieclip 2.
currently i'm using this script...
on (release) {
_root.loadMovie("Movieclip_2.swf", "theClip");
}
...this script is working, however, it can only take me to the first scene of the Movieclip 2.
Is it possible to make a link to a different scene in Movieclip 2?
thanks in advance.
View Replies !
View Related
Path To Frame 2 In MovieClip
I have this code on a button. Why wont it start on frame 2 of the movieclip I have on the frame labelled "movie2".
It starts playing at frame 1 no matter what digit I set it to.
on (keyPress "2") {
_root.gotoAndPlay("movie2", 2);
}
View Replies !
View Related
Help With Movieclip Path Isssue
I need some help. I'm planning to have the the following rollover code for about 5 buttons. In order to shorten the code a little I'm trying to set a variable ("var rlpath") with the target path info so I don't have to have 5 "rollovertxt" & 5 "rollouttxt" functions.
It seems that "[rlpath]setTextFormat(txtbg);" isn't working right. I also tried "rlpath.setTextFormat(txtbg);" neither of which seem to work. Any thoughts?
code:
var rlpath:MovieClip = _root;
_root.mc_nav.mc_1.onRollOver = function(){
lar1.start();
var rlpath = _root.mc_nav.mc_1["txt1"];
trace("rlpath = " + rlpath);
};
_root.mc_nav.mc_1.onRollOut = function(){
sm1.start();
};
_root.mc_nav.mc_2.onRollOver = function(){
_root.mc_nav.mc_2.txt2.setTextFormat(txtbg);
};
_root.mc_nav.mc_2.onRollOut = function(){
_root.mc_nav.mc_2.txt2.setTextFormat(txtsm);
};
function rollovertxt(){
[rlpath]setTextFormat(txtbg);
}
function rollouttxt(){
[rlpath]setTextFormat(txtsm);
}
View Replies !
View Related
MovieClip Path Evaluation
Hi everybody,
please don't you know, how to evaluate string MovieClip path that contains nested MovieClips?
e.g. this won't work:
var path : String = 'window_mc.button_mc';
var clip : MovieClip = _root[path];
is there a simple way (like deprecated eval) or should I have a loop and evaluate each dot-separated tail of the string?
Thanks
View Replies !
View Related
Full Path To A Movieclip
hi, my question is: is there a way other than running iterations to determine the full path of a movieclip? i.e. if my movieclip is _root.MC1.btn.baseMC, when i trace _name it only returns "baseMC", is there a way to trace to "_root.MC1.btn.baseMC" ?
View Replies !
View Related
MovieClip Path In Variable
hello, i am storing movieclip paths into an array. I am having a problem assigning properties to the movieclips using the array.
Code:
//i am looping through the movieclips and assigning the paths in this array
thumb_order.push([this,this.my_full_url,this.my_thumb_url]);
//later in the code
for (z in thumb_order){
if (thumb_order[z][1] == url){
trace (" FOUND ONE!!!! "+thumb_order[z][0]);
selected_thumb = eval(thumb_order[z][0]);
trace(selected_thumb);// this traces: _level0.thumbs.blank_mc.thumb_6
with(selected_thumb){
_alpha = 100;
}
}
}
but the with(selected_thumb) statement does nothing. I have also tried
Code:
for (z in thumb_order){
if (thumb_order[z][1] == url){
trace (" FOUND ONE!!!! "+thumb_order[z][0]);
var selected_thumb:MovieClip = eval(thumb_order[z][0]);
trace(selected_thumb);
with(selected_thumb){
_alpha = 100;
}
}
}
but the Output says that selected_thumb Object does not exist
Any help would be nice, thanks!
View Replies !
View Related
Drag A Movieclip Along A Path
Hi Every one
How to drag an movieclip along a path.
Example:
Lets assume that sun(Graphic) in the center, Earth(Graphic) moves round the sun (Elliptical path).
I want to drag and move the earth along the path.
I am unable to do this.
Please suggest me.
Thank you.
View Replies !
View Related
Path To MovieClip Problem
Hi all
I have a main.swf file which contains firstly a navigation bar and secondly an empty movie clip with an instance name of 'main_content' into which I load my external swf files depening on which button is pressed in my navigation bar.
The external swf files that are loaded are made up of 2 movieclips. One called 'sub_menu' and the other called 'images'.
The 'sub_menu' contains 5 thumbnail movieclips each with an instance name 1, 2, 3, 4 and 5 respectively and they have 2 keyframes each (a mouse over and out effect - i.e. the alpha changes on the 'over' effect.) I have this part working fine so when a user clicks these thumbnail images, the content changes in my 'images' movieclip and the over and out efects work great. However...
What I am trying to achieve is to simply make the 1st thumbnail in my 'sub_menu' movieclip set to the 'over' state (keyframe 2) when it is loaded into my main.swf file by clicking its navigation item. Thus giving the impression it is already selected by default.
I have the following code placed on one of my navigation buttons. All works fine except the last line where I keep getting actionscript syntax errors:
this.onRelease = function() {
_root.main_content.loadMovie("section2.swf");
_root.main_content.sub_menu.1.gotoAndStop("over");
};
Can anyone elighten me on what is the problem or how I can achieve this by simply telling the movie clip thumbnail to set itself to the 'over' keyframe?
Thanks in advance.
View Replies !
View Related
Target Path To A Movieclip In AS3
Hello,
In AS2, I would do this to store a reference to a movie clip:
var mc_mymovieclip:Movieclip = _root.mc_world.mc_continent;
Thereafter, I could use mc_mymovieclip in my class.
In AS3, doing the same thing does not work.
How can I do that (if possible) ?
Best regards.
View Replies !
View Related
Path To Movieclip In External Swf
Hello!
I have embedded a external swf in a movieclip called "container". In the external swf is a movieclip "black_rectangle".
How do I have to write the path to this rectangle? My version doesnt't work and i have no idea why not
Code:
_root.container.loadMovie("unterverzeichnis/unterseite.swf");
_root.container.black_rectangle._alpha = 13;
thanks!
View Replies !
View Related
Drag Movieclip Along Path?
I'm having trouble finding information on how to drag a movieclip along a specified path (ideally only using 1 frame).
So as you drag the movie around it sticks to the path assigned to it. I want the ability to move backwards and forward on the path. So not just animate.
Has anyone seen a good source of information on this?
Thanks
View Replies !
View Related
Changing MovieClip Path
Can you change the path of a movieClip? like from
_root.obj
to
_root.mc.obj
?
I don't need to do this for variables, I'm doing this because I'm preloading graphics from an external file and I want to then from the image container place them into the other movieclips that need them. Is there anyway to just link the graphics from another movieclip like with variables?
View Replies !
View Related
What Path To Use For Variables When The .swf Will Be Loaded Into Another Movieclip?
Basically exactly what the title says. In a .swf, I create movie clip objects in a for loop like so:
Code:
_root.createEmptyMovieClip("box"+i,i);
var newMC = eval("box"+i);
I know, _root is bad because now when I have a movieclip in another file that loads this .swf, it doesn't draw the objects (I use newMC to draw the objects dynamically). I'm assuming this is because I've created the movieclip in _root, and it's trying to display within a movieclip, thus the info is inaccessible?
But how should I create the empty movie clip? I tried _level0 and that didn't work either.
View Replies !
View Related
Dynamic MovieClip Path Reference
Hey everybody,
i'm currently writing an actionscript class which extends the movie clip class. The class creates some new movieclips depending on the properties set on the instance of the class. In the class i have the following function to fetch the depth of a newly created instance..., but it doesn't work. I have rewritten this thing a billion times but for some reason i just cant seem to get it to work.
inside the class:
Code:
private function setDepht(target:Array){
if(target){
var path:String = new String("");
for(var i in target){
path += "."+target[i];
}
this.depth = [path].getNextHighestDepth();
}else{
this.depth = _root.getNextHighestDepth();
}
}
the function is called like this: this.setDepth(new Array([_root], ["somemovieclip_mc"],["someotherMc_mc"]));
What is this deal with dynamic paths in AS?
Thanx in advance
Marijntje
View Replies !
View Related
Defining A Path From A Movieclip To A Scene?
I'm building a cd-rom with various scenes (in flash mx),
the navigation is in a movieclip on the scene,
when I try to assign an action to the buttons in that movieclip to go to another scene it doesn't work, this is what I have tried:
on(press){
_parent.gotoAndSop("scenename",1);
}
(have also tried _root and level0 in place of _parent)
I figure that flash can't find the path to the other scenes from inside the movieclip but I thought that's what the _parent was for??
any help would be appreciated,
thanks
gen
View Replies !
View Related
Target Path From An Attatched Movieclip
I'm having some insanely annoying problems with my interface at the moment. I can't seem to target the main _root timeline from inside a movieclip that has been attatched to a "container" movieclip using attatchMovie method.
The code is on a "back" button within the attatched movieclip, the "container" clip is empty. There is a lot of code on the back button though. I want the back button to execute all the functions and setting variables etc, then just send the _root timeline to appropriate place so i can add content easier.
I can post a .fla at about 7/8pm UK time, but i thought i'd try explaining it now.
Thanks!!
View Replies !
View Related
Help On Path Of Movieclip Within Duplicated Button
I need help on path of movieclip within a duplicated button. I need to access the movieclip so I can say gotoandplay(10); the duplicated buttons instance name is "mc"+i(mc1,mc2,...).the movieclip instance name is idiot.
Ive tried _root["mc"+i].idiot.gotoandplay(10); but no luck. zny help would be greatly appreciated.
View Replies !
View Related
Changing Movieclip Path With Variables
If I want to change a set of movieclips that all have the same name except they end in a different number i.e
movieclip1
movieclip2
movieclip3
whats the correct actionscript to refer to a movieclips path in terms of the name plus a numerical variable i.e
movieclip + var
so I can cycle through each one by altering the variable.
something like
var x = 1;
_root."movieclip" + x.othermovieclip.gotoAndPlay(1);
my attempts don't seem to have worked!
View Replies !
View Related
_parent Path/movieclip Issue
I have attached the .fla to explain a little clearer
I have a timeline with 4 movieclips in it. each movieclip has its own timeline too. Within each movie clip is a button telling teh _parent timeline to jump up a level and stop on a certain frame. Whilst there also stop the movieclip that resides on that frame. The later doesn't work???
Not sure why but the A/S doesn't seem to pick up the path to the second movieclip 'twoloopms'
Within scene 1 > 1loopms (mc) the right hand next button can find the parent level fine:
this._parent.gotoAndStop(176);
On this main top level it stops and the movieclip which sits in that keysframe plays automatically, even when I say:
this._parent._parent.twoloopms.gotoAndStop(54);
I am sure it should just work!!!
Any suggestions would be more than welcome
View Replies !
View Related
Need To Change Path To Container Movieclip
Hi guys,
I've been going through the Transitions Between External SWF tutorials and all is going well except I wish to situate my buttons in a movieclip and not on the main timeline as the tutorial teaches.
The tutorial does point out; 'If your buttons are not located on the main timeline, you will have to change the path to the container movieclip. If your buttons are not on the main timeline, you must change container to the appropriate path.'
Does anyone know how I'd do that to the below code? (for some reason the code tags were messing up so I've just copy and pasted.)
on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = "main";
container.loadMovie("main.swf");
} else if (_root.currMovie != "main") {
if (container._currentframe >= container.midframe) {
_root.currMovie = "main";
container.play();
}
}
}
If anyone can point out what I need to alter - THANK YOU in advance!
View Replies !
View Related
Need To Change Path To Container Movieclip
Hi guys,
I've been going through the Transitions Between External SWF tutorials and all is going well except I wish to situate my buttons in a movieclip and not on the main timeline as the tutorial teaches.
The tutorial does point out; 'If your buttons are not located on the main timeline, you will have to change the path to the container movieclip. If your buttons are not on the main timeline, you must change container to the appropriate path.'
Does anyone know how I'd do that to the below code? (for some reason the code tags were messing up so I've just copy and pasted.)
on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = "main";
container.loadMovie("main.swf");
} else if (_root.currMovie != "main") {
if (container._currentframe >= container.midframe) {
_root.currMovie = "main";
container.play();
}
}
}
If anyone can point out what I need to alter - THANK YOU in advance!
View Replies !
View Related
Reaching A MovieClip From A String Path
Hello everyone
I have the path to a movieclip, in a string format. For example:
var pathString:String = "container.boxMC.ball"
I want to be able to reach that movieclip type (ball). I tried using something like getDefinitionByName(pathString), but gives me the error:
Variable ball is not defined.
Any ideas?
View Replies !
View Related
Movieclip Scrolling Fixed X And Y Path?
I have a gigantic movieclip which is something like 12000 pixels by 2800. As user you scoll through this movieclip. The x scrolling is always 20 pixels but the y scrolling changes a lot, you follow a line who moves randomly up and down (it's a mountain). In the movieclip I have put a lot of walls and when you pass them, the ySpeed changes. it goes something like this:
Code:
public function movemeright(evt:Event) {
if (topleft==true) {
if (camerastage.hitTestObject(mountain.cameramove_1)) {
bergsnelheidY=10;
trace("1");
}
if (camerastage.hitTestObject(mountain.cameramove_2)) {
bergsnelheidY=-4;
trace("2");
}
if (camerastage.hitTestObject(mountain.cameramove_3_1)) {
bergsnelheidY=0;
trace("3.1");
}
if (camerastage.hitTestObject(mountain.cameramove_3)) {
bergsnelheidY=20;
trace("3");
}
rightMoveTween()
}
public function rightMoveTween():void {
TweenLite.to(mountain,mountaintime, {x:mountain.x-standaardsnelheid, y:mountain.y+bergsnelheidY});
}
This is only a snippet and it seems in my eyes really time-consuming, it could be a lot more compacter I think. Is there a way where I can say: the Line.mc has always to be 100 pixels above stage.width?
View Replies !
View Related
Drag Movieclip Along Horizontal Path
I know this is easy but, for the life of me, I cant find it
I have a mc called reddot. I want to move reddot along a horizontal line, and only a horizontal line.
My Code:
Code:
//drag red dot
_root.content_mc.content1_mc.reddot_mc.onPress = function(){
this.startDrag();
this.onMouseMove=function () {
this.moveTo(40, _ymouse);
}
}
_root.content_mc.content1_mc.reddot_mc.onRelease = function(){
stopDrag();
}
Its not working and i know i need to do something simple. I've been away from actionscript for a year and man I'm rusty!
Thanks for any help
Greg
View Replies !
View Related
Need To Change Path To Container Movieclip
Hi all, I have a typical Newbie question. Brace yourselves...
Basically, I have this code to load external movies:
Code:
on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = "page1";
container.loadMovie("page1.swf");
} else if (_root.currMovie != "page1") {
if (container._currentframe >= container.midframe) {
_root.currMovie = "page1";
container.play();
}
}
}
However, the code is placed within a movieclip off the main timeline and a note on the tutorial I used says:
If your buttons are not located on the main timeline, you will have to change the path to the container movieclip. In this example the buttons are located on the main timeline, therefore 'container' targets the container movieclip correctly. Though, if they are not on the main timeline, you must change container to the appropriate path.
Does anyone know what I need to do to change to the path of the container correctly? I made a few _root. corrections but nothing seems to work. I think I'm missing the obvious.
Also - I bit of a side question - The external movies I am loading use:
Code:
this._lockroot = true;
ActionScript. Would this disrupt all the _root. commands the above code is using? (the buttons to load the external movies are placed in the main.swf, which loads the external movies via a container movieclip)
(^ Hope that makes sense!)
View Replies !
View Related
Variable Representing Movieclip Path
Hi guys,
Here is a sample of my code, that fades out the 'about us' section of the website that i am working on at the moment:
ActionScript Code:
function gotothesection() {
speedvar = 5;
_root.attachMovie(gotosection +"_mc_01", gotosection +"_01", _root.getNextHighestDepth(), {_x:485, _y:5});
_root.attachMovie(gotosection +"_mc_04", gotosection +"_04", _root.getNextHighestDepth(), {_x:102.8, _y:5});
_root.attachMovie(gotosection +"_mc_02", gotosection +"_02", _root.getNextHighestDepth(), {_x:4.9, _y:5});
sectionone._alpha = 0;
sectiontwo._alpha = 0;
sectionthree._alpha = 0;
_root.createEmptyMovieClip("section_mask", _root.getNextHighestDepth());
_root.section_mask.moveTo(0,0);
_root.section_mask.beginFill(0x000000);
_root.section_mask.lineTo(730.2,0);
_root.section_mask.lineTo(730.2,467);
_root.section_mask.lineTo(0,467);
_root.section_mask.lineTo(0,0);
_root.section_mask.endFill();
_root.section_mask._x = 4.9;
_root.section_mask._y = 5;
_root.section_mask._width = 200;
duplicateMovieClip(section_mask, "section_mask2", _root.getNextHighestDepth());
_root.section_mask2._x = 4.9;
_root.section_mask2._y = 5;
duplicateMovieClip(section_mask, "section_mask3", _root.getNextHighestDepth());
_root.section_mask3._x = 4.9;
_root.section_mask3._y = 5;
_root.section_mask2._width = 334.9;
_root.section_mask3._width = 500;
_root.about_01.setMask(_root.section_mask);
_root.about_04.setMask(_root.section_mask2);
_root.about_02.setMask(_root.section_mask3);
_root.createEmptyMovieClip("nextsection_mc", _root.getNextHighestDepth());
_root.nextsection_mc.onEnterFrame = function() {
speedvar = speedvar * 1.1;
_root.section_mask._width += speedvar;
_root.section_mask._x = 735.1 - _root.section_mask._width;
_root.section_mask2._width += speedvar;
_root.section_mask2._x = 735.1 - _root.section_mask2._width;
_root.section_mask3._width += speedvar/1.6;
_root.section_mask3._x = 735.1 - _root.section_mask3._width;
_root.about_01._alpha += 3;
if (_root.about_01._alpha >= 100) {
_root.about_01._alpha = 100;
}
if (_root.section_mask2._width > 348) {
_root.about_04._alpha += 5;
if (_root.about_04._alpha >= 100) {
_root.about_04._alpha = 100;
}
}
if (_root.section_mask3._width > 630) {
_root.about_02._alpha += 7;
if (_root.about_02._alpha >= 100) {
_root.about_02._alpha = 100;
goawaysection = gotosection;
removeMovieClip(_root.section_mask);
removeMovieClip(_root.section_mask2);
removeMovieClip(_root.section_mask3);
removeMovieClip(_root.nextsection_mc);
delete _root.nextsection_mc.onEnterFrame;
}
}
}
}
What i want to be able to do is use this code for the other sections ... I have a variable called gotosection that changes from "home" to "about" etc which I could use, and have done at the top of the code to attach the movieclips to the stage. However, i can't seem to get this variable to work for the rest of the code, basically i just need to replace all the instances of "about" in the above code to the gotosection variable.
Could someone please help me with this.
Thanks in advance
Bongo
View Replies !
View Related
What Path To Use For Variables When The .swf Will Be Loaded Into Another Movieclip?
Basically exactly what the title says. In a .swf, I create movie clip objects in a for loop like so:
Code:
_root.createEmptyMovieClip("box"+i,i);
var newMC = eval("box"+i);
I know, _root is bad because now when I have a movieclip in another file that loads this .swf, it doesn't draw the objects (I use newMC to draw the objects dynamically). I'm assuming this is because I've created the movieclip in _root, and it's trying to display within a movieclip, thus the info is inaccessible?
But how should I create the empty movie clip? I tried _level0 and that didn't work either.
View Replies !
View Related
Drag A Movieclip Along Oval Or Circle Path AS 3.0
Hi gang,
I'm looking for either a link to a tutorial or any general suggestions about how to implement dragging (dragging part is important) a movieclip along a shaped path (as in "oval" or "circle") in AS 3.0. Is there any way to dynamically instantiate a motion guide? The solution could use paths/motion guides either dynamically generated or drawn with drawing tools, it' makes no difference to the outcome as far as I am concerned. Any help or suggestions or links to tutes would be sincerely appreciated.
View Replies !
View Related
Setting File Path For Loaded Movieclip
I have a large collection of flash movies stored in different folders. These movieclips are loaded by a master flash menu application using loadMoviceClip. The problem I have run into is that the movieclips I load in turn loads other movieclips that are located relative to THEIR file root. The problem is that the file root of the MASTER flash file, the loader, are used as file root. Is there a way to set the file root for a loaded movieclip ? I do not want to change the load routines in the MC's I load since there are thousands of them..
View Replies !
View Related
Brain Fart - Targeting A Movieclip - Path Problem
Hello everyone,
Well I have a very basic question...it deals with paths...and I always seem to have a bugger of a time getting these things to work. I figured what the heck...why not try the friendly folks at Flashkit. Having said this, here is my problem.
I have made a flash movie which is entirely composed of actionscript. It titled "initialize_prestige_interactive.swf." I don't have any images or anything on it. Its actionscript simply loads a bunch of movies into the correct xy coordinates. Below is a snippet of the code used to do this.
//Portfolio Button - loads the services SWF file into the main time line.
function openPortfolio() {
_root.createEmptyMovieClip("siteContentPage_mc",_r oot.getNextHighestDepth());
_root.siteContentPage_mc.loadMovie("../content/content_portfolio.swf");
_root.siteContentPage_mc._y=160;
_root.siteContentPage_mc._x=0;
}
/* THIS IS NOT WORKING
portfolio_btn.onRelease = function()
{
openPorfolio();
};
*/
"Ignore the this is not working comment", as I have it working another way, and will worry about this on another day.
As you can see, I have a function that has a movie clip created with the name "siteContentPage_mc", and it is here that the portfolio page is loaded. Well, on the portfolio page, there are a number of buttons that I want to have load additional movies into a mc clip titled "load_portfolio".
Currently, I have the porfolio page set up to load a random swf file containing the information of one of my former clients. When I run the individual portfolio file on its own, it works wonderfully. When I run it through the initialize file, it cannot retrieve the client content that is to be randomly displayed. I know I have the paths messed up, and have tried a number of differing combinations.
Here is the code I am using....
choice = Math.round(Math.random()*9);
switch (choice) {
case 0 :
_root.load_portfolio.loadMovie("portfolio/port0.swf");
break;
case 1 :
_root.load_portfolio.loadMovie("portfolio/port1.swf");
break;
case 2 :
_root.load_portfolio.loadMovie("portfolio/port2.swf");
break;
case 3 :
_root.load_portfolio.loadMovie("portfolio/port3.swf");
break;
case 4 :
_root.load_portfolio.loadMovie("portfolio/port4.swf");
break;
case 5 :
_root.load_portfolio.loadMovie("portfolio/port5.swf");
break;
case 6 :
_root.load_portfolio.loadMovie("portfolio/port6.swf");
break;
case 7 :
_root.load_portfolio.loadMovie("portfolio/port7.swf");
break;
case 8 :
_root.load_portfolio.loadMovie("portfolio/port8.swf");
break;
case 9 :
_root.load_portfolio.loadMovie("portfolio/port9.swf");
break;
}
I've tried something to this extent.....
case 9 :
_root.siteContentPage_mc.load_portfolio.loadMovie( "portfolio/port9.swf");
break;
Well as you can see, I am not a programmer..though I wish I was. I'd make millions..hehhehe...the site I am making can be viewed at www.prestigeinteractive.com.
ps. anyone know how I can get a cute graphic (avatar) by my name..hehehe...
Thanks a bunch for your help,
Greg W.
View Replies !
View Related
Movieclip Playing Inside A Button....problem With Layer Path Crap
I have a button with code on it that effects a movieclip within said button. For some reason i can't get the commands to the movieclip...I don't really understand all that _child _parnet stuf so it's probly what i need to do here...this is the code i need to send to the movieclip within the button
on (rollOver) {
menu1.stop();
fra = menu1._currentframe;
if (fra>12 and fra<24) {
menu1.gotoAndPlay(fra-12);
} else {
menu1.play();
}
}
on (rollOut) {
menu1.stop();
fra = menu1._currentframe;
if (fra<12) {
menu1.gotoAndPlay(fra+12);
} else {
menu1.play();
}
}
View Replies !
View Related
Duplicate Movieclip Multiple Times Behind Lead Clip On A Motion Path
I dont know if any of you are familiar with the "flurry" screensaver on a mac? basically a bunch of streams of light moving expanding and disappearing randomly. I want to recreate something similar to this in flash.
I've tried to create a onEnterFrame function and it's not doing what I want of course. I AM a newby... My thinking is if I can create an empty movieclip, and inside of it create this animation of a glowing ball along a motion guide that might be transformed larger at one point in the path, then I can write code on the main timeline frame 1 of the empty movieclip containing the motion guide animation. Something that will repeat the duplication of the movie clip as its moving along the path and have each duplicate follow the lead. Ideally, the opacity of these clips would decrease on each duplication.
my weak attempt:
targetMC.onEnterFrame = function () {
_root.targetMC.duplicateMovieClip ("targetMC"+"x", x );
x++;
}
View Replies !
View Related
"Split A String (movieClip Path)"
Hi all you flashers.
I have a problem here that I'm trying to solve but with no sucess.
I made a dynamic xml picture thumbs and now I want it to show a bigger picture when pressing the right thumb.
So when I press the picture thumb goes like this:
Code:
var conversio:String= this; // I only made like this because the thumbs are duplicated MovieClips Ex: duplicateMovieClip(this,"container_mc"+i,i)
trace(conversio); //gives me "_level0.instance1.scrollMovie.container_mc0" where "0" is thenumber of the clip
//Now when I do this, it doesn't work
var split:Array = conversio.split("_");
for (var i = 0; i<split.length; i++) {
trace(split[i]);
//clip = split[i]; my objective is to know the movieClip NUmber "container_mc0"
}
I someone knows another way to show a big picture by pressing the thumb, hey I'm open to new ideas
Thanks
View Replies !
View Related
Using Eval Function And Variable In A Path (target Path)
Hello,
I have to reprogram some of my website and it calls to conjugate strings in a way that's beyond my understanding. Please help me with some suggestions. Kind regards.
the original code is:
code:
if (_global.useCount<10) {
//hide
var diff = 10-_global.useCount;
for (diff; diff>0; diff--) {
eval(String(11-diff))._visible = false;
}
}
There are buttons named 1 to 10 and this turns off the ones that are not used. Now I want to nest those buttons in subclip "buttonsRow", instead of having them on main timeline. How do I rewrite that code to make it work with new path?
I have already tried the "associative array" method, but it don't really know how to pack the whole eval function in there. I've tried many combinations, like:
code:
this.buttonRow[eval(String(11-diff))]_visible = false;
//or
this.buttonRow["eval(String(11-diff))"]_visible = false;
//or
buttonRow[eval(String(11-diff))]._visible = false;
//or
buttonRow["eval(String(11-diff))"]._visible = false;
//or
buttonRow[eval(11-diff)]._visible = false;
// or
buttonRow[8]._visible = false;
//the last one at least turns off button 8, lol
Some of those return syntax error and some just don't work. Anyone have any ideas? Thank you again.
View Replies !
View Related
Cannot Export An Avi Of Motion Along A Path When Path Is Specified With Action Script
Hello!
I have the following problem: I am using Flash 8 Professional to produce a series of avi files showing the motion of a dot along different paths. Whenever I use the drawing tools to draw the path everything is all right: I can export both a swf and an avi file showing the motion. The problems start when I use action acript to specify the path: then a swf can be exported, but not an avi file (Flash acts as if it is exporting but the avi file produced shows only a stationary dot). Can anybody help me?
View Replies !
View Related
_root.path="http://www.sitename.com/path/FlashSite/"; Script Issue While Online
Hi there,
I inserted _root.path="http://www.sitename.com/path/FlashSite/"; in the beginning of my action script (2.0). This script accessing contents from an access database, which is working fine, when I tested from my local system folder. But no content from database is displaying while it tested from my localserver (127.0.0.1/path/FlashSite) or from online server.
From a search I found it might be the issue with "Network Access Warning". Is there any other reason? If this is the reason, then how can I resolve it?
For example, how should I replace this -
setTimeout( function(){ _root.content01.content02.gotoAndStop("cont_a");}, 1000 );
Thanks in advance
Shine
View Replies !
View Related
Variable Path Name --> Path=_root
instName="inst1";
path="_root";
Element.prototype.setVisible = function(){
[path+"."+instName]._visible=true;
}
I am trying to build a variable path to an instance. Normally I would do something like this[var]._x, but this doesn't work with _root.
Any ideas?
View Replies !
View Related
_root.path="http://www.sitename.com/path/FlashSite/"; Problem While Online
Hi there,
I inserted _root.path="http://www.sitename.com/path/FlashSite/"; in the beginning of my action script (2.0). This script accessing contents from an access database, which is working fine, when I tested from my local system folder. But no content from database is displaying while it tested from my localserver (127.0.0.1/path/FlashSite) or from online server.
From a search I found it might be the issue with "Network Access Warning". Is there any other reason? If this is the reason, then how can I resolve it?
For example, how should I replace this -
setTimeout( function(){ _root.content01.content02.gotoAndStop("cont_a");}, 1000 );
Thanks in advance
Shine
View Replies !
View Related
Wrong Path Given, What Path To Use?, And Why?
Since the beginning of my Flash time, i never solved the 'giving path' problem in Action Script.
Most of the time my paths work, but sometimes they only work in an empty .fla file and not in my homepage.fla file with the code in another scene.
This time it's the code in the timeline (layer: actions, frame 2, scene: control_panel_sc, .fla file: homepage.fla):
stop();
ccbTime.addItem("tidfme2");
I tried naming the path to:
this.ccbTime.addItem("tidfme2");
super.ccbTime.addItem("tidfme2");
_root.ccbTime.addItem("tidfme2");
_parent.ccbTime.addItem("tidfme2");
_global.ccbTime.addItem("tidfme2");
_level.ccbTime.addItem("tidfme2");
_leven0.ccbTime.addItem("tidfme2");
this._root.ccbTime.addItem("tidfme2");
even adding the scene name to it:
this._root.control_panel_sc.ccbTime.addItem("tidfm e2");
etc. (thus the above paths again + scene name)
All paths above don't work, meaning, i can't see the value in a component ComboBox, though in an empty .fla file i do see this value.
Because you can't help me out without actually seeing the .fla file, i uploaded it:
(every link is the same file, so just choose one URL).
http://pcxpert.dyndns.org/homepage.fla
http://pcxpert.dyndns.org/homepage.zip
http://www.uploading.com/?get=YQ0G1UIC zip version
http://www.uploading.com/?get=VWE6WZKO .fla version
http://members.lycos.nl/johnwhello/homepage.fla
http://members.lycos.nl/johnwhello/homepage.zip
ftp://pcxperting:flash@pcxpert.dyndns.org/homepage.fla
ftp://pcxperting:flash@pcxpert.dyndns.org/homepage.zip
Also, you're authorized to change any file at ftp://pcxperting:flash@pcxpert.dyndns.org (the future pcxperting.com that is made by and made for pcxperts)
View Replies !
View Related
AS3 - Path Problem ? Var In Path Problem Not Working
hitrect1_mc.buttonMode = true;
hitrect2_mc.buttonMode = true;
hitrect3_mc.buttonMode = true;
hitrect4_mc.buttonMode = true;
hitrect1_mc.addEventListener(MouseEvent.CLICK , cl1);
hitrect2_mc.addEventListener(MouseEvent.CLICK , cl1);
hitrect3_mc.addEventListener(MouseEvent.CLICK , cl1);
hitrect4_mc.addEventListener(MouseEvent.CLICK , cl1);
function cl1 (e:MouseEvent):void{
xa=e.currentTarget.name.charAt(7);
for (i=1;i<=xa;i++){
targets = "bar"+String(i)+"s_mc";
trace (targets);
soundrect_mc.targets.gotoAndStop(2);
}
well it traces bar1s_mc if it's exact as the code.
if i remove soundrect_mc.targets.gotoAndStop(2); it traces all targets.all 4 of them.How do i make flash recognize "targets" as a path to a movie clip ?
View Replies !
View Related
|