473,748 Members | 2,658 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

call _root from movie clip

37 New Member
Hi all,

Please help me with this problem. I'm new in flash and actionscript, sorry if my question is too easy. I have a variable name _root.test at Scene 1, and I have a movie clip name Answer, what I need to do is to set another variable the value of _root.test in the movie clip.

I try to do this code :

testMV = _root.test;

and

testMV = _root._root.tes t;

but nothing happened.

For you information, I set the value for _root.test with javascript, but it display fine. Please help me...
Aug 29 '07 #1
2 3026
BadFeeling
6 New Member
Variable names can't contain reserved Flash keywords, so don't name your variable with "_root." ----- that is what you would use inside the movieclip to retrieve the variable from the main timeline.

/BF
Aug 29 '07 #2
teenIce
37 New Member
Variable names can't contain reserved Flash keywords, so don't name your variable with "_root." ----- that is what you would use inside the movieclip to retrieve the variable from the main timeline.

/BF

After my try and error method, I have discover something. My variable can read fine if it in frame 3 and later, but not in frame 1 and 2. Any idea why? This is a frame in the movie clip.
Aug 30 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
3327
by: torbs | last post by:
I have a problem when I use javascript to get the length and position of a movie I recieve from a rtsp stream. The length and position is extremely high and not the actual length and position of the movie. When I try Real Player and it's methods I recieve a length and position of 0.
10
4906
elamberdor
by: elamberdor | last post by:
Hello All! Well, I can load in swf's just loverly, but what I have is a sliding menu, with buttons in it, that when pressed, load an image into an empty movieclip. I really just need to know how to target back to the _root of the whole movie. It works great when the buttons and empty movieclip in the same stage or same movie clip, however I need to work out the right script to target right back to the root where i want the image to sit,...
0
2858
by: RLW | last post by:
Hi, I inherited a Flash usability problem: It's a self assessment test created in Flash. I think it was originally built using individual flash files for each question and arrays. Now it has been modified slightly. Each question is in it's own movie clip and the whole test (all the questions) is in a container clip. When the user checks a box they can no longer scroll using the MouseWheel on a PC.
0
1986
by: deluxmilkman | last post by:
I have a movie clip with a gradient mask. now I would like to have the bounding box of this movie clip reduced to the visible(masked) area, so that I can get its x and y positions. is it even possible? mc1.cacheAsBitmap = true; mc2.cacheAsBitmap = true; mc1.setMask("mc2");
2
3678
by: robtyketto | last post by:
Greetings, I have workable code to allow movie clips to be dragged around. However I can't find an example of a drag n drop where the movie clip has to be placed with a certain range/xy cordinates on a movie clip. For example I have a .gif of a grid of 2x2 squares how do I setup different instances of movie clips for each square to be able to detect when a object and has been dropped into it (A bit like when you can define hit areas on...
2
2632
elamberdor
by: elamberdor | last post by:
A main movie on the root directory, calls in swf's on button press from "flash" folder, each contain one XML field that updates for each. XML located in flash folder. The XML displays fine when it loads into a flash movie on the page, however, when that movie is called into another movie - the XML content wont display. Any ideas? not sure if: this._lockroot = true; will help, but i put it in my swfs anyways.
1
5457
by: gusheneshin | last post by:
hi everyone im Using this code to Creat a Movie Clip and load a movie "SWF" into this Flash ------------ stop(); loady._x = 226.4;this.createEmptyMovieClip("loady",5);
1
3000
by: angelicdevil | last post by:
ok wat i m trying to do it get flash to read a xml file and load the titles in xml as a button into the imagetitles movie clip made on stage in flash . so that when i click on a title it displays the corresponding image, name and description form the xml onto the stage in respective movie clips. but its not loading the xml titles into the imagetitles movie clip i m uploading the zip file of the xml that i have at present ...plz check and...
0
1977
by: angelicdevil | last post by:
i hvae a movie clip tht loads thumbnails from images folder by reading the location of image from xml file... the problem is i have put up a scroll bar but its not working i.e its not scrolling the thumbnails' movie clip contents i m uploading the fla...plz see and help ...plz point out the line of code i need to change i think its the scrolling function. thanx
0
8832
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9561
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9332
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9254
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8252
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6799
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4608
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.