LOADING
Loading
Hi , welcome back.
LogoutLOGOUT
 
  Lost password?  
Hi
 




 
 
Thread Tools Display Modes
  #1  
Old 09-05-2002, 12:24 AM
schlumpf schlumpf is offline
Registered User
 
Join Date: Jul 2002
Location: Hamburg
Posts: 16
Rep Power: 0
schlumpf is on a distinguished road
Question access variables across movies

Hi again!

I was just trying to access variables across movieclips:
- Movie A contains an empty Movieclip and loads Movie B into the empty movieclip. (no levels used) So now movie A contains movie B.
- I use an extra timeline in movie A for variables (does this make sense? see below). There I want to set the variable 'serie' to "srpo1001".
- As soon as the movie B starts playing it wants to know what 'serie' in movie A is set to, because it needs this information to access the proper database via PHP & mySQL.
I tried referencing by _parent.serie or _parent._parent.serie (how many _parents do I really need?), but tracing still shows serie as 'undefined'

How do I properly access variables in other movies? Do you have any tips for using variables at all? When gets a variable lost (by entering the next keyframe)? Maybe you know a useful tutorial? I found only courses for $900 and up

thanks a lot
  #2  
Old 09-05-2002, 08:27 AM
swoop's Avatar
swoop swoop is offline

swoopy HyperModerator
 
Join Date: Jun 2001
Location: England
Posts: 1,562
Rep Power: 13
swoop is on a distinguished road
hi schlumpf,

keeping actions and variables stored in their own layer on the main timeline is a good idea. This means that it is easier to keep track of.

With regard to the question of multiple '_parent.'. You will need one '_parent.' for each level that you want to go up. If however the variable is on the main timeline, it can be reached quickly and easily by using: '_root.' To help keep track of variables when you are not sure what they are doing, you can use the trace (); command. This displays the variable specified to the output box in test mode.

If you have anymore questions then just ask. If you can't get your file working then post it up here and we'll have a look.

swoop
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
access variables in functions chosen Actionscript 2.0 1 03-22-2007 06:49 PM
LoadVars giving problems. can't access the variables dany Flash MX ActionScript 2 06-20-2005 10:20 AM
sending variables to other movies? mydave General Flash 2 07-23-2004 10:14 AM
Passing Variables to movies JonnyPop Flash MX 2004 2 02-04-2004 09:21 PM
How to access variables in child MC ? Amn Newbies 3 06-27-2003 02:24 PM




All times are GMT. The time now is 07:57 AM.