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




Relation Of Frame1 And Frame 3 Script



In frame 1, I use sth like this script
function makeMove(myScore, yourScore){
// Have a shoot
if(turn == "C"){
myScore += 5;
//doSend(myScore, yourScore)
} else {
yourScore +=5;
//doSend(myScore, yourScore)
}
}

in frame 3, I use this for my button
on(press){
makeMove(11, 3)
}

but the variable doesnt pass to frame 1.
Do anyone have any ideas how to work it out?



FlashKit > Flash Help > Flash Newbies
Posted on: 09-09-2006, 11:18 AM


View Complete Forum Thread with Replies

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

Prevframe On Frame1/nextframe On Last Frame ?
how to tell a target (movie clip)to go to the last frame when clicking a "tell target prevframe"button on scene? symmetric question with "tell target nextframe" button bringing the movie clip back to frame 1?

Syntax Question: On Frame Load Got And Play Scene1 Frame1
hi... i need help!!

i have started a project using multiple scenes to show different bits of information kind of like a time line.

unfortunatly the people i have made it for want anouther scene to start the project off, like a front page.

is there a way i can change the scene formation? if not could i just do an onload function to send it to the first scene? how would i do this?



many thanks!

Frame Change To The Relation Of 'ymouse'
I have a scroll bar the is in a series of 29 frames. Depending on the height of the mouse I want the frame number to change. It mainly work exept one thing It's a little to jumpy. How can I change this??
Please help.

Thanx, I'll attach a file aswell.


Code:
onClipEvent(load) {
move = false;
drag = false;
screenWidth = 500; //your screen width
numberOfFrames = 29; //number of frames in your shotgun anim
ratio = screenWidth/numberOfFrames; //create 29 sections, each 560/29 (screenWidth / numberOfFrames) in length
}
on(press) {
_root.scrollBar.bar.gotoAndStop(frame);
}
on(dragOut) {
_root.scrollBar.bar.gotoAndStop(frame);
}
onClipEvent(enterFrame) {
yMouse = _root._ymouse; //position of mouse on screen
frame = ((yMouse - (yMouse%ratio)) / ratio)+1;
trace(frame)
}

What Gets Loaded On Frame1?
I have optimised my project but i still get 38K on frame 1. I cant figure out whats getting loading.
Not using a document class
I have set the classes to export on frame 3
Movieclips exported for actionscript are on frame 9
Movie initiates on frame 10

Could it possible be something to do with the classpath imports? I'm using tweener

portfolio.swf Movie Report
---------------------------

Frame # Frame Bytes Total Bytes Scene
------- ----------- ----------- ----------------
1 38393 38393 Scene 1
2 1 38394
3 272 38666 (AS 3.0 Classes Export Frame)
4 1 38667
5 11 38678
6 1 38679
7 1 38680
8 1 38681
9 111723 150404
10 7493 157897
11 19 157916
12 1 157917
13 1 157918
14 1 157919
15 1 157920

Scene Shape Bytes Text Bytes ActionScript Bytes
------------------------- ----------- ---------- ------------------
Scene 1 40 0 0

Symbol Shape Bytes Text Bytes ActionScript Bytes
------------------------- ----------- ---------- ------------------
tx_info 0 106 0
tx_loading 0 36 0
preloading 0 0 0
arrow 0 0 0
bt_prev 0 0 0
color 0 0 0
testblur 0 0 0
mc_thumnail 0 0 0
blank 31 0 0
Symbol 1 0 0 0
empty 0 0 0
green bg3 0 0 0
green bg2 0 0 0
green bg1 0 0 0
blacktreees 0 0 0
scrollingbackground 31 0 0
logo 0 0 0
mc_test 0 0 0
mc_screenshot 0 0 0
tile 29 0 0
hitarea 24 0 0
logo2 0 0 0
Circle 0 0 0

Font Name Bytes Characters
---------------------- --------- --------------
PF Tempesta Seven Bold 8 pts 3450 .0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklm nopqrstuvwxyz
PF Tempesta Seven 8 pts 7110 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~ˆ˜–—‘’‚“”„†‡•…‰‹› €™
PF Tempesta Five 8 pts 1417 ./0123456789:BKadgilno

ActionScript Bytes Location
------------------ --------
38664 ActionScript 3.0 Classes

Bitmap Compressed Compression
----------------------- ---------- -------- -----------
ajax-loader.png 198 1024 Lossless
bg3.png 19334 552000 JPEG Quality=100
bg2.png 15872 801600 JPEG Quality=100
bg1.png 19521 1875200 JPEG Quality=100
blacktrees.png 37390 1257600 JPEG Quality=100
arrows-copy-2.png 6076 43524 JPEG Quality=100
bg-tile.jpg 453 15224 Imported JPEG=102
logo-green.png 6822 49800 JPEG Quality=100

Movie In Frame1 Then Go To Frame2
I'm loading a movie in an empty movie clip on frame 1. How do I go to frame 2 after the movie has finished loading?

[F8] Referencing Buttons Not On Frame1
Hi, I'm hoping someone might be able to help me with my problem.

I have a movieclip(MC_2) nested inside another movieclip(MC_1). MC_1 is on the first frame of my main timeline. My actionscript is also on the first frame of my main timeline on its own layer.

My basic problem is that I can't seem to reference buttons in MC_2 if they are not on frame 1. I have also tried adding the code to the button but that doesn't work either.Is this something to do with the buttons not existing when the script is executed?

Can anyone help me with this?

Any help is much appreciated.

AS 2 Referencing Buttons Not On Frame1
Hi, I'm hoping someone might be able to help me with my problem.

I have a movieclip(MC_2) nested inside another movieclip(MC_1). MC_1 is on the first frame of my main timeline. My actionscript is also on the first frame of my main timeline on its own layer.

My basic problem is that I can't seem to reference buttons in MC_2 if they are not on frame 1. I have also tried adding the code to the button but that doesn't work either.Is this something to do with the buttons not existing when the script is executed?

Can anyone help me with this?

Any help is much appreciated.

Using And Interval On Frame1 Problem
Hi,

I am having problems with getting a function that is on frame1 with an interval to work for my movie clips not on frame1 (works fine for movie clips on frame1)

why is this??

do I need a special syntax??
ie syntaxt for frame1 mc's:
var colorInfo:ColorTransform=frame1_mc.tf_txt.transform.colorTransform;

sytaxt for !frame1 mc's:
var colorInfo:ColorTransform=(somethingSpecial).frame2_mc.lx_txt.transform.colorTr ansform;

??

or am I not supposed to be able to have access to mc's on different frames?

How To Return To Movie1, Frame1 Of Any Movie ?
I've got a Flix-encoded swf video wrapped in a player. When it gets to the end of the video it loads an external swf which is simply a screen with three buttons.

The three buttons are:

Close window (the video is in a pop-up)
Got to URL
Replay video

I can at least get the "goto URL" working alright, but am having problems with the other two.

What code do put on the button to close the window ? And more importantly:

What code will return me to the first frame of the original swf ? I've tried goto and telltarget but am obviously doing something wrong.

And here's the other bit: I'd really like this final three-button swf to be generic. That is, I'd like it not to name any particular swf in particular, but merely point to the start. That way I can drop this same little swf into all the videos I'm making without having to customise it. That'll save a lot of time.

Very grateful for any thoughts or links

Import Mx.remoting.* On Frame1, Not Available On Frame2
I receive a "class 'CLASSNAME' could not be loaded when I try to use the remoting classes on frame2 of my main movie, which on frame1 loads the necessary classes. Any ideas as to why they are suddenly unavailable?
Thanks
bh

Bandwidth Profiler And Frame1 - Problem
Got a problem here...

I have created quite 4 scene flash app.
In scene one I have a preloader which works quite well apart , except that in frame 1 (i see it in the bandwidth profiler) there is a large chunk of data 64 K which wants to get loaded prior to the preloader running. This makes the app seem "stalled".

Before answering : "Yeah the problem is you are exporting yr movies to frame1 in the linkage", I have nothing exporting to frame1.

Any suggestions what this data could be.

tks

F8 Verbage External To FLV On Frame1 & At End Of Video
I have successfully created a mock of the FLVPlayback component on frame1 with a button that advances to frame 2 where the FLV actually starts playing. This allows me to use still image MCs and copy that prevents an FLV that is not on autoplay from looking like a blank black screen.
http://www.cincinnati.com/sponsors/n...eatureFLV.html

I would also like to have messaging at the end of the video encouraging actions such as attending an event or calling or clicking. Often this would include still images and or a logo. I tried putting the instance of the FLVPlayback in an MC called mcVideo with an extra frame on that MCs timeline that displays the ending art and action copy. But no matter what I try I see nothing but a stopped video at the end of my Flash movie. I keep thinking that after the nested video MC plays if I could only get the timeline to advance to one more frame I could do this. Am I going to have to create a cue point and then have it go to the frame that displays the ending copy?

Can I create a cue point in an FLV afte it has been encoded?

Drop Down Menu Playing From Frame1 Again
I have create a drop down menu and if you try and move over a particular area somehow it plays my little short fade in animation again.
I have uploaded the button to provide clearer demonstration.
So i just need to do something so it doesnt repeat from frame 1

Preloading FLV At Frame1 Then Plays At Frame2
hi guys. i need help. i have flv videos that should play at the beginning of every scene in my flash movie. my problem is to preload it before it starts without setBuffering it because yea, it preloads the vid but its actually playing the main timeline which jumps to the next event(particular frame) before the video even finishes. I NEED to have the video play and end ON TIME so the event right after that video plays ON TIME(no jumping in between).i could only think of using preloader just
right before the flv starts so it will run smoothly and end ON TIME. now my question is, how to preload a video using the netstream method in my case? i was thinking if
i could preload the video on frame1 then the NetStream.play("blah.flv") should be placed in frame2 but i'm not really good in building syntax.can you guys help
me out?

you can check my newly uploaded (buggy) site to check:
http://www.theanimeister.com/PRIME
*there is s splash page. after that, the video should start loading.

thank you guys for your time. i hope u can help me out.

EDIT**
SO, i decided to use FLV Playback instead so i can get it to detect when the flv finish playing using addEventListener this time. i was also able to get a kinda working preloader for the flvplayback component but i want to put a text displaying the progress(bytes loaded) please help. thanks.

my script so far (at firstframe)

import mx.video.*;
var listenerObject:Object = new Object();

my_FLVPlybk.progressInterval = 001;
my_FLVPlybk.autoPlay = false;

listenerObject.progress = function(eventObject:Object) :Void {

var perc = Math.floor(eventObject.bytesLoaded * 100 / eventObject.bytesTotal);
this.loading_mc.load_txt.text = perc + "% loaded.";

if(perc == 100)
my_FLVPlybk.play();
}

var listenerObject2:Object = new Object();
listenerObject2.complete = function(eventObject:Object):Void {
_root.gotoAndPlay("menu");
// or
// _root.gotoAndPlay(3);
};
my_FLVPlybk.addEventListener("progress", listenerObject);
my_FLVPlybk.addEventListener("complete", listenerObject2);
my_FLVPlybk.contentPath = "flv/intro.flv";

Frames...need To Go To Flash Frame1, 2, And 3 And Back...
How do I make my button with this actionscript code go to more than one frame,

I want to be able to go to frame 1, then to frame 2, then to frame 3 and back to frame 1.

when i use code below it will default to frame 1 and if I click on button it will go to frame 2 and back to 1 but it will not go to frame 3. How do I do this?

here is the code:
on (release) {
gotoAndPlay(1);
}

I was trying it like this but it does not work
on (release) {
gotoAndPlay(1,2,3);
}

I was trying it like this but it does not work
on (release) {
gotoAndPlay(1-3);
}


If anyone can help that would be great or knows what I am talking about or can help me,
Dan

Bandwidth Profiler And Frame1 - Problem
Got a problem here...

I have created quite 4 scene flash app.
In scene one I have a preloader which works quite well apart , except that in frame 1 (i see it in the bandwidth profiler) there is a large chunk of data 64 K which wants to get loaded prior to the preloader running. This makes the app seem "stalled".

Before answering : "Yeah the problem is you are exporting yr movies to frame1 in the linkage", I have nothing exporting to frame1.

Any suggestions what this data could be.

tks

Component Making Preloader Hang At Frame1
Hi
I'm having some problems trying to get my preloader working properly.
It hangs at frame 1 for about 7 seconds before playing my loading animation.
there's just a blank screen
I've found that it is because of the linkages with the scroll bar component.
I've tried unlinking them but as you probably know it stopped working with
in the movie.
does any one know a work around?

Callback Function Declared On Frame1 Not Available Later In The Movie?
How come if I declare a function for a callback on frame 1 & also set the callback event on the same frame it will not work for a clip on frame two?

Eg.

Frame 1.

code: function tip(){
trace("Here!");
}
_root.button_mc.onRelease=tip;

In frame 2 I have the button instance (button_mc).

I can only get the callback to work if I use it on the same frame as the clip(Frame 2.) Variables declared on frame 1 are available to any script on any frame of the same timeline – why not functions?

Flash Movie Flickers When Return To Frame1
I have a flash movie that plays once you click the submit button. The elements in the last frame match up with those in the first. However once the the movie gets the the end (frame 135) and gotoStop on frame 1 theres a flicker. Any way of avoiding this?

You will see that after it says "thank you. youve been added to the mailing list" the flicker happens.

Ive included the original fla (only 411kb unzipped) as well as a link the the swf.

Netscape/firefox PrevFrame() Defaults To Frame1
Can anyone help in this situation.
A movie has many named frames, navigation is either by 'Previous button' and 'Next button' or by radiobuttons to a named frame.
Navigating forwards is not problematic.
Navigating backwards causes the movie to default to frame 1 using netscape/firefox. IE has no problems.
Please, can anyone state how to prevent the defaulting to frame 1.
Is it an actionscript problem or is the problem elsewhere?
Thanks

Looping To Load Jpgs From A Folder On Frame1
hi i have 5 jpgs in a img folder (001.jpg, 002.jpg, and so on).
i am trying to load them sequentially on my frame1 and when it reach to the last frame it will load the next jpg.
what's the easiest way of getting this done? pls help.








Attach Code

this is what I have so far but it's not working properly.

total = 5;
i ++;

if (i > total) { i = 0; }
img_holder.loadClip("img/00"+i+".jpg");

On Press Play Frames 24-64 Then Goto Scene2 Frame1 ?
I have five buttons that on press goto different scenes.

What I would like to do is on each of these buttons is on press play frames 24-64 then goto scene (each button goes to a different scene within the movie)

I am a newbie so you'll have to spell it out to me.....sorry!

Regards
Troy

I Have Dozen Of Instances Of The Same Mc On The Timeline: Eg. Mc_1 (frame1) Mc_2 (
I have dozen of instances of the same mc on the timeline:
eg.
mc_1 (frame1)
mc_2 (frame2)
mc_3 (frame3)
....

Those mcs has inside dyn. text field like "my_txt"
In "my_text.text" I assign every time (for certain frame) other text.
It works, but now I need to add scrollbar component and in this case the comp. don΄t work.

Exist some more efficient way how to work with the same txt field if on other frame other text needed?

I hopeYou undestand what I mean.

Regards Jan

Still Image On Frame1 In Flash 8 Media Playback Component
I have been using an actionscript FLA for MX 2004 that has the video embedded on the Scene1 timeline. This allowed me to use still images on frame 1 and verbage movie clips that urged people to some type of action ie watch the video.

The video I was provided for this project uses a codec that will only play with Flash 8 and on import the dialog informed me that I cannot edit this video because of the codec used.

So I decided to try the mediaPlayBack component and converted the video to an FLV on import. This gives me a 1 frame FLA and no ability to manipulate the timeline by placing a still image only on the first and last frames of the timeline AND it does not seem I have access to the video timeline since it is streaming it from a particular URL. This is a pretty long video.

So I have a really cool still image MC on frame 1, but pressing the play button starts the video which you cannot see because the still image is blocking the view of the FLV. Is there a way around this using the mediaPlayBack component?

I have continued to use my MX 2004 video player FLA in Flash8 but got warning dialogs when I attempted to use it with this particular video presumably because of the codec used.

[as] MCs In MC In MC, _x And _y Relation To Root
The problem:

I have a MC, let's call it box3_mc, that's inside of box2_mc, that's inside of box1_mc. All the boxes (mc's) are placed on random _x and _y.

Now, what I want to do is determin the distance between box3_mc, and the top of the stage.

This could be done by just adding the distances:

distance = box1_mc._x + box2_mc._x + box3_mc._x;


The Challenge:

But let΄s say box1_mc doesn't have an instance name, is there any other way to determine the distance between box3_mc and the top of the stage?

Check Where 1 Clip Is In Relation To Another
I have a cops n robbers type game on the go and i have hit a problem.
I need the cop to stop and look around him

The game is over when the cop hits the robber, so that is just a hit test, but each cop has a random sight distance.
I want to be able to check if the robber is in the radius of sight (so draw an imaginary circel and check if robber is in it) and if robber is in it then change direction towards the robber
any ideas?

Play Mp3 Without Any Relation To Frames
i need help......
i am using flash mx . i was in the work of creating an autorun for a personal cd of mine.... A problem came through. i need to play an mp3 file without importing it in to the frames. i have to do it with action script.
it must be like this when clicking oa button, the mp3 file should play on next click it shuold stop
pls help me....

[F8] Tweening In Relation To An Object
I have read how to use the tweening class, but how would I tween an object to move and stop 20px above another object? thanks
Dan

Rotation Of A Mc In Relation To A Point
Hello!
This is my first post on actionscript.org
I'm working on a thing that needs to rotate according to a position of another mc. Like an arrow pointing at something.

I'm working with atan2 with this code


Code:
onClipEvent (enterFrame) {

delta_x = this._x - _root.mc._x;
delta_y = this._y - _root.mc._y;

this._rotation = (Math.atan2(delta_x,delta_y) * (180 / Math.PI));
// * 180/ Math.PI to convert in degrees

}
I know that you know this one....

thanks

Dials Rotating In Relation To One Another
hi again.

i have been playing around with a draggable circle. and have craeted this fla file.
When you rotate the small circle the larger circle rotates in relation to it.
i think it works pretty well, its gonna be an interface for a website.
My only problem is that when i drag the central ring past nine oclock from twelve oclock the circle stops and changes direction.

i realise why this is doing it because the value jumps from minus to plus, but can anybody think of a way around this so that it is smooth without jumping.
I thought i would throw it out there for everybody, any help would be greatly appreciated

Thanks

michael

Finding Where You Mouse Is In Relation To An MC
I'd like to be able to find out where my mouse pointer is in relation a a movieclip and translate this in degrees. The catch is I need the center of the clip. Attached is a diagram as to what i mean. Please let me knwo if you need me to explain it better.

Setup:
circle_mc (on main timeline)

Speed In Relation To Distance...
Hi,

Is there a way i can make a movieclip speed up or slow down according to the distance between the mouse and the movieclip? I've made a friction effect for a movie clip (script 1) and i have a script to work out the distance between the mouse and the movieclip (script 2) but i cant seem to integrate the two...anyone done this? ...any help on this would be great...

Thanks...








Attach Code

script 1 - friction.


xmov = 50;
decay = .99;
this.onEnterFrame = function() {
if (_root._xmouse > Stage.width/2) {
this.cam.x += xmov;
}
}

script 2 - distance

mc1 = this.cam.x
onEnterFrame = function() {
var dx:Number = mc1._x - _xmouse;
var dy:Number = mc1._y - _ymouse;
var dist:Number = Math.round(Math.sqrt((dx*dx) + (dy*dy)));
trace(dist);

}

LoadMovie And Relation In Code
Here's my problem: i got a main SWF playing. At the end, another swf is loaded inside an MC named dropZone with "loadMovie" actionscript.
but inside my second swf, i got a dynamic textbox called content_TXT in an MC named texteMC who load a html file, and a custom scrollbar called slider.
If I do CTRL+ENTER to test the movie itself, work fine, everything is scrolling right. but if i put all thing on web server, the scrollbar is no more scrolling the dynamic text. here's some code:

texteMC actionscript
onClipEvent (enterFrame){
_parent.texteMC.content_TXT.scroll = _root.slider.b;
}

slider actionscript
onClipEvent (load){
setProperty (this, _x, int(_x));
}
onClipEvent (enterFrame){
a = new Object();
a.y = this._y;
a.x = this._x;
_parent.path.globalToLocal(a);
b = int(a.y/(100/_parent.texteMC.content_TXT.maxscroll));
}

IF anyone can help to solve this scrolling problem, that's gonna be great. I'm sure this is a question of _root or _parent somewhere but can't put the finger on it....





























Edited: 10/03/2007 at 08:17:08 AM by Raskriall

Speed In Relation To Distance....
Hi,

Is there a way i can make a movieclip speed up or slow down according to the distance between the mouse and the movieclip? I've made a friction effect for a movie clip (script 1) and i have a script to work out the distance between the mouse and an object (script 2) but i cant seem to integrate the two...anyone done this? I dont understand the distance script 100%, i pretty much got it from a book i own....any help on this would be great...

script 1 - friction.

Code:
xmov = 50;
decay = .99;
this.onEnterFrame = function() {
if (_root._xmouse > Stage.width/2) {
this.cam.x += xmov;
}
}
script 2 - distance

Code:
var mc1 = largest_mc;
onEnterFrame = function() {
var dx:Number = mc1._x - _xmouse;
var dy:Number = mc1._y - _ymouse;
var dist:Number = Math.round(Math.sqrt((dx*dx) + (dy*dy)));
trace(dist);

}
Thanks...

Javascript Flash Relation
Hi, I currently make a website in html. creating a website from a photoshopdesign in html goes quite ok. I only want my site to be more interactive and alive so I want to move on to creating pages in flash. I therefore looked at the source of some professional flash pages and i see lots of javascript. I know almost nothing about javascript, so my question is...Is it neccesary to have a good knowledge of javascript when you want to create a websites in flash? What i always thought is, you create flashfile and then put it in a html file like a single image.
If someone would explain this to me i would really appreciate it.

Loadmovienum And Unloadmovienum In Relation To Levels
Hi guys this is my 3rd post on this subject. I am on with a project at the moment where I simply or so I thought load external swf's into differnet levels on the main stage yet some buttons work and some dont. I have tried every combination to try and get this working but have failed each time. Now due to my ever increasing frustraion I have now placed the project online and included the FLA's so if anyone with MX would care to download them and see what is going wrong I would appreciate it.

The link is as follows http://www.gallstone-surgery.com/site/index.html

cheers

aaron

Playing MovieClip In Relation To Drag.
How can i have it so that when someone presses the mouse, and drags it say, 100 pixels to the left, a movieclip will play, corresponding to how far you have moved the mouse. So if you have clicked+dragged 50 pixels the movie will have played half of its timeline, drag of 25 pixels = quater played.? Also so that you can drag it back and forth - altering the movieclip constantly.

Cany anyone help? Thanks.

Flash Detect, In Relation To GoogleBot
I'm searching for the best method for flash detection,
in its relation to GoogleBot.

The GoogleBot has kicked back a number of submissions,
due to the site not allowing the user to make use
of the browsers back button.
I've found a way around this by using javascript (ie history.go(-1)).

So now i face a new question.

What if the user has javascript turned off?

Even if i use a different method of detecting flash,
the code that fixes the issue of the browsers back button
is no longer seen by the browser.

SO.....the ultimate question >

how can i both make use of
- "flash detection (which redirects the user to other webpages)"?
- and "allow the back button to redirect back to google"?

Making 3 Movieclips Work In Relation To Each Other
hey

please see the attached .FLA....

as you can see there are three grey boxes and three red buttons. When you click the red button it causes the respective box to move up or down, imagine it closed by default and open when down after clicking the button.

the effect i need to create is that if boxs 2 and 3 were open and box 1 was closed, clicking the box 1 button would cause boxs 2 and 3 to shut first and then box1 would open. This would work with any combination of boxes.

The result would be that if you clicked a closed box button it would shut any open boxes first.......

hopefully this makes sense, i have a very very basic knowledge of actionscript and have tried to work it out myself but just doesnt seem to want to work. Any help would be hugely appreciated.

cheers all

bast

Movieclip Position (X-Y) In Relation With The Scene
Hi, been trying to figure out an easy way to determine the X-Y coordinates of a movieclip which is already inside another movieclip. The parent movieclip is not animated, and the movieclip inside moves up and down.

If I ask to trace the coordinates of the object, it gives me the coordinates the movieclip has INSIDE it's parent.


Code:
trace("_root.parent_clip.target_clip._y");
I'd like to be able to determine it's position in the global scene. Is there a way ?

Thanks !

Mute Btn Problem(relation With Slider)
hi all

i have three problems
1) mute btn is not working properly in relation with slider
when i click play and then click mute it mutes and then again pressing mute it doesnt unmutes but the sound doesnt play

2)timer showing 00:00 when clicked play then pause then play then stop and again play (timer shd show song timing)

3)scrubber playhead is coming from 0th position not coming from where the loader position

here is the attached file and click the FM channel the controls will be shown

BG Scrolling In Relation To Mouse Coordinates
Hi all!...

I'm making a site where I want the background image to pan/scroll in relation to the mouse placement. As in...if the mouse moves to the bottom left corner of the stage, the "camera" pans down to the bottom left corner of the BG image (thus technically the BG image pans to the up right). Additionally, I want the BG image to ease as it pans. I've been searching the forums for about 2 hours looking for something relating to this and I can't find a thing!
I know I need a mouse listener, but from there I don't know where to go...I really new to Actionscript, so I really appreciate your help!

Thanks so much!!!

An example of what I want can be found at:
http://www.karlaweb.tk/
by clicking on "entrar a disfrutar" and then clicking on "Experimental."

Track Mouse In Relation To A Specific MC
I'm trying to build a button that controls the movement of a movieclip. I want the _xmouse position in relation to the button to determine the speed at which the movieclip moves. How do I track the position of the mouse in relation to a specific movieclip and relay this information back to the move function?

How To Make Mc Move In Relation To Scrolling?
How do I make an mc move in relation to the amount I scroll a text? I am not advanced enough to be able to break down the (Flash UI)scrollbar component and change it to my own liking (if it's possible) so I'd like to fake it.
I have two mc's that make my text scroll up or down and I'd like to have a mc moving in between them like a regular scrollbar.
The code on the mc's that scroll:

ActionScript Code:
this.onEnterFrame = function() {    if (pressing == true) {        _root.mcholder.texten.scroll = _root.mcholder.texten.scroll+movement;    }};

and on the button:

ActionScript Code:
on (press) {    pressing = true;    movement = -1;}on (release) {    pressing = false;}

with movement =+1 on the other button


or can someone point me to a tutorial?
Thanks in advance

Position Of One MovieClip In Relation To One Underneath
Hi folks,

I would like to return the x and y co-ordinates of one MovieClip in relation to another.

So, for example, if I had a movieclip of a small square (small1_mc) over/on a higher layer of a larger square (large1_mc) I need to know where the registration point of small1_mc is on large1_mc. I need to do this without using the cursor position i.e. so I would like a user to be able to click a button that returns the position rather than clicking on small1_mc.

I would appreciate any help because the only way I can think of doing this is to record the cursor position on large1_mc when small1_mc is clicked. Sorry if this is a no brainer but it's confused me!

Many thanks

Duff

Movieclip Position (X-Y) In Relation With The Scene
Hi, been trying to figure out an easy way to determine the X-Y coordinates of a movieclip which is already inside another movieclip. The parent movieclip is not animated, and the movieclip inside moves up and down.

If I ask to trace the coordinates of the object, it gives me the coordinates the movieclip has INSIDE it's parent.


Code:
trace("_root.parent_clip.target_clip._y");
I'd like to be able to determine it's position in the global scene. Is there a way ?

Thanks !

Easing While Moving Something In Relation To Mouse?
Hey guys. I have a stack of images that I need to move down when the mouse is above y = 250 and up when the mouse is below y = 250. I have this code, but the problem is I don't know how to add easing. Can anyone pose a solution? Thanks



ActionScript Code:
onEnterFrame = function() {    someConstant = 2342;    lastIndex = picThumbArray.length - 1;    lastImage = imageStack_mc["picContainer"+lastIndex];    firstImage = imageStack_mc.picContainer0;    if (_xmouse > 750 && _xmouse < 950) {        if (_ymouse < 250) {            if (imageStack_mc._y < 45) {                imageStack_mc._y += 2;                //imageStack_mc._y = (45 - imageStack_mc._y) / someConstant;            }        } else {            if (imageStack_mc._y > (540 - (83 * picThumbArray.length + 75))) {                imageStack_mc._y -= 2;            }        }    }}


p.s. that one line thats commented out, this one: //imageStack_mc._y = (45 - imageStack_mc._y) / someConstant; is my attempt at easing , but that code just makes it zoom instantly to 45. wierd.

How To Make Mc Move In Relation To Scrolling?
How do I make an mc move in relation to the amount I scroll a text? I am not advanced enough to be able to break down the (Flash UI)scrollbar component and change it to my own liking (if it's possible) so I'd like to fake it.
I have two mc's that make my text scroll up or down and I'd like to have a mc moving in between them like a regular scrollbar.
The code on the mc's that scroll:

ActionScript Code:
this.onEnterFrame = function() {    if (pressing == true) {        _root.mcholder.texten.scroll = _root.mcholder.texten.scroll+movement;    }};

and on the button:

ActionScript Code:
on (press) {    pressing = true;    movement = -1;}on (release) {    pressing = false;}

with movement =+1 on the other button


or can someone point me to a tutorial?
Thanks in advance

Positioning And Scaling A Movieclip In Relation To The Stage...
I'm using the "Full Browser Flash" technique and all is working well with one exception, I can't seem to get a movieclip to scale itself to the stage size and then animate.

Example:

I have a movieclip that spans the width of the stage. The code to implement this technique for the FBF stage is working. What I want to do is 1) detect what the size of the stage is, 2) position the movieclip off of the stage using the detected stage size [i.e.: (._x=0-Stage.width)] and 3) animate this movieclip from it's off screen location to it final position.

Let's say the stage size is detected to be 800 pixels wide. This would scale the movieclip to 800 pixels wide. Then the movieclip would be positioned off the stage at an x coordinate of -800. Then the movieclip would animate to the x coordinate of 0.

Make sense?

Please advise. Thanks.

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