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








Instance Name Hierarchy?


Hi all.
Is it possible to display an instance name hierarchy in Flash 8?
This would help with referencing mc's within AS.

regards,

Jase




FlashKit > Flash Help > Flash Newbies
Posted on: 04-24-2006, 12:29 PM


View Complete Forum Thread with Replies

Sponsored Links:

Understanding Symbol/Instance Hierarchy Relationships
Hello

I am looking for some insight into the symbol/instance hierarchy.

First off what I have done simple enough is create a dynamic text field and convert it to a symbol.

This symbol has an instance name of "symHeader".

I then dragged an instance of that symbol to the stage and gave it an instance name of "instHeader".

I was having problems populating it with what seemed like a logical approach:

symHeader.instHeader.text = "blabla";

with no luck.

In looking at the object list in debug, it occurred to me that it should be:

instHeader.symHeader.text = "blabla".

This seems sort of backwards in the hierarchy of things.

I figured since instHeader was and instance of symHeader, symHeader would be the first item listed, then drill down to instHeader.

Can someone familiar with the symbol/instance hierarchy explain why this is this way, maybe I need to look at this in a different way.

Thanks
Scotty

View Replies !    View Related
Instance Names...changing...or Addressing Txt Field Instance Based On Instance Of Mc
i'm creating a mail form, that has a text effect which displays the type of info to be entered in each input box. To create this effect, i had to assign the variable name txt to the input boxes as well as the instance name txtBox. each of these text fields is contained within a movieclip, each with a unique instance name. what i need to do, is somehow assign a value/variable to each text field to pass to PHP to generate an email. I have always used components for contact forms so i'm not sure how to make the switch, AND.. the script i use for my contact form is an EXTERNAL AS file. (i use a customized version of a contact form from www.actionscript-toolbox.com [which apparently is no longer Flash related site])

ok.. this is hard to explain..... so bear with me....
If my original mail form component instance names were: tiName, tiEmail, tiSubject and taMsg (ti for textInput and ta for textArea)
and my current instance names for the mc's which CONTAIN the input boxes (with txtBox textfield instance inside them) are: name_txt, email_txt, subject_txt & comments_txt...

how would i pass/convert the users input text in each movieclip's txtBox, into the original instance name for my mail form so i can continue to use the form/PHP i have been using??

OR....

how do i take the values input by the user in each txtBox (i.e name_txt.txtBox.insertedTextFromUser or name_txt.txt, email_txt.txtBox.insertedTextFromUser or email_txt.txt) and send them to a new PHP script to send mail??

please keep in mind i am PHP retarded... hence why i re-use the same form over and over..

thanks in advance for any help. it's greatly appreciated...

if you're confused about my problem, please let me know... i'm having a difficult time explaining....

View Replies !    View Related
Mc Hierarchy Help Me Please
hi...

i have a mc inside another mc.....

im using:

_root.parent.chilf.play()

Not works....why??????

View Replies !    View Related
Help Hierarchy
I have a file that has animated buttons.
http://mycustomhometeam.com/partners.swf
I want info to slide on screen when you click one of the topics and stay there till you click again. I want to info to stay there and keep the topics animated. Because of the hierarchy issues, it won't do it.. HELP!

I tried go to flip name but it appears that it only works if it on the same level as as where it is placed.

I need help NOW!!! Thanks so much
ludicrousman@yahoo.com

View Replies !    View Related
Hierarchy
I'm having a little trouble sorting out my hierarchy system. Something like this--

main.swf -- blank with empty_mc1.
submain.swf loads into empty_mc1.

Within submain.swf there are two more mc's, empty_mc2 and empty_mc3.

sub1.swf loads into empty_mc2. The code to load it from submain is:
_parent._parent.(the button is within a container)

Now, sub3.swf loads into empty_mc3 from sub2.swf, what would be the code for that?(the button is on the main stage or embedded in another mc--either code would help out)

Hope that makes sense

Any help would be appreicated

View Replies !    View Related
Hierarchy
hi. i made a flash form that works great until i load it into another movie. i know i have to change some fo the script but i don't know what i need to change. i am loading the movie into another slot labeled box_signup. here is the set variable frame.

formData = new LoadVars();
formData.name = "";
formData.email = "";
formData.city = "";
formData.comments = "";
formData._vDeckformid = "87";

replyData = new LoadVars();
replyData.onLoad = myOnLoad;

here is the script.

function ckName(){
if (formData.name ==""){
errBox.setMessage("Sorry, there are no annonymous MONEY MONEY fans.");
return false; }
else {
return true};
}

function ckCity(){
if (formData.city ==""){
errBox.setMessage("MONEY MONEY needs to know where you live.");
return false; }
else {
return true};
}

function ckEmail(){
if (formData.email ==""){
errBox.setMessage("How are we supposed to send you updates if you don't give us your email address silly?");
return false; }
else {
if(formData.Email.indexOf(".",0)==-1 || formData.Email.indexOf("@",0)==-1){
errBox.setMessage("That's not a real address now is it?");
return false;}
else {
return true;}
}
}
function clrData(){
this.formData.name = "";
this.nameIN.text = "";
this.formData.email = "";
this.emailIN.text = "";
this.formData.city = "";
this.cityIN.text = "";
this.formData.comments = "";
this.commentsIN.text = "";
}

function myOnLoad(success) {
errBox.setEnabled(true);
if(success){
errBox.setIcon("info");
errBox.setTitle("Thank you");
errBox.setMessage("Thank you for signing up for the MONEY MONEY Newsletter.");
errBox._visible=true;
clrData();
}
else {
errBox.setIcon("Warning");
errBox.setTitle("Error");
errBox.setMessage("There has been a system error submitting your signup form. Please try again.");
errBox._visible=true;
}
}

function goPostal(){
if(!ckName()){errBox._visible=true;return;}
else{
if(!ckCity()){errBox._visible=true;return;}
else{
if(!ckEmail()){errBox._visible=true;return;}
}
}
errBox.setIcon("info");
errBox.setTitle("Sending submission");
errBox.setMessage("Your submission is being sent.");
errBox._visible=true;
errBox.setEnabled(false);
formData.sendAndLoad("http://wearemoneymoney.com/v-cgi/forms.cgi",replyData,"post");
}

thanks to anyone who can tell me what to do.

jeremy b

View Replies !    View Related
CollapsingMenu Or Hierarchy
Hi all
I am looking for tutorial on CollapsingMenu or hierarchy menu with main--> sub-->sub-sub category Collapsing...Could someone please recommend me a a link please.
thanks
PilotX

View Replies !    View Related
Hierarchy In Flash
hi,
my name's diane.
i am working on a flash site for a friend photographer and i am new.
i have a question about the following :

2 scenes.
1)in the first i got a MC, insite it another MC, and insite a button.
2)his function ? go to the scene number 2.
3)Where do i put the actionscript ? i tried in the button, the effect is working inside the effect, but it has no effect when i play the movie.
i would like to keep my actionscript inside the last MC and not put it in the timeline of the first scene. can i do that ??
I would appreciate any help.
thank you very much.

View Replies !    View Related
Hierarchy Is Killing Me
i need help with the path of my grid of boxes.
the problem is i have created a grid of boxes looking something like this
# # # # #
# # # # #
# # # # #
# # # # #
each boxes has a unquie instance name.
Scene 1

posX = 5;
posY = 20;
var myLife = new Array();
for (i=1; i<=300; i++) {
_root.attachMovie("blokk", "blokk"+i, i);
_root["blokk"+i]._x = posX;
_root["blokk"+i]._y = posY;
posX += 12;
live[i] = "alive";
if (i%15 == 0) {
posX = 5;
posY += 12;
}
}
then i want to be able to change the color of each of the boxes and then use a button and antoher for loop to check the color of each box.
Any ideas out there?
thanks

View Replies !    View Related
Movie Hierarchy
How would I modify my Actionscript to handle Flash 5 hierarchy?

I have a movie loaded as a symbol and I need it to tell the main scene "root" to action an event.


error output:
Symbol=SlideG3, Layer=Layer 1, Frame=1: Line 2: You must export your movie as Flash 5 to use this action.

_root.gotoAndPlay(11);

View Replies !    View Related
Hierarchy Problem?
I'm having trouble working with a coloring book project. The problem in with the tip of the paintbrush. I can't get it to change color when clicking on the swatch. the hierarchy is as such

swatchMC
BrushMC>BrushTipMC

The brushtip movie clip is inside of the brush movie clip which is in the same level as the swatch.

Any Ideas?

_________________________________
Code for the swatch

on(release){
fillColor=0x00FF00;
}


__________________________________

Code for the Brush Tip

on(press){
iColor = new Color(this);
iColor.setRGB(_root.fillColor);
delete iColor;
}

View Replies !    View Related
Hierarchy Of Movies
Here's the situation, I'll keep the wording simple:

I have one main movie (called "Index") with a navigation bar.

This movie has an empty area containing a movie clip called "Zone."

When you click a button on the navigation bar, a new SWF movie is loaded into "Zone."

Within one of these movies (entitled "Comic") there is a button called "Archive."

When I click "Archive" I want it to load a new movie in place of "Comic."

The problem is this:

When I use the unloadMovie function for "Archive" it unloads the ENTIRE flash website. "Index" and everything, so I'm left with a blank screen.

I just want it to unload "Comic" and nothing else. I've tried using the 'level' parameter, but because "Comic" is a separate movie, it does not recognize any levels of "Index."

I've also tried using "target" but it does not know that "Zone" exists, because it is a separate movie.

Sorry if this is hard to understand.

I just want a movie within a movie to unload itself, and not the whole thing.

View Replies !    View Related
Hierarchy Of Movies
Here's the situation, I'll keep the wording simple:

I have one main movie (called "Index") with a navigation bar.

This movie has an empty area containing a movie clip called "Zone."

When you click a button on the navigation bar, a new SWF movie is loaded into "Zone."

Within one of these movies (entitled "Comic") there is a button called "Archive."

When I click "Archive" I want it to load a new movie in place of "Comic."

The problem is this:

When I use the unloadMovie function for "Archive" it unloads the ENTIRE flash website. "Index" and everything, so I'm left with a blank screen.

I just want it to unload "Comic" and nothing else. I've tried using the 'level' parameter, but because "Comic" is a separate movie, it does not recognize any levels of "Index."

I've also tried using "target" but it does not know that "Zone" exists, because it is a separate movie.

Sorry if this is hard to understand.

I just want a movie within a movie to unload itself, and not the whole thing.

View Replies !    View Related
Hierarchy Problem
ok. so i'm using some code to scroll a movie clip when the mouse rolls over it. this works fine when the clip is on level0 but when i use it inside another movie clip it doesn't seem to work.

i've tried replacing '_root' with the name of the clip and with '_parent' but to no avail.

here's the code:


Code:
_root.scrollerName = _root.scrollerClip;
_root.left = 80;
_root.innerLeft = 120;
_root.right = 490.9;
_root.innerRight = 450.9;
_root.top = 84;
_root.bottom = 167;
_root.minXposition = -17;
_root.maxXposition = 83;
_root.idleScrollSpeed = 1;
_root.overScrollSpeed = 10;
if (_root.scrollerName._x <_root.minXposition) {
_root.scrollerDirection = "right";
} else if (_root.scrollerName._x> _root.maxXposition) {
_root.scrollerDirection = "left";
}
if (_root._ymouse <_root.bottom && _root._ymouse> _root.top) {
if (_root._xmouse> _root.left && _root._xmouse <_root.innerLeft) {
if (_root.scrollerName._x> _root.maxXposition) {
break;
} else {
_root.scrollerName._x = _root.scrollerName._x + _root.overScrollSpeed;
}
} else if (_root._xmouse> _root.innerRight && _root._xmouse <_root.right) {
if (_root.scrollerName._x <_root.minXposition) {
break;
} else {
_root.scrollerName._x = _root.scrollerName._x - _root.overScrollSpeed;
}
} else if (_root._xmouse <_root.left or _root._xmouse> _root.right) {
if (_root.scrollerDirection == "right") {
_root.scrollerName._x = _root.scrollerName._x + _root.idleScrollSpeed;
} else if (_root.scrollerDirection == "left") {
_root.scrollerName._x = _root.scrollerName._x - _root.idleScrollSpeed;
}
}
} else if (_root.scrollerDirection == "right") {
_root.scrollerName._x = _root.scrollerName._x + _root.idleScrollSpeed;
} else if (_root.scrollerDirection == "left") {
_root.scrollerName._x = _root.scrollerName._x - _root.idleScrollSpeed;
}
any ideas?

View Replies !    View Related
Screens Hierarchy
Im using screens,
What do I adjust to make it so that the main 'presentation' screen is on the top layer compared to the children screens?

I have a navigation on the main presentation screen, and when it loads up the child screen, the child screen is on the top, covering the main screen.

How do I keep the main screen on the top?

View Replies !    View Related
[F8] Flash Hierarchy
Firstly I would like to thank you for reading my post.

I have two movie clips:

button that contains a button
bg that contains the background (two frames)

How do I get it so when I click the button, it goes out of the movie clip "button", and into the bg movie clip and switches the bg movie clip to frame 2?

Thanks.

Sorry everything is so messy.

View Replies !    View Related
Deleting Hierarchy
Heres one for the smart folks...

If I have a movie clip and I put any number of instances inside of it, when I delete that movie clip, do those instances go with it? Or do they still exist somehow?

I'm using a "contentBox" movieclip to as a box to add things to the stage and move them as a unit, which works great. When I delete it, they go too, but I want to be sure that theyre REALLY gone. Is that so?

e.g.:

(and this is made up, it's not my actual code):

Code:
var contentBox:MovieClip = new MovieClip();
addChild (contentBox);

contentBox.addChild(object1);
contentBox.addCHild(object 2);
//etc etc etc

//and then:
removeChild(contentBox);
Is that gonna kill object1 and object 2?
God I hope so...

View Replies !    View Related
Hierarchy Question
I have a movieClip in the library called mc_preloader with the linkage of "preloader". Within this movieclip is a graphic and a textfield called txt_preload (neither are generated dynamically)

In AS2 I could attach this to the stage and then with:


ActionScript Code:
mc_preloader.txt_preload.text = "loading";

could get text displayed within the textbox...

Now using AS3:

I have tried creating an instance using:


ActionScript Code:
var mc_preloader:MovieClip = new preloader();

and attaching to the stage:


ActionScript Code:
addChild(mc_preloader);

and then accessing the textfield using the same method as above, the movieclip appears however I have had no luck with getting text to display

I have embeded text within the field and it still doesnt work

Any help, pointers, FLAs or links to tutorials that explain this for me would be greatly appreciated

ty

View Replies !    View Related
Flash Hierarchy
I have three dynamics text :txt0,txt1,txt2 (main.fla)

I also have a class

Interfaz.as:


ActionScript Code:
public class interfaz
 {
    public var entidad:XML;

    public function  llenarMuestra()
    {            
       for(var j=0;j<3;j++)
            { this["txt" + j].htmlText = value;  }
    }
  }

Main.fla
miInterfaz.llenarMuestra();

ERROR: there is no txt0 property in interfaz

How can I acces txt0,txt1,txt2 from interfaz ?
thanks

View Replies !    View Related
Hierarchy Of Layers?
Hi--

code:

layer 1 -- empty_mc01
layer 2 -- empty_mc02

//empty_mc02's code--
on(press){
_root.empty_mc01.loadMovie("movie.swf");
}

Question:

Is that possible? If the mc's are in the same x0 y0 position? For some reason it is not working when I publish.

Any help would be appreciated.

Thanks

View Replies !    View Related
Scene Hierarchy
Is it possible for a flash file to automatically open in scene other than the 1st scene?? I need to set up scene 3 as the default scene when the viewers access the website.

View Replies !    View Related
Copy MC Hierarchy
when i copy the parent mc that has a bunch of mc's and those in turn have another within em, i only get a new instance of the parent mc and not the children/movie clips inside it. The ones inside it seem to be the same instance as the original ..how can i perform the copy operation to get new instances throughout the mc hierarchy?

thanks

View Replies !    View Related
Object Hierarchy
As a new user of this forum and finding the help invaluable. I thought I would post this object hierarchy. I looked everywhere for one and could not find, so compiled my own.







Attach Code

Object (core)
AbstractPlayer
FLVPlayer
MP3Player
RTMPPlayer
Accessibility
AccImpl
ComboBaseAccImpl
ComboBoxAccImpl
DataGridAccImpl
LabelAccImpl
ScrollSelectListAccImpl
ListAccImpl
SimpleButtonAccImpl
ButtonAccImpl
CheckBoxAccImpl
RadioButtonAccImpl
WindowAccImpl
AlertAccImpl
arguments (core)
Array (core)
FunctionArguments
AsBroadcaster
Back
BitmapData
BitmapFilter
BevelFilter
BlurFilter
ColorMatrixFilter
ConvolutionFilter
DisplacementMapFilter
DropShadowFilter
GlowFilter
GradientBevelFilter
GradientGlowFilter
Boolean (core)
Bounce
BroadcasterMX
Camera
capabilities
Color
ColoredSkinElement
ColorTransform
ContextMenu
ContextMenuItem
CSSSetStyle
CSSStyleDeclaration
DataGridColumn
CSSTextStyles
CuePoint
CuePointEditor
CuePointList
CustomActions
DataAccessor
Bool
ComposeString
Custom
Data
AutoTrigger
Calculated
DatasetDeltaToXUpdateDelta
DateToNumber
Num
RearrangeFields
DataProvider
DataSelector
DataType
Bool
Custom
DataProvider
Dte
Num
Int
Obj
PhoneNumber
SocialSecurity
Str
Xm
ZipCode
Date (core)
DateBase
Dte
Defaults (halo)
Delegate
DepthConrol
DepthManager
DisplayControls
Elastic
Error (core)
EventDispatcher
UIEventDispatcher
ExternalContent
ExternalInterface
FileReference
FileReferenceList
Formatter
NumberFormatter
Function (core)
IME
Iterator
ValueListIterator
Key
LoadVars
LocalConnection
Locale
LowLevelEvents
Math (core)
Matrix
MediaConfig
MenuDataProvider
Microphone
Mouse
MovieClip
Chrome
CuePoint
CuePointEditor
CuePointList
FrameVideoTime
FullScreenToggle
FullScreenToggleControl
HMiniPlayBarTray
HPlayBarTray
LoadBar
LoudButton
MiniPlayBar
MsVideoTime
MuteButton
PauseButton
PlayBar
PlayBarThumb
PlayButton
PlayPauseButton
SkinElement
FocusRect (halo)
ToEndButton
ToStartButton
UIObject
Border
CustomBorder
ScrollThumb
RectBorder
AccordionHeaderSkin (halo)
ActivatorSkin (halo)
ButtonSkin (halo)
RectBorder (halo)
Label
ProgressBar
UIComponent
AlertForm
CalendarLayout
CheckCellRenderer
ComboBase
ComboBox
DateField
DateChooser
FocusManager
MediaController
MediaDisplay
MediaPlayback
MenuBar
View
Accordion
Loader
Screen
Form
Slide
ScrollView
ScrollPane
ScrollSelectList
List
DataGrid
Tree
Menu
TextArea
Window
Alert
MenuBarItem
NumericStepper
ScrollBar
HScrollBar
UIScrollBar
VScrollBar
SelectableRow
DataGridRow
MenuRow
TreeRow
SimpleButton
Button
AccordionHeader
Checkbox
CustomButton
RadioButton
TextInput
VideoTime
VMiniPlayBarTray
VolumeControl
VolumeControlHandle
VPlayBarTray
MovieClipLoader
NamedFrameCuePointListener
NetConnection
RTMPConnection
NetStream
PlayNetStream
None
Number (core)
ObjectCuePointListener
OnEnterFrameBeacon
OverlappedWindows
PlayerControls
Point
PopUpManager
PrintJob
RadioButtonGroup
Rectangle
Regular
ScreenAccommodator
security
Selection
SharedObject
SlideCuePointListener
Sound
Stage
StreamingMediaConstants
String (core)
Enumeration
File
FontName
ObjectID
URI
Strong
StyleManager
StyleSheet
System (core)
SystemManager
TextField
TextFormat
TextRenderer
TextSnapshot
Tracer
Transform
Transition
Blinds
Fade
Fly
Iris
Photo
PixelDissolve
Rotate
Squeeze
Wipe
Zoom
TransitionManager
TreeDataProvider
Tween
UIComponentExtensions
UIObjectExtensions
Video
XMLNode
XML
XMLSocket
XMLUI

























Edited: 02/08/2007 at 05:51:09 AM by Graham Butcher

View Replies !    View Related
[F8] Flash Hierarchy
Firstly I would like to thank you for reading my post.

I have two movie clips:

button that contains a button
bg that contains the background (two frames)

How do I get it so when I click the button, it goes out of the movie clip "button", and into the bg movie clip and switches the bg movie clip to frame 2?

Thanks.

Sorry everything is so messy.

Here's a picture of my actionscript window:

http://img440.imageshack.us/img440/2042/picture3lz5.png

So I have:

ROOT >> Button Movie Clip >> Button
ROOT >> Background Movie Clip >> 2 Frames

View Replies !    View Related
Hierarchy Methods
I've been trying to develop GOOD flash habits and am not quite sure how to nest buttons/movies/etc to work towards a 'pro' look, such as teh uber-brill group94.

Does anyone have any good references (tutorials, articles, books) that you could refer me to? Any good advice?

View Replies !    View Related
Hierarchy Of Targeting..?
I have my main swf file which is the layout of the site in which I have loaded into a container an external swf which is my contact.swf. The problem is that when this file is loaded you cannot see any of the input boxes etc and the php file is not processed I've tried various targetting etc but still no result.

AS on the first frame

true_btn.onRelease = function(){
// send variables in form movieclip (the textfields)
// to email PHP page which will send the mail
form.loadVariables("email.php", "POST");
}
stop();

AS on the second frame

back.onRelease = function(){
prevFrame();
}

And the AS on the form movieclip

onClipEvent(data){
// show welcome screen
_parent.nextFrame();
}

Thank you for everyone's time.

View Replies !    View Related
Hierarchy In ActionScript ?
Sup All

Alrighty, still fairly new to the flash scene, but slowly I'm figuring things out.
Okay my navigation menu is made up of a few movie clips that open up to dropdown menu buttons. Anyway I can't figure out where to place the coding, or if there is a hierarchy in the script.

For example the first item in the menu :: you rollOver onto it and it displays the rest of the hidden menu ::

attached to the button in actionscript is ::

on (rollOver)
{
gotoAndStop("open");
}

But I also want to add

on (release)
{
_root.contents.loadMovie("student.swf");
}

Can I have both of these actions attached to the same button? Or am I totally lost and I should put the loadMovie action some place else. Attached is the .fla file :: If you have time to gander at it that would be great, or if you can solve my problem w/o it Thank you so much

Thank you in advance

-michael


FLA FILE

View Replies !    View Related
Hierarchy Of Actionscript?
What gives? I'm using MovieClip.prototype code in my movie. I put it in the first frame of the main timeline with a stop();. The code affects the MCs like it should. When the timeline plays to the next keyframe with a stop(); in it the MovieClip.prototype code doesn't affect the MCs at all.

Why does a simple stop(); kill the MovieClip.prototype code?

View Replies !    View Related
Listbox Hierarchy
Hey all,

Is there a way to organize data into a hierarchy within a listbox? I would like to have a parent-child list with the parent always being bold.

I'm not asking someone to do it for me, I would just like to know if it can be done and maybe some direction.

Thanks in advance.

View Replies !    View Related
Class Hierarchy
I'm having problems planing how to go about extending certain classes in my project.
Part of the problem is that some may need to be extended dynamically.

What I need: (this is for a fighting game)

General Actions (movement and such)
Character class (stats and specials)
Player control (human input)
AI

I need stage elements too, but I got that planned already

SO, with those classes I need a general blueprint for all characters, a class for the characters stats and specials wrapping up with the controls which is either player(with variables inside for player 1,2,etc) or an AI class.

View Replies !    View Related
Hierarchy Methods
I've been trying to develop GOOD flash habits and am not quite sure how to nest buttons/movies/etc to work towards a 'pro' look, such as teh uber-brill group94.

Does anyone have any good references (tutorials, articles, books) that you could refer me to? Any good advice?

View Replies !    View Related
Hierarchy Of Targeting..?
I have my main swf file which is the layout of the site in which I have loaded into a container an external swf which is my contact.swf. The problem is that when this file is loaded you cannot see any of the input boxes etc and the php file is not processed I've tried various targetting etc but still no result.

AS on the first frame

true_btn.onRelease = function(){
// send variables in form movieclip (the textfields)
// to email PHP page which will send the mail
form.loadVariables("email.php", "POST");
}
stop();

AS on the second frame

back.onRelease = function(){
prevFrame();
}

And the AS on the form movieclip

onClipEvent(data){
// show welcome screen
_parent.nextFrame();
}

Thank you for everyone's time.

View Replies !    View Related
Hierarchy In ActionScript ?
Sup All

Alrighty, still fairly new to the flash scene, but slowly I'm figuring things out.
Okay my navigation menu is made up of a few movie clips that open up to dropdown menu buttons. Anyway I can't figure out where to place the coding, or if there is a hierarchy in the script.

For example the first item in the menu :: you rollOver onto it and it displays the rest of the hidden menu ::

attached to the button in actionscript is ::

on (rollOver)
{
gotoAndStop("open");
}

But I also want to add

on (release)
{
_root.contents.loadMovie("student.swf");
}

Can I have both of these actions attached to the same button? Or am I totally lost and I should put the loadMovie action some place else. Attached is the .fla file :: If you have time to gander at it that would be great, or if you can solve my problem w/o it Thank you so much

Thank you in advance

-michael


FLA FILE

View Replies !    View Related
Establishing A Hierarchy
I have a quick question-- I have a script where I have created a managing object, which handles and manages data from multiple subobjects.

The subobjects handle user input events, and after altering the data, they pass it back to the manager, invoking one or more of its methods.

I've tried to set it up so that the manager is the parent of all of these, and I've hit a grey area where I'm unsure of how this is treated in actionscript.

So let's say I have:
myManagingObject = new ManagingObject();

and I have code set up for UserInputObjects-- so I say:
myManagingObject.myUserInputObject1 = new UserInputObject();
myManagingObject.myUserInputObject2 = new UserInputObject();

The relationship isn't explicit; if I trace UserInputObject1._parent it's undefined. Since I need the UserInputObject to invoke methods on its parents, I need it to know where to go.

I tried setting it explicitly in the constructor-- so I could pass it a parent and just link them directly.

myManagingObject.myUserInputObject1 = new UserInputObject(myManagingObject);

and then:
function UserInputObject(parent) {
this._parent = parent;
}

Which worked, but then when I went to debug it, it looked like it wasn't storing a reference to myManagingObject but a copy, so it seemed to create a nasty, infinite loop, since the copy of myManagingObject had its own UserInputObject, which had a copy of its myManagingObject, which had its own UserInputObject, ad infinidum.

So I'm assuming I'm just horribly ignorant about something simple here, and I'd appreciate any info that could shed some light on this. Is there a best practice way to explicitly identify a generated object's parent here?

Thanks!

View Replies !    View Related
[as2 Help] Scope & Hierarchy
Hello all,

While working on some code on the "IF Statements" thread on this same forum, I stumbled on two situations and I would like to know if anyone has an answer:

Case 1 (passing variables into event functions):
Is there any way I could have passed the 'i' variable into the onRelease event function instead of having to resort to the 'item' variable workaround?

ActionScript Code:
for (i=1; i<61; i++) {
        this["b" + i].onRelease = function() {
                item = new String(this._name);
                item = item.slice(1);
                roll = "r" + item;
        };
}



Case 2 (object hierarchy):
The objects referenced on the code above all sit on the same timeline. On this case, the main timeline.
Why is that then "_root["b" + z].gotoAndPlay(11);" works, but "_parent["b" + z].gotoAndPlay(11);" doesn't?

ActionScript Code:
for (i=1; i<61; i++) {
        this["b" + i].onRelease = function() {
                for (z=1; z<61; z++) {
                        if (roll == "r" + z) {
                                _root["b" + z].gotoAndPlay(11);
                        }
                }
        };
}

View Replies !    View Related
Stupid Hierarchy - How To Address MCs
Hi! - I am officially going nuts. Now, can anyone help me. I have a projector file or it could be an swf that loads external MCs into a MC on its main timeline called "mc_loader". So I say okay, on click of this here button load an external swf into "mc_loader". Cool, no problem. The issue comes when I want to affect a MC within the externally loaded swf from inside the externally loaded swf.

I thought I'd say:
_root.mc_loader.someMCinExternalSWF._visible = 0;

and thus be able to control the MC - thought you have to start way at the _root (the movie that loads the external swfs). But sometimes I am right sometimes wrong - things in the external swfs work great UNTIL i load them into the mc_loader in the main movie. Any ideas? Help!

View Replies !    View Related
Hierarchy Of Movies & Variables...
hey guys I got stopped & can do nothing with it. Has anyone
some ideas...
the problem is:
I have a main Movie1, and I load another Movie2 into it . OK thats fine. the Movie2 has text variables loaded into it. But however text variable is loaded not to _level0
but directly to movie clip ( _level0.MovieClip) & here where the problem starts... When I publish Movie2 independently of Movie1 it works, but when I publish Movie1
(with Movie2 loaded into it) the text isn't displayed.
where do you think problem comes from?
I appreciate your help...

View Replies !    View Related
Variables In Hierarchy String
Can I use a variable in a hierarchy string?

I have a MC I'd like to use in different spots in my movie, and currently I
have this script attached to one of the MC's buttons. "intro" is the name of
the parent MC where I am using it.

tellTarget (_root.intro.scrollUP)

Now, can I create a variable called ScrollVar for example, set the value
somewhere in the movie, and then use the variable in the above code like
this:

tellTarget (_root.ScrollVar.scrollUP)

I tried this, but it did not work. Here are my files:

http://home.uleth.ca/man/temp/vision/

I've made the changes to the "principles" MC.

There are actions on the two scroll arrows, and the two white dots in the
lower left hand corner are MC with three action frames.

Thanks.

View Replies !    View Related
Movieclip Hierarchy Question
This issue might have a very simple answer, bear with me.

I have a lot of scenes containing thumbnails, and when you click on them they blow up in full size. Now, the other thumbnails on the scene that are placed higher up in the hierarchy overlap the big picture.

My question is, whether or not there is a way of having a movieclip load on top of everything else, movieclips, main timeline etc? So far the only solution I have found, is hiding all the other thumbnails via SetProperty(name, _alpha, -100). Is there a way of overriding the movieclip hierarchy?

Hope someone can help me.
Thanks in advance!

- notaw

View Replies !    View Related
Accessing Field Within A MC Hierarchy
Please take a look at the picture.
Known Facts:
1. MC1 and MC2 are childs of MC3
2. Fields 'Test', 'Score' and 'Date Taken' belong to MC2

Problem:
I cannot access those fields within the main timeline. What am I doing wrong?

Here's how I do it:

MC3.MC1.Test.text = 'English';
MC3.MC1.Score.text = '123';

Thanks,
Raymond

View Replies !    View Related
Hierarchy Of Movie Clips
Here's the situation, I'll keep the wording simple:

I have one main movie (called "Index") with a navigation bar.

This movie has an empty area containing a movie clip called "Zone."

When you click a button on the navigation bar, a new SWF movie is loaded into "Zone."

Within one of these movies (entitled "Comic") there is a button called "Archive."

When I click "Archive" I want it to load a new movie in place of "Comic."

The problem is this:

When I use the unloadMovie function for "Archive" it unloads the ENTIRE flash website. "Index" and everything, so I'm left with a blank screen.

I just want it to unload "Comic" and nothing else. I've tried using the 'level' parameter, but because "Comic" is a separate movie, it does not recognize any levels of "Index."

I've also tried using "target" but it does not know that "Zone" exists, because it is a separate movie.

Sorry if this is hard to understand.

I just want a movie within a movie to unload itself, and not the whole thing.

View Replies !    View Related
Movie Clip Hierarchy
im got a small btton prob.

im in movie clip 'welcome' inside this i have a movie clip called banner.

this has a button in it. when pressed the movie clip welcome to got and play frame 390

ive tried _root and _parent but im not really sure how to do it.

ay help???

thanks

View Replies !    View Related
LoadMovie Preloaders & Hierarchy
greetings-

i'm trying to convert my MMCD to be accessible on the web. most importantly to have the photos load individually. i'm kinda new to this thing and i'm not exactly sure how i need to go about that. Any help would be greatly appreciated. the project is here
if anyone would like to take a look at the swf i can make it available.

thanks in advance,
_greg

View Replies !    View Related
MovieClip.onMouseDown Hierarchy
This drives me nuts!

I have a depth-handler that keeps track on the various depths of some windows (mc´s) I have in my app...

I thought that any clip that triggers mousedown (I have a hitTest on them) knew what level/depth they we´re on.
And don´t get me wrong, they do.

But my problem is that the mouseDown triggers from what seem to be their origin level in the movie.

So when I have swapped my clips depths, the mouseDown on a underlying clip can be triggerd before clips on top of this, and with a higher depth.

Is there any way to solve this?!

View Replies !    View Related
Hierarchy Scripting Problems
when i try to use Adam Lem's horizontal scrolling code (here) I hit a wall. I'm not using it on level0 but inside a movie clip and I think this is where my problem lies.

The code uses '_root' and I've tried replacing this with both '_parent' and 'mainColMov' to no avail.

Anyone got any ideas?

View Replies !    View Related
Hierarchy Chart In Flash - Possible?
Hi,

Any advice on this would be greatly appreciated...

I'm trying to use flash to dynamically draw a hierarchy table, organizational chart, or team structure diagram, or whatever you want to call it from a set of records in a database with the 'name' and 'reports to' rows so basically a parent and child relationship.

Please see the attached jpg for what I want to end up with.

Anyone seen/produced anything similar or any ideas how I could do this in flash? The main thing im having difficulty getting my head round is how to space the boxes correctly.

Many thanks

View Replies !    View Related
Movieclip Hierarchy Problems
Flash 8

i have a moviclip on stage, and inside it there is another movieclip (btnInfo_mc). on frame one of the first clip (there is only one frame) i have code to animate some things within the clip. i also have a line of code that isn't working and i don't know why. i used the correct dot syntax ( i think ).

here is the code, the last line isn't working at all:



Code:
this.pointer = "out";
//
this.onEnterFrame = function () {
//
this.onRollOver = function () {
this.pointer = "over";
};
this.onRollOut = function () {
this.pointer = "out";
};
//
//==================================================================
// this is the animation script, it works just fine
//==================================================================
//
if (this.pointer == "over") {
this.dropName_mc._y += (0 - this.dropName_mc._y) * 0.6;
this.pNumber_txt._y += (2 - this.pNumber_txt._y) * 0.6;
this.pTitle_txt._y += (4 - this.pTitle_txt._y) * 0.6;
this.dropName_mc._alpha += (100 - this.dropName_mc._alpha) * 0.3;
this.pNumber_txt._alpha += (100 - this.pNumber_txt._alpha) * 0.3;
this.pTitle_txt._alpha += (100 - this.pTitle_txt._alpha) * 0.3;
} else {
this.dropName_mc._y += (-26 - this.dropName_mc._y) * 0.6;
this.pNumber_txt._y += (-15 - this.pNumber_txt._y) * 0.6;
this.pTitle_txt._y += (-20 - this.pTitle_txt._y) * 0.6;
this.dropName_mc._alpha += (0 - this.dropName_mc._alpha) * 0.3;
this.pNumber_txt._alpha += (0 - this.pNumber_txt._alpha) * 0.3;
this.pTitle_txt._alpha += (0 - this.pTitle_txt._alpha) * 0.3;
}
//
//==================================================================
// the following code doesn't work
//==================================================================
//
this.btnInfo_mc.onPress = function () {
trace ("pressed");
};
};

View Replies !    View Related
MovieClip Hierarchy Control
Hi all

I have a movieClip which holds several embedded movie clips and a button in the sub most movie clip:

mcProducts
mcSubCats
mcItem
btView

I want to control the timeline of another movieClip in 'mcProducts' from the 'btView'. Any ideas of how this can be done? It works from a button on 'mcProducts' but I am struggling further down the line.

View Replies !    View Related
How To Create An Object Hierarchy Using As3?
I have an actionscript class as follows:

package Test{

public class Role{

private var _roleCode:String;
private var _roleName:String;
private var _inheritedFromRole:Role;

//put all your getters and setters for the above
//mentioned attributes.
}
}

When I try to create an instance of such a class, Flash gets into an indefinite loop and finally exits with an out of memory exception.

Is there a way to fix this issue?

Thanks in advance.

View Replies !    View Related
Hierarchy Chart In Flash - Possible?
Hi,

Any advice on this would be greatly appreciated...

I'm trying to use flash to dynamically draw a hierarchy table, organizational chart, or team structure diagram, or whatever you want to call it from a set of records in a database with the 'name' and 'reports to' rows so basically a parent and child relationship.

Please see the attached jpg for what I want to end up with.

Anyone seen/produced anything similar or any ideas how I could do this in flash? The main thing im having difficulty getting my head round is how to space the boxes correctly.

Many thanks

View Replies !    View Related
Class Hierarchy Problem
I have a problem regarding class hiearchy and dynamically creating movie clips that have an associated class. I think it's best explained by looking at this flash program I set up that describes the problem.

Here are all the files in one rar file:
http://www.bestsharing.com/files/ms0...archy.rar.html

Here the files separately:
http://www.bestsharing.com/files/ms0...archy.fla.html
http://www.bestsharing.com/files/ms0...ClassA.as.html
http://www.bestsharing.com/files/ms0...ClassB.as.html

Thanks for any help; I've been racking my brain for hours on this.
-Cornstar23

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved