473,396 Members | 1,987 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Using a scene's variable in a movieclip

2
Hi

First of all I am new to Flash\Actionscript and I am using CS3.
I have some in main scene and also have some other in one of a movie clip's frames. I want to use a variable declared in main scene , in my movie clip's frame.

How can I achieve this ?


Regards,
Akin
Feb 19 '08 #1
3 3911
nomad
664 Expert 512MB
Hi

First of all I am new to Flash\Actionscript and I am using CS3.
I have some in main scene and also have some other in one of a movie clip's frames. I want to use a variable declared in main scene , in my movie clip's frame.

How can I achieve this ?


Regards,
Akin
Not to sure what you want. Do you want to make a button to goto the other scene?
Please explain more clearly. Give me an example please.

nomad
Feb 19 '08 #2
akhin
2
Not to sure what you want. Do you want to make a button to goto the other scene?
Please explain more clearly. Give me an example please.

nomad
There is a scene which users control with keyboard. You can accelerate with "up" key. I store speed in a variable.

What I want to do is displaying speed in a lcd-like movie object. It has a function called "setnumber (...)" so I can set the number on LCD. So I want to pass the speed parameter in main scene to the function in movie object.
Feb 19 '08 #3
nomad
664 Expert 512MB
There is a scene which users control with keyboard. You can accelerate with "up" key. I store speed in a variable.

What I want to do is displaying speed in a lcd-like movie object. It has a function called "setnumber (...)" so I can set the number on LCD. So I want to pass the speed parameter in main scene to the function in movie object.
I have not done this myself...
But I would do a goggle on ActionScipts key objects.
I know it will start something like this

on (keypress "S") {
action event here;
}
on (kepress "D") {
action event here;
}

nomad
sorry I hope I gave you some help
A book you might want to look into is "Flash MX 2004 ActionScript Bible by Robert Reinhardt
or any other Flash that uses ActionScripts.
Feb 19 '08 #4

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

Similar topics

6
by: msigwald | last post by:
The following line of code works, however, since my professor is a real purist of c, I would like to know if this code is valid (is it good code or a piece of crap?): #define DMP_FILE argv ...
0
by: crazyone | last post by:
I've got a gaming framework i'm building and i want to save myself the trouble of reading and writting the complete game data to a custom file and load/save it to an XML file but i'm getting...
1
by: indhu | last post by:
Hi all, I want 2 know, how to populate using 2 combo box to populate other field. right now am using click event of combo to populate the other field but i want to select both combo1 and combo2 ...
1
by: veenathi | last post by:
i am trying to write code for coping a certain portion of movieclip into another movieclip. for that i draw big stage movieclip. (stage_mc).Then i draw small rectangle movieclips on the stage...
2
by: chinmayagoyal | last post by:
Hello, I have been working on a dragonball z game recently and I have encountered a problem with the sprites.I have traced the bitmap and everything else and even created a movieclip of the sprite.I...
0
by: sschus1 | last post by:
I keep getting a "Missing ; from statement" Also how do you reference the linkage id? I'm completely stuck. What i am trying ot do is write a script that selects a movieclip from the library,...
1
by: ZenQuickZen | last post by:
This is a script for a character that walks in 4 directions. That works fine. I have also added other random movieclip animations for other keystrokes. I want a movie clip to play through when a...
1
by: chromis | last post by:
Hi, This should be really simple to do and has really got me stumped. I have a movieclip inside a button, the button is called my_btn and the movieclip is called my_movie. What i want to happen is...
8
by: chromis | last post by:
Hi, I've been struggling to get sounds to work with attachSound when the sounds are stored in a swf loaded into another swf. I came across a post on a forum which supposedly explains how to to do...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
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...

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.