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




Paths To Objects...?



Hi everybody,
I have a prob:
I got a flashmovie (jack.swf), which contains a telltarget command:
on (rollOver) {
tellTarget ("_level0.info") {
gotoAndStop (2);
}
}
info is a movieclip. Ok this works fine, but I want to insert this movie (jack.swf) into an other swf .I do this with the loadmovie action:
loadMovie ("jack.swf", "_level0.target");
Ok, this works fine, too. The problem now is, that when I rollover the button, jack.swf dont do what it should (telltarget...gotoandplay), Flash says:

Target not found:Target="_level0.info" Base="_level0.target"



FlashKit > Flash Help > Flash ActionScript
Posted on: 06-23-2001, 08:20 AM


View Complete Forum Thread with Replies

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

Paths To Objects
I'm having trouble with paths. I'm currently working on a dynamic dealers listing for a boats company and am wondering why Flash isn't recognizing that a button nested far into a tree has been clicked on.

For example:
My Actionscript for the path to the object that is the button that should be detected is:
_root.dealers.globe.northAmericaZoom.canada.canEas t
_root.dealers.globe.northAmericaZoom.canada.canPac ific
...etc.

The button is nested pretty far down, and it's odd that it doesn't work because I have another button that's working fine on the path of:
_root.dealers.globe.globeInner.eurMap.

Can anyone please suggest any possible problems?
Thanks

Paths To Objects
This is in reference to the following tutorial:
http://www.actionscript.org/tutorial...hs/index.shtml

I am a novice to ActionScript and I have been trying to get a button
to load a movie on the stage then get it back to
the button state, (the linked movie covers the stage so no visible
buttons) this movie has no other movies in it.

I tried a method mentioned in one of tutorials on this site:
_root.movieclip1.movieclip2 ,
as my movie only has the one movie to link to,
I modified it to: _root.movieclip1 but nothing happens, I do not get
any debugging errors, just simply nothing when the button is clicked.

I also tried it as the script was intended ( movie within a movie),
same thing. Do each of the movieclips ( movieclip2, within movieclip1) need extra coding to tell it what to do. I have tried stop on the timelines of these clips, still nothing.
I would be most grateful if someone could clarify this for me.

Thanks

Paths To Objects In Different Scenes
Hi,

I have a text variable in scene 2 of my movie and i want it to display a value in a variable in scene 1. What is the path to this?

I have tried text variablename = _level0.variablenameinscene1;

but this doesnt work.

Cheers

Relative Paths With Objects
i have a question about relative paths.

I always try to use relative paths, but when creating objects such as a movieLoader in the _root timeline, relative paths don't work, and i have been forced to use absolute paths. for example, in the following:
code:
var mclListener:Object = new Object();
mclListener.onLoadInit = function(target_mc:MovieClip) {
_root.bg._x = (Stage.width-_root.bg._width)/2;
_root.bg._y = ((Stage.height-_root.bg._height)/2)+99;

};
var image_mcl:MovieClipLoader = new MovieClipLoader();
image_mcl.addListener(mclListener);
image_mcl.loadClip("bgs/back.jpg", this.bg);

i have to type _root.bg to work. _parent.bg does not work, this.bg does not work. if all of this code is on the _root timeline, and bg is _root level, how do i access bg from inside this clip listener relatively. Thanks.

Paths To Objects And Movieclips Etc.
Yes, I've read the tutorial, but I'm trying to do the same thing backwards. I have a button in a movieclip which tells the main movie timeline to gotoandPlay frame 10

so what I've tried so far is joining

gotoandPlay(10)

with _movieclip._root

but nothing seems so work. Any ideas? I've tried checking other threads but none seem to have this...

Using Variables In Paths To Objects
Hi

I'm wondering how I can use a string in a declared variable for a path to an object. Here's an example:

On the press of a button a variable is declared:

_root.nextsection = "news";



And later on I want to use the string "news" in a path, like this (on a frame action):

if (_root.nextsection == "news") {
this.nextsection.gotoAndPlay(1);

}

As you can see in the second line I'm using the variable name as a path... but this doesn't work.

Any suggestions?
Thanks

Dynamic Paths To Objects
i have two variables that hold the path to an object, levelVar and clipVar.

how would i use these to construct something like this:


Code:
_level2.movieClip._y = 50;
if the level was constant i know i can do this:


Code:
_level2[clipVar]._y = 50;
but this doesn't work:


Code:
[levelVar+clipVar]._y = 50;
cheers, james

Relative Paths From Inside Tween Objects
How can you make a reference to something, using a relative path, when inside a Tween object?

For example:


ActionScript Code:
myTween.onMotionFinished = function():Void {
    trace(this) // Outputs [tween]
    trace(this._parent) // Outputs 'undefined'
}

Targetting Dynamic Paths Within Dynamic Paths...
Hello,

I'm already aquainted with the Advanced Pathing tutorial, but I have a question relating to taking it a step further:

I've created a series of dynamically named empty movie clips, and filled each of them with a dynamically named clip from the library. Now, applying actions and properties to the empty movie clips is easy enough, but my problem is that I can't figure out the syntax for applying actions and properties to the dynamically named clip from the library that is inside the dynamically named empty movie clip.

My first instincts have been to try:

ActionScript Code:
_root[emptyclipname][innerclipname].foo
and when that didn't work, I tried:

ActionScript Code:
_root[emptyclipname].onEnterFrame = function(){
     this[innerclipname].foo
  }

I'm really at a loss here. Is what I'm attempting to do even possible?

Store And Retrieve Array Of Custom Class Objects From Shared Objects.
Hi,

I am stuck up with a problem in ActionScript 2. I am using Flash MX 2004 on windows XP.

I have created 3 custom classes say Parent, Child, and GrandChild. Parent class contains in it an array of its Child objects. Similarly each Child object contains in it an array of GrandChild objects. Also I do have one global array of all the Parent objects.

I want to store this array to the shared objects on specific events(say exiting the session) and then reload them from the shared object(on next session startup). I am able to store the global array to the shared object but when I try to retrieve the same array from shared object, I could not do it. The retrieved array is not of my custom class type [Parent].

Help needed to solve this problem urgently. Does anybody have idea how to do it??

Thanks in advance.



Cheers,
Naishadh Sevalia

Objects Talking To Objects, Parent/child Communication, Scope
I've been using AS3 at an intermediate level, and am getting deeper
into classes. I'm loving classes! I'm just cloudy on a few general
concepts.

It's easy for me to create a child object from a parent object, like a
ship in space for example (not working with ships right now but seems
fun to talk about). I can then navigate the ship from the parent
object.

What happens if the ship's engine temperature reaches critical? Is it
wise to dispatch a ship event that tells space that my ship is nearly
scrap? Or do I periodically query the temperature amount of the ship
from space? To me an event sounds like the solution, but I remember
hearing somewhere that parent objects should only talk to child
objects, not the other way around. Is this true?

Could I trouble someone for a basic example of how you would make this
communication work best?

Thanks for the assist. I'll post if I find anything interesting in
the meantime.

How Do I Reference Objects Inside Of Exported Library Objects ?
Hi,

I am having trouble figuring out what seems to be a simple fix? I have created a movieClip in Flash that contains 3 button clips. I want all to be accessible to actionscript, so I gave the movieClip and the 3 buttons a Linkage Identifier. I deleted them from the stage.

In actionscript, I have instantiated the movieClip and, thankfully, the buttons inside went along.

The trouble I'm having is figuring out how to target those buttons. Since they're on the stage already, I shouldn't have to create a new instance right? When I trace the buttons I get an undefined return in the out put.

Anybody know this one??

Thanks for the help!

Brian

Depth And Dynamic Objects/Attaching Scripts To Objects
I am having some problems with my Flash MMORPG created in Actionscript 3.0 that I am working on, not really errors, but more how to do something, in theory. I have 2 problems. First, my game is at a 45 degree angle, so it requires some depth handling(like one object is over another object when it should be behind that object). I am not sure how to go about this. I was thinking that each object's depth should be it's y position if it's origin was at it's feet. But that idea didn't go well, because the depth is limited by the number of children. What is the average way to do this? Next, I am trying to make dynamic objects, so that all I would do is copy and paste an object, or create a new class of it and it would work. What I mean is, the character checks a collision for each object, but if I copy the object with the same name, it doesn't work. In AS3 you can't attach scripts to objects anymore, so I am running into a lot of problems with that. How would I go about fixing this? Thank you in advance.

Aligning Variable Sized Objects And Objects Inside Them
Hi,

How do I align a movieclip, which width and height is user-defined, inside another object (this one is static, though). Top-left alignment is easy, x=0 and y=0, but what about center, center left, bottom left, etc? Math(.round) i suppose, but how?

and

I want an object (static) inside the movieclip (user-defined) to stay aligned to, for instance, the top right corner, similiar to the minimize, maximize and close buttons at the top right of your browser..

The height and width data is pre-defined by the user in another file... But that does probably not make any difference...



If anyone could help me with this, I'd appreciate it alot!

Thanks!,
Peter

Best Way To Hide On Stage Objects When Other Objects Need To Be Shown?
A typical nubee question..What is the best way to hide objects on sage when a button from navigation is clicked and in response other information or objects need to be shown instead of the one previously on stage?

How To Output Both AS Objects And Drawn Objects On Pages?
Using Flash 8;

Hello,

I am building a site entirely in actionscript and the "shell" of the site, the pages, text, static images, come up and work fine, no problems.

However, I'm having troubles trying to implement Kirupa's "XML_Flash Photo Gallery", for one of my pages, link here:

http://www.kirupa.com/developer/mx20...otogallery.htm.

I'm running into troubles because my pages are entirely actionscript and this tutorial uses objects which were drawn by the drawing tool.

I have been trying to get both actionscript and drawn objects to work together and cannot get it right!!

Questions:

1) In terms of layering or frames, What is the best way to output on your pages both "objects drawn by the Flash drawing tools" and "actionscript objects"?

Is this better handled using frames or layers? Should I place my actionscript on the first few frames, then my "drawn objects" on the later frames? Or use layers and have my AS code above or below the manually drawn objects?

For example:

I have my actionscript on layer 1. Then use drawing tools to draw a box on layer 2.

When published, I want the "manually drawn box" and "the actionscript drawn objects" to both be viewable on the pages. Do I place the "drawn" layer above or below the

actionscript layer? Or should this be handled by frames?

I have tried both and neither seem to work for me. When I do one or the other, it works, meaning, all drawn objects, obviously things are viewable, then if

I use all actionscript, things are viewable, but when I try to combine both, the manually drawn objects do not show up.

The actionscript objects show up correctly, but I cannot see the objects I have directly drawn on-stage.

In my actionscript, I use, "_root.getNextHighestLevel()", for each of the objects, this works fine for all the actionscript objects. However, I did nothing

for the objects drawn using the tools, should I attach the same "_root.getNextHighestLevel()" to those objects drawn on-stage?


Or,


2) Should I try to draw Kirupa's objects on my pages using actionscript?

Thanks, any help is great!!

Dave.

Help: Stage Objects Get In Front Of Script Objects?
This is getting me mad...

addChild(my_script_object);

I can't see it...

If I try trace(numChildren) I get 10, so then I try addChildAt(my_script_object,9) and still cant' see it.

If I delete all the objects in stage then I finally see it.... If I delete one by one I find my_script_objects gets beneath a bitmap placed by hand by the designer.

Any ideas?

TIA

Best Way To Hide On Stage Objects When Other Objects Need To Be Shown?
A typical nubee question..What is the best way to hide objects on sage when a button from navigation is clicked and in response other information or objects need to be shown instead of the one previously on stage?

About Referencing Objects And Copying Objects
This is for AS1

hi,

i should know this but i got lost for a bit, can someone make this clear:

i have the following:

code: myobject=new Object()
myobject.var="hello"
getvar=myobject.var

In this case, get var has a reference for myobject.var, or it has just copied de value? mean if i update myobject.var to "good bye" get vatr will be that, too, or will stay as "hello".

If it's just a reference, how can make it a different variable, i mean, assign the value of myobject.var to getvar and loose any relationship between myobject.var and getvar, so if i update one, the other doesn't.

Anyone?

Problem With Class Objects Within Objects
Hi There,
I am having trouble creating an oop grid.
My initial object is "world" shown below which will contain an array of "Row" objects, which in turn contains an array of tile objects.
As i build up the rows and assign the tiles everything seems fine but when i try to retrieve the values the tiles in each row returns the same values from each tile..


class world{

//declare class members
private var goalScore
private var mapPreview
private var title
private var editor
private var createdBy
private var movieBorder
private var instructions
private var rows = new Array()

//Constructor
public function world(Param_goalScore, Param_mapPreview, Param_title, Param_editor, Param_createdBy, Param_movieBorder, Param_instructions){
this.goalScore = Param_goalScore
this.mapPreview = Param_mapPreview
this.title = Param_title
this.editor= Param_editor
this.createdBy= Param_createdBy
this.movieBorder= Param_movieBorder
this.instructions= Param_instructions
}

//Methods
public function createRow(){
if (rows==null){
this.rows[0] = new row()
}else{
this.rows[rows.length] = new row()
}
return this.rows[rows.length-1]
}

}
class row{

//declare class members
public var tiles = new Array()


//Constructor
public function row(){

}

//Methods
function createTile(Param_tileType, Param_completionScore, Param_objectType){
if (tiles==null){
trace("created first tile")
this.tiles[0] = new tile(Param_tileType, Param_completionScore, Param_objectType)
}else{
trace("created tile " + tiles.length +" tiles="+tiles)
this.tiles[this.tiles.length] = new tile(Param_tileType, Param_completionScore, Param_objectType)
}
return this.tiles[this.tiles.length-1]
}

}

class tile{

// declare class members
public var tileType;
public var completionScore;
public var objectType;
public var character;


// Constructor
public function tile(Param_tileType, Param_completionScore, Param_objectType){

tileType = Param_tileType;
completionScore = Param_completionScore;
objectType = Param_objectType;

//movementPreset = Param_movementPreset

//error = Param_error
//errorImage = Param_errorImage

}

// Methods

}

Any advice will be greatly received.

Jason

Mask Objects And Masked Objects
Well.. I don't know if there is already a thread on this subject, but I have this doubt, and I would really like some support.

Been trying to use one mask object to mask several movies, but it doesn't seems to work. Has anyone ever managed to do this?

For example:

Let's say I have three MC - man, woman and baby are their names - and I want to use setMask to mask then so they walk behind the walls of a house, but just show up through the window. I create, then, a mask object - one object with the shape of the window inside it - named it windowMask, put it in _root and added to my actions layer the following lines:

Code:
man.setMask(_root.windowMask);
woman.setMask(_root.windowMask);
baby.setMask(_root.windowMask);
Unfortunately, only the last of them - baby in this case - is masked.

Can't I use one mask object to mask multiple MCs?

Everything works fine if I duplicate the mask MC and set each copy as a mask for each of them.

Code:
man.setMask(_root.windowMask);
woman.setMask(_root.windowMask1);
baby.setMask(_root.windowMask2);
The thing is, what I wrote above is just an example. The real movie has 30 to 40 MC which should be masked by the same mask object and I don't want to have 30 to 40 mask objects dangling around my movie...

Mask Objects And Masked Objects
Well.. I don't know if there is already a thread on this subject, but I have this doubt, and I would really like some support.

Been trying to use one mask object to mask several movies, but it doesn't seems to work. Has anyone ever managed to do this?

For example:

Let's say I have three MC - man, woman and baby are their names - and I want to use setMask to mask then so they walk behind the walls of a house, but just show up through the window. I create, then, a mask object - one object with the shape of the window inside it - named it windowMask, put it in _root and added to my actions layer the following lines:

Code:
man.setMask(_root.windowMask);
woman.setMask(_root.windowMask);
baby.setMask(_root.windowMask);
Unfortunately, only the last of them - baby in this case - is masked.

Can't I use one mask object to mask multiple MCs?

Everything works fine if I duplicate the mask MC and set each copy as a mask for each of them.

Code:
man.setMask(_root.windowMask);
woman.setMask(_root.windowMask1);
baby.setMask(_root.windowMask2);
The thing is, what I wrote above is just an example. The real movie has 30 to 40 MC which should be masked by the same mask object and I don't want to have 30 to 40 mask objects dangling around my movie...

Making Objects Go Behind And In Front Other Objects
Say I wanted to tween something so that it like rotates around it.
IE: a moon rotating around a planet, an electron orbiting a nucleus

How would I make the orbiting object go in front and behind the stationary object?

Paths
I have a movie that is looping in the root (level0) with some buttons, these buttons are within a movie clip "butoes", lets call them "butoes1", "butoes2", ...
When I touch one of these buttons 2 things happens:
- Is loaded one loading movie ("loading.swf") in level1
- Is assigned one variable "abrir" that will define which flash movie is going to be loaded to level1 after the loading.

My problem is that i don't know how to read the value of the variable abrir in the loading movie.

I'll be very gratefull if anyone help me solve this prob

Plz Help With Mc Paths
Hey.

I have some mc:s woth buttons inside on the scene. When I move my mouse over one of them (a picture) the same picture but bigger should fading in. I've done this but I've got 2 problems. The first is that when you move your mouse out from the button the larger picture should fade in, and if they're been any mistake the other mc:s (same thing) should also fade out if any of them are still big. I'm using this code but it isn't working!!!!
The button lies inside a mc that lies on the scene, and the button should change things inside other mc:s laying on the same scene.
On frame 6 the bigger pic fade out.
The tell target "/" is suppose to get back to the scene from the mc.

on (rollOut) {
tellTarget ("/") {
tellTarget ("slakt") {
gotoAndPlay (6);
}
tellTarget ("kort") {
gotoAndPlay (6);
}
tellTarget ("mig") {
gotoAndPlay (6);
}
tellTarget ("hiss") {
gotoAndPlay (6);
}
tellTarget ("box") {
gotoAndPlay (6);
}
tellTarget ("bank") {
gotoAndPlay (6);
}
tellTarget ("bazooka") {
gotoAndPlay (6);
}
tellTarget ("aj") {
gotoAndPlay (6);
}
tellTarget ("synsk") {
gotoAndPlay (6);
}
}
}


The other problem is that the mc:s lay next to each other so close that if one of them fade to a bigger picture it may be overlapped by other mc:s.
How can I make it so that the mc:s that's fading in the large pic is the mc on top of ther others on the scene? Is that difficult?

Thx for any help.

If you don't understand let me know so I can rephrase.

Here's the adress to the movie I'm working with. Use meny "arbeten" and then press on "flash" and there lay the mc:s.

http://www.grace.se/~tgy.hema/hemsida.html

Paths
I have a flash movie that loads jpg's. I want to be able to use this flash movie on different pages of my site in diffent folders and different levels. On the pages that are on a diffent folder level the movie doesn't load the images, because the path is incorrect.
../assets/movie.swf
../..assets/movie.swf

Is there a way that I could keep the path to the image consistant with the swf., so I don't have to make several movie that have diffent paths to the image?

I hope this makes sense... If not let me know and I will try to explain it better.

Thanks

Paths
I am trying to create a flash movie with a map of great britain and a route from the top to the bottom.

After some intro animation the map zooms up to the top and displays the route line (which is also the path for a dot that follows it)

I want to animate the dot following the path whilst moving the map slowly upwards so that it ends up at the bottom corner.

I can't attach the dot to the path when it's converted to a symbol to enable it to move up but without making it a symbol the path doesn't move up with the map.

Does that make sense?!

Please help!

Paths...always Paths....Please Help
Hi Flashers.
To put it in a nutshell:

Scene 1, Main timeline,
frame 1 -- calls MC(1)
where,
MC(1) calls MC(2)
MC(2) calls MC(3)
In MC(3) there's a button which calls Scene 2, frame 1....

No way to get it work...

AS in the button:
code:
on (release) {
_root.gotoAndPlay ("Scene 2",1);
}


I've also tried changing _root by _parent or _level0 without success.
Anybody can help??

Thank you.
Manare

Paths
i am loading an external movie into my main time line. the external movie is my navigation.
i am loading in a text file that has my content.
i have a dynamic text box on the main time line of my main movie.
now..here is the question.

in my external nav movie that i am loading in how do i tell it where to display the text. I have my variables and instance name of my dynamic text box....but it will not display...something wrong with the path?

how can i tell the external nav movie that my dynamic text box to display content in actually in the main movie?

thanks
c

Paths
i want to make a simple program whereby when you click on a button an object is released so that it travels along a pre defined path. will it be better to simply animate the motion along the path with key frames, or to use code to tell the object where the path is?

Paths Help
Are there any tutorials that help with paths? I have a MC in my main movie that i'm loading an external swf file into. i want to put actions in that swf file that control things in my main movie. i'm new to flash. what type of path would i use?

Paths?
Ok i wanna have something move on a certain area, ive seen tutorials about paths I think? like i draw a line then i can jsut make my object follow it? true or false?! thanks!

Paths
Hello!
This is my first post. I hope I can make myself clear (Iīm not a native english speaker...).
Ok, hereīs the deal: I have two movie clips, letīs say mc1 e mc2, one in frame 1 and the other in frame 2. I want to know if itīs possible to make a button inside mc2 go to a specific frame (for example, frame 16) into the timeline of mc1. Iīve named every instance and frame.
Iīve tried, on a button from mc2:

on (release) {
_parent.mc1.gotoAndStop(16);
}

and

on (release) {
_root.mc1.gotoAndStop(16);
}

or

on (release) {
_parent.gotoAndPlay("mc1", 16);
}

Nothing seems to work. Can anyone tell me if itīs possible and, if so, which path should I use?
Thanks a lot!
Ane

Can't Get The Paths Right
Hi,

I have quick question about paths. I am working with a scrolling script which works fine if it's on the main timeline....


Code:
onClipEvent (load) {
scrollerpc = 0;
contentorigy = _root.text._y;
}
onClipEvent (enterFrame) {
scrollerpc = ((this._parent.Scrollbar.scroller._y / this._parent.Bar._height) * 100);
// defined this variable which is the difference between the current position and the final (linear) position
var dif = -_root.text._y + (contentorigy - ((scrollerpc / 100) * (_root.text._height - _root.Bar._height + _root.Scrollbar.scroller._height)));
_root.text._y += dif / 5; // add "pieces" of that difference
// change 5 to o ther values to get different behaviors
}
but when i put it in a movieclip (instance name "big") and i tried changing the code around a bit like this.....


Code:
onClipEvent (load) {
scrollerpc = 0;
contentorigy = big.text._y;
}
onClipEvent (enterFrame) {
scrollerpc = ((this._parent.Scrollbar.scroller._y / this._parent.Bar._height) * 100);
// defined this variable which is the difference between the current position and the final (linear) position
var dif = -big.text._y + (contentorigy - ((scrollerpc / 100) * (big.text._height - big.Bar._height + big.Scrollbar.scroller._height)));
big.text._y += dif / 5; // add "pieces" of that difference
// change 5 to o ther values to get different behaviors
}
it does not work, i don't think i targeted all the paths correctly. Also, i am trying to avoid using "_root" because I will load this .swf into another one later on and I think I will run into more problems then.

I'm a little confused about the "_parent" and "_this"

thanks.

Paths
i have a root swf holding all the other externally loaded movies. i would like to send a command frmo the external movie to the main movie. how's it done?

Paths
If I load a movie into a blank MC on the _root timeline, do I always have to put:
ActionScript Code:
_root.blank.mc.path_to_object
in the script? Or can I just use [as] object[as]
?

thanks

Paths
is there a way with paths to get from one movie clip back to the root timeline and into another movie clip, i can get to the main timeline using

on (release) {
_root

But is there a way i can use

_root.something.gotoAndPlay();

its been wrecking me head!!!!
cheers.

Paths?
I'm not sure how paths work in AS 3.0... It looks like _parent doesn't work anymore...

here's my code that i'm using with the document class setting for the FLA


Code:
package
{
import flash.display.MovieClip;
import flash.events.Event;

public class MyApp extends MovieClip
{
public function MyApp()
{
//init
trace("MyApp init()");
}
public function freakOut():void
{
trace("FREAK OUT!!");
}
}
}
now I have a movieclip on the stage. inside that movieclip i have a graphic, and then this code on the actions layer...


Code:
import flash.events.MouseEvent;
addEventListener(MouseEvent.MOUSE_DOWN, onPress);

function onPress(event:MouseEvent):void
{
trace("event"+event);
//_parent.freakOut();
}
i commented out the _parent.freakOut() thing... I'm trying to find out how I could call a function from the main class that is initialized when the flash player starts...

in the MyApp class there is a method called "freakOut"... how do I call this from that movieclip?

btw... the MouseEvent thing works fine...

thanks!

Paths In AS3
I have this movieclip on stage with a button in it.

when I click the button, I want to load an image on to an x and y position, on the stage.

something like this:


ActionScript Code:
function loadImagemGrande_func(j:String) {
               
    var pathImagemGrande:URLRequest = new URLRequest(j);
   
    var loadImagemGrande:Loader = new Loader();
           
    loadImagemGrande.load(pathImagemGrande);
           
    function showImagemGrande(e:Event):void {
       
        loadImagemGrande.content.x = //a stage x coordinate
        loadImagemGrande.content.y = //a stage y coordinate
               
        addChild(loadImagemGrande.content);
               
        var animaImagemGrandeWidth = new Tween(loadImagemGrande.content, "width", Strong.easeIn, 0, 250, 1, true);
        var animaImagemGrandeHeight = new Tween(loadImagemGrande.content, "height", Strong.easeIn, 0, 188, 1, true);
    }
           
    loadImagemGrande.contentLoaderInfo.addEventListener(Event.COMPLETE, showImagemGrande);
           
}

function disparaLoadImagemGrande(e:MouseEvent):void {
        loadImagemGrande_func("imagem.jpg");
    }
   
button.addEventListener(MouseEvent.CLICK, disparaLoadImagemGrande);

how can I do this, please???

thank you..

Paths
obviously i'm a beginner. i'm making a game in which there is a tweened button (in a movie clip) which is in another movie clip. for this button to work as if it were on the main stage (if the button reached a certain point), i know i would use something like: _root.movieclip1.turkeybutton;
but where do i put this script?
if anyone could please help me, i would appriciate it.

Paths
i am loading swfs into a movieclip. I have this image scroller that i need to get the correct paths to. the name of the movieclip that holds the swf is "container". this scroller has 2 ways to make it work. you can either click the forward back buttons or you can click the boxes under it. now the buttons are in movie clips too. the forward back buttons are in a movieclip called "symbol13" and the boxes are in a movieclip called "toprow". so I assume the path should be :

_root.container.symbol13 and _root.container.toprow

i used this but it still wont work. anyclues??

Paths
i have a button in a movie clip. when its clicked it loads a swf into a movie clip on the main root. the script does load the movie clip but when you click another button it doesn't play the outro animation. here is the script i am using


ActionScript Code:
if (_root.container.currMovie == undefined) {
        _root.container.currMovie = "port";
        _root.container.loadMovie("port.swf");
    } else if (_root.container.currMovie != "port") {
        if (container._currentframe>= container.midframe) {
            _root.container.currMovie = "port";
            container.play();
        }
    }

container is the movie clip on the main root that the swf is being loaded into. i know its just a path issues but ive tried everything-anyone see anyting wrong?

you can see where im at www.tchristos.com/moonstep

Help With Paths
I'm having trouble accessing functions in the root timeline. How is it you communicate with the parent or root path from a movie clip? The function works fine IN the root path.

In root path:
var urequest:URLRequest = new URLRequest;
(also frame 49 is named "MYEFFECT");

In the movie clip (myClip_mc):
myButton.addEventListener(MouseEvent.CLICK, myClick);
function myClick(e:MouseEvent):void{
urequest = new URLRequest("

Paths?
I've searched.... probably used the wrong verbiage, but here goes:

http://www.actionscripts.org/tutoria...s/index2.shtml

See that page? I don't understand how to dock layers under each other?

How would I get a layer under another layer? Maybe I am missing the point...

Can Anyone Help With AS Paths In This?
I have finished customizing this 360 degree panorama viewer from an example I found. Now I need to load this as a SWF into another movie.

Since I am loading this into another SWF, and the asolute paths could change, I need to get all the actionscript calls relative, not absolute. Can anyone fix this for me, or give me some hints?

Here is some of the code:


Code:
onClipEvent (enterFrame)
{
if (_xscale > myscale*10) {
_xscale = myscale*10
_yscale = myscale*10
}
if (_xscale < myscale*minXs) {
_xscale = myscale*minXs
_yscale = myscale*minXs
minXT = true
}
if (_root.arrower.zoomin) {
lastX = _x
if (minXT <> true) {
_x = obj_x * _root.arrower.scalefactor
_x += _root.x
} else {
_x = lastX
minXT = false
}
_y = obj_y * _root.arrower.scalefactor
_y += _root.y
} else {
_x += _root.dx
_y += _root.dy
}
actual_W = getProperty(_level0.img, _width)
actual_XF = getProperty(_level0.img, _xscale)/100
actual_WXF = init_width * actual_XF
actual_R = (_root.img._x + actual_WXF/2 + (h-1)*actual_WXF)
actual_L = (_root.img._x - actual_WXF/2 - (i-1)*actual_WXF)
actual_T = (_level0.img._y - _level0.img._height/2)
actual_B = (_level0.img._y + _level0.img._height/2)
minY = 0
maxY = _root.movieH
minX = 0
maxX = _root.movieW
if (actual_L >= minX) {
if (_root.panorama){
_x = _width/2
} else {
duplicateMovieClip (_level0.img.central, "left"+i, i+10000)
prevL = "left"+(i-1)
prevLX = getProperty(prevL, _x)
setProperty("left" + i, _x, prevLX - init_width)
i = i + 1
for(iDel=1; iDel<h; iDel++) {
removeMovieClip("right"+iDel)
}
h = 1
}
}
if (actual_R <= maxX) {
if (_root.panorama){
_x = (_root.movieW - ((_width)/2))
} else {
duplicateMovieClip (_level0.img.central, "right"+h, h)
prevR = "right"+(h-1)
prevRX = getProperty(prevR, _x)
setProperty("right" + h, _x, prevRX + init_width)
h = h + 1
for(hDel=1; hDel<i; hDel++) {
removeMovieClip("left"+hDel)
}
i = 1
}
}

if(actual_T >= minY) {_y = _height/2}
if(actual_B <= maxY) {_y = (_root.movieH - ((_height)/2))}
// for debugging
actual_X = _x
actual_Y = _y
}

onClipEvent (load)
{
ok = ok2 = 1
beginX = _x
h = 1
i = 1
myscale = _xscale
minXs = _root.movieH/_height
init_width = _root.img.central._width
setProperty("central",_x,0)
setProperty("central",_y,0)
}

onClipEvent (mouseDown)
{
obj_x = _x - _root.x
obj_y = _y - _root.y
}

When To Specify Paths And When Not To?
I'm new and need to understand when we should specify paths to a movie clip, button etc and when we don't need to specify paths?

Can someone enlighten me on this?

FLV Paths On CD
Hi am used to director but am doing a project in Flash, I have a main movie, into that loads another movie using (loadMovie("Chapter3/ch3vid.swf","mt_mc") this works fine, (ch3vid.swf") has an FLV vid with controls for stopping etc. This all works fine until i try it on another computer, then the flv will not load. It seems to be a path thing, i cant embed as they are to big.
The content path is (C:Documents and SettingsBruceMy DocumentsWork FilesMultimedia rtMainvideosch1introbw3.flv). Which is fine from my machine.

Basically i need to find a way to show FLVs from a cd. I have one that works, it loads directly into the main swf with content path (videos/intro1.flv)
FLVs are going into a video folder as there are alot, five chapters plus others.)

When all works the project will be compacted using swf studio by northcode.

Any help would be appreciated.

XML And Paths
I'm having a problem with file paths. I have a master SWF that uses XML to pull in my section SWFs. Everything works when I embed the master SWF, as long as it is in the same folder as the HTML page. When I try to put all the SWFs and XML into a subfolder, the browser hangs, and I get the "Do you want to abort script?" warning.

Here is my XML, pretty simple:


Code:
<accordion>
<tab title="START" src="title.swf"/>
<tab title="RESEARCH" src="research.swf"/>
<tab title="PRODUCT" src="product.swf"/>
<tab title="PLACE" src="place.swf"/>
<tab title="PROMOTION" src="promotion.swf"/>
<tab title="PRICE" src="price.swf"/>
<tab title="IMPACT" src="impact.swf"/>
</accordion>
It works like this:
/index.html
/master.swf
/data.xml
/other swfs

But not like this:
/index.html
/flash/master.swf
/flash/data.xml
/flash/other swfs

I need all the files in a subfolder. Any suggestions on what I need to do to get it to work that way.

Paths?
I've searched.... probably used the wrong verbiage, but here goes:

http://www.actionscripts.org/tutoria...s/index2.shtml

See that page? I don't understand how to dock layers under each other?

How would I get a layer under another layer? Maybe I am missing the point...

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