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




Playing MC Transition From Start When Button Clicked?



hey all,

when i click my button the first time my transition MC works fine but when i click it to another button it works fine too...the problem now:

when i click back to the first button it shows not the transition but only the completed transition so i get no animation

anyone have any ideas why this would be?

my code that i have on my buttons is:


Code:
on (release) {
swap1();
_root.menu_1.gotoAndStop("clicked");
}

onClipEvent (enterFrame) {

function swap1() {
if (_root.menu_1.getNextHighestDepth) {
_root.menu_1.swapDepths(_root.getNextHighestDepth());
}else if (_root.menu_2.getNextHighestDepth){
_root.menu_1.swapDepths(_root.getNextHighestDepth());
} else if (_root.menu_3.getNextHighestDepth) {
_root.menu_1.swapDepths(_root.getNextHighestDepth());
} else if (_root.menu_4.getNextHighestDepth) {
_root.menu_1.swapDepths(_root.getNextHighestDepth());
}
}
}
thanks in advance peeps



KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 09-18-2006, 12:24 AM


View Complete Forum Thread with Replies

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

Playing A Sound From The Library When An MC Button Is Clicked
hello,
i want to have an MP3 sound from my library to play when an MC button is clicked. The obvious thing for me is the addEventListener type, but I don't know the function. can anyone help? I have searched but I didnt find anything which is relevant.

Thanks

Start And Stop Streaming Sounds (start Stopping Currently Playing)
Hi there

I am novice user of flash and have no real AS experience.

What I want to do is..

I have 18 songs from an album and have taken 30 sec from each and down sampled them ready for flash.

I want to be able preview them all from one flash file.
I will be streaming the songs in, so the initial download time is minimal.

With 18 start stop buttons for each one, but because customers are lazy, they are likely just going to click the next play button for the next preview, so I need the play buttons to stop 'this' preview before playing the next with stop control also being a stop control for those who have had enough or are well behaved browsers : )

I hope this makes sense and look forward to hearing from someone.

Cheers

Ian Hill

Start And Stop Streaming Sounds (start Stopping Currently Playing)
Hi there

I am novice user of flash and have no real AS experience.

What I want to do is..

I have 18 songs from an album and have taken 30 sec from each and down sampled them ready for flash.

I want to be able preview them all from one flash file.
I will be streaming the songs in, so the initial download time is minimal.

With 18 start stop buttons for each one, but because customers are lazy, they are likely just going to click the next play button for the next preview, so I need the play buttons to stop 'this' preview before playing the next with stop control also being a stop control for those who have had enough or are well behaved browsers : )

I hope this makes sense and look forward to hearing from someone.

Cheers

Ian Hill

Start Download When Clicked...
Hi!

very simple, and also very annoying problem(because I don't know the answer of course..)

I want a button to link to a file( a document in this case) in the same folder as my webpage(swf.file). And when clicked on I want it to start download the document...easy?

very thankful for help...cheers!
/chris

FLV Start Time? Can I Start It Playing 2 Secs In?
Is there a way with actionscript to tell an FLV to start playing 2 seconds into the video. What I have is an FLV that has 2 seconds of black at the beginning, but I don't want that to play.

Or if anyone knows a way to re-encode an flv so that I can get rid of the 1st 2 seconds. I've tried re-encoding it with Riva Encoder but it just gets all screwed up. And the Flash encoder won't even let me add it to the que. Any help would be appreciated.

Thanks,
Lady

If This Button Clicked Load Mc With This Text If This Button(different One) Clicked L
if this button clicked load mc with this text if this button(different one) clicked load same mc, with different text...is this possible?

Stop One Audio Clip And Start Another When Btn Clicked
Hi,
I have an audio clip that plays, and I want the audio clip to stop and another one to play when the user clicks on a button. The button launches a popup window that's a movieclip (pop_mc. They click the exit_btn within the pop_mc and the audio for that popup stops. This should be fairly simple? Thanks for any help! Here is what I have so far:

//audio
x.attachSound("Section1_pg6");
x.start(0, 0);
musicplay = true;

//code for the button that launches the new sound and the movieclip
on (release) {
if (_root.pop_mc._visible==true) {
setProperty("_root.pop_mc", _visible, false);
} else {
setProperty("_root.pop_mc", _visible, true);
}
}

//exit button code within pop_mc
on (release) {
if (_root.pop_mc._visible==true) {
setProperty("_root.pop_mc", _visible, false);
} else {
setProperty("_root.pop_mc", _visible, true);
}
}

Dont Start Music From Begining When Link Is Clicked
Hello all, I have a small problem I made a flash file where a music file is loaded and stops and starts with buttons I have made. that works fine however when i place the flash file the music loads fine but when i click a link to go into another section of my site the music starts over.

How do i have the music continusly play through out the site when different links are clicked.

I got the code for my buttons from another members post here on the forums here is the link

http://www.actionscript.org/forums/s...ighlight=music


I just need some help on how to make it continusly play with out starting from the begining when a different link in my site is clicked.

thanx for any help or links that might be helpful.

Flash Header, Re-Playing Each Time A Link Is Clicked..
I have a flash navigation / header, and everytime you click a link on it, it refreashes the whole page (no i dont want to use frames/iframes) and then re-plays all the flash . Is there a way to keep the flash static?

Transition Tween On Movie Start
Hi

I'm developing a site using the mx transition tweens - triggered by a bt click: http://www.detkendesign.com/detken3/test3.php (still in it's early stage).

I'd like the first bt action to be triggered as soon as the movie opens - so the home bt is triggered and resets the 'holding' rectangle to it's new scale contained in the tween.

Any ideas on how this can be done - I assume changing the on(release) aspect of bt1?

Thanx for any input

Dirk


The script:




Code:
stop();

import mx.transitions.Tween;
import mx.transitions.easing.*;
MovieClip.prototype.tween = function(theProp:String, from:Number, to:Number, time:Number) {
_global.when = new Tween(this, theProp, Strong.easeInOut, from, to, time, true);
};

btn1.onRelease = function() {
//first move to center in one second witih no delay
main_mc.tween("_x", 400, 329, 1);
main_mc.tween("_y", 100, 126, 1);
// and in 2 seconds scale closer
main_mc.tween("_xscale", 100, 120, 2);
main_mc.tween("_yscale", 100, 120, 2);
_global.when.onMotionFinished = function() {

trace("ok");
};
}

btn2.onRelease = function() {
gotoAndStop("bt2");
//first move to center in one second witih no delay
main_mc.tween("_x", 0, -717, 1);
main_mc.tween("_y",0, 126, 1);
// and in 2 seconds scale closer
main_mc.tween("_xscale", 100, 120, 2);
main_mc.tween("_yscale", 100, 120, 2);
_global.when.onMotionFinished = function() {

trace("ok");
};
}
btn3.onRelease = function() {
gotoAndStop("bt3");
//first move to center in one second witih no delay
main_mc.tween("_x", 0, 329, 1);
main_mc.tween("_y", 0,-632, 1);
// and in 2 seconds scale closer
main_mc.tween("_xscale", 100, 120, 2);
main_mc.tween("_yscale", 100, 120, 2);
_global.when.onMotionFinished = function() {

trace("ok");
};
}

Transition Tween On Movie Start
Hi

I'm developing a site using the mx transition tweens - triggered by a bt click: http://www.detkendesign.com/detken3/test3.php (still in it's early stage).

I'd like the first bt action to be triggered as soon as the movie opens - so the home bt is triggered and resets the 'holding' rectangle to it's new scale contained in the tween.

Any ideas on how this can be done - I assume changing the on(release) aspect of bt1?

Thanx for any input

Dirk


The script:




Code:
stop();

import mx.transitions.Tween;
import mx.transitions.easing.*;
MovieClip.prototype.tween = function(theProp:String, from:Number, to:Number, time:Number) {
_global.when = new Tween(this, theProp, Strong.easeInOut, from, to, time, true);
};

btn1.onRelease = function() {
//first move to center in one second witih no delay
main_mc.tween("_x", 400, 329, 1);
main_mc.tween("_y", 100, 126, 1);
// and in 2 seconds scale closer
main_mc.tween("_xscale", 100, 120, 2);
main_mc.tween("_yscale", 100, 120, 2);
_global.when.onMotionFinished = function() {

trace("ok");
};
}

btn2.onRelease = function() {
gotoAndStop("bt2");
//first move to center in one second witih no delay
main_mc.tween("_x", 0, -717, 1);
main_mc.tween("_y",0, 126, 1);
// and in 2 seconds scale closer
main_mc.tween("_xscale", 100, 120, 2);
main_mc.tween("_yscale", 100, 120, 2);
_global.when.onMotionFinished = function() {

trace("ok");
};
}
btn3.onRelease = function() {
gotoAndStop("bt3");
//first move to center in one second witih no delay
main_mc.tween("_x", 0, 329, 1);
main_mc.tween("_y", 0,-632, 1);
// and in 2 seconds scale closer
main_mc.tween("_xscale", 100, 120, 2);
main_mc.tween("_yscale", 100, 120, 2);
_global.when.onMotionFinished = function() {

trace("ok");
};
}

When A Sound Stops Playing So It Can Start Playing Another Sound :Monitoring Playback
I'm attempting to do a very simple thing and I'm very perplexed. My girlfriend is an opera singer and all I'm trying to do is advance the audio track when the song finishes playing to go to the next frame. On the surface it seems easy, however I can't seem to figure it out. Perhaps you can help?

Check out the movie here: http://www.earthgrid.com/earthgrid/valentina.html


Here's my code its on frame 2 in the movie



Code:
stopallsounds();
s2.close();
s3.close();
var s1:Sound = new Sound();
s1.loadSound("Agnus_Dei.mp3", true);
s1.start();
stop();
Explanation:: the flash movie has buttons that allow you to navigate between the 3 different music tracks.

when you click on a button, first I close the loading of the previous track, ie. s2 and s3, if they are still loading.

What I'd like to do is insert a command that advances to the next track (which happens to be on the following frame, 3) ONLY when the first audio track is finished PLAYING, not finished 'loading'

something like:
s.addEventListener(Event.SOUND_COMPLETE, gotoandplay (3);
);

so that when Agnus Dei finishes playing it goes to the next frame which starts the next track.

but that' doesn't seem to work.

I found this URL in Adobe's support site:
http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=00000283.ht ml

it says this:

Your application might want to know when a sound stops playing so it can start playing another sound, or clean up some resources used during the previous playback. The SoundChannel class dispatches an Event.SOUND_COMPLETE event when its sound finishes playing. Your application can listen for this event and take appropriate action, as shown below:


Code:
import flash.events.Event;
import flash.media.Sound;
import flash.net.URLRequest;

var snd:Sound = new Sound("smallSound.mp3");
var channel:SoundChannel = snd.play();
s.addEventListener(Event.SOUND_COMPLETE, onPlaybackComplete);

public function onPlaybackComplete(event:Event)
{
trace("The sound has finished playing.");
}
>> However, when I try to paste in this code into a frame in Flash CS3 it gives an error saying I have to put it in a 'package'
I tried that, putting this code into a file and saving it as a .as file


I really don't get how to do this Package thing in CS3, so I couldnt get the example to work.

If so please contact me Please help!

Start Playing An MC
Ive got an MC which will start paying a sound, but how do i link a button to play it?

I don't want to drag it onto the stage cos the sounds will start playing straight away which defeats the object of my jukebox!

Any One Start Playing With AIR?
Does the AIR project's everything have to be started from a mxml?

I downloaded a lot of sources from adobe.com and some projects contains only an as file and a app-xml file, and some other files.
No mxml is found and the complier just cannot be launched!

>>start Playing After 10 Seconds ? Possible?
Anyway using action script to tell flash to start playing after 10 seconds without having to add 120 frames for nothing???

//John

Start Playing Mc From Combo Box
Hi everyone,

I would like to know how to start a movie clip animation when I select
an item in a combo.

I tried this without success :


combo.addItem(OMNI-RAD (Radiology), test);

test = function () {
_root.mcProducts.mcTest.gotoAndPlay(2);
}

Also I would like to remove my movie clip when I choose another item in the combo.

Thanks

Sound Will Not Start Playing Again
help....

my movie has 16 sound files

the stop button works but when I press play the movie continues but that particular sound stops.

i know i have to id the sound but i don's know where it should go.

here's the code
var stopped_ = true;
_global.roo = this;
var mySound = new Sound(roo);
mySound.attachSound();
//



button1.onPress = function() {
MovieClip.prototype.onEnterFrame = function() {
if (_root.direction == "stop"){
this.stop();
p = Math.round(mySound.position/1000);
mySound.stop();
}else {
this.play();
}
}
_root.direction = "stop";
}
button2.onPress = function() {
_root.direction = "go";
mySound.start(p, 0);
//delete MovieClip.prototype.onEnterFrame;
}

[F8] Mc Not Targeted Start Playing - Why?
I've got 3 movieclips used as buttons in a menu, each with a label "Inaktiv" on frame 1 and "Aktiv" on frame 10. When clicked the mc is supposed to move to label "Aktive" and attach another movieclip.

Well - it seems that every second time I click all mc:s go to the "Aktiv" label. Even though I don't target them! I can even comment the goToAnd Play out and they still perform this action! Why?!!

This code goes on each mc respectively:


Code:
this.mcHjernBtn.onRelease = function (){
reEnableOptions();
this.txtBtmMain.setTextFormat(btnDisableMainMenue);
this.enabled = false;
goTop(mcHjernBtn);
}
The reEnableOption() resets all mc:s whenever oneis clicked.


Code:
// reenable to be able to click any button
function reEnableOptions(){
this.mcHjernBtn.enabled=true;
this.mcHjernBtn.txtBtmMain.setTextFormat(btnEnableMainMenue)
goBack(mcHjernBtn,459.3);
this.mcOnStageBtn.enabled=true;
this.mcOnStageBtn.txtBtmMain.setTextFormat(btnEnableMainMenue);
goBack(mcOnStageBtn,486.1);
this.mcEventBtn.enabled=true;
this.mcEventBtn.txtBtmMain.setTextFormat(btnEnableMainMenue);
goBack(mcEventBtn,512.1);
}
The goTop() function with the goToAndPlay action which is supposed to make the targeted mc go to the "Aktiv" label and attach another movieclip.


Code:
// move movieclips to top position
function goTop(target){
var easing:Number = 0.2;
var topY:Number =Stage.height-(Stage.height-165);
target.onEnterFrame = function(){
var dy:Number = topY - target._y;
if(Math.abs(dy)<1){
target._y = topY;
delete target.onEnterFrame;
} else {
var vy:Number = dy*easing;
target.gotoAndPlay("aktiv");
target._y += vy;
}
}
}
I suppose the problem is in the reEnableOption() but neither me or my friends can figure it out... Code for the above functions below. Files are also attached.

Any suggestion is much apprieciated...

Snowgirl

Playing Transition In Empty Mc
I have a section of a website that loads jpegs dynamically into a empty mc on the stage. What I want to know is if I can create 1 transition to play in that mc before the image is loaded onto the stage. I would like to possibly use a masking effect, so technically the image would be there, but not visible due to the mask. Can this be done or do I need to create seperate swf files with a transition in each? Thanks!

Preloader.... Start Playing Before 100% Loaded
I recently made a website entirely in Flash (www.fiberplast.no). The final swf is 2318 kB so i added a preloader with a mc telling the user how many percent is loaded. All this works fine, but my client freaked out when he saw the final work, because the whole thing takes about one and a half minute to load.

Is there a way to start the movie when it hasn't loaded completely. 10% should be enough, then the start page would be ready and the rest could stream in.

Anyone care to help me?

I tried an extension called IK Prealoader (from http://www.macromedia.com), but I couldn't make it work..

Getting Flash To Start Playing .wmv File
I am making a stand alone Flash file on a CD and I want to get flash to trigger a .wmv movie file when a button is clicked. I don't want it to play inside the flash movie, just to open up media player and play the relevant movie.
How do I get Flash to do this?

Thanks for your help

Rob.

Start Playing At Certain Frame, With LoadMovie
Is it possible to use the loadMovie command, and start playing the external swf at a certain frame?

I've posted this before, but no one could help, so hoping someone can this time.

Automatically Start Playing Movie?
On my first frame I have ..

loadMovie("sound_file.swf", _root.clip);

i want it to automatically start playing... how would i go about doing that?

Playing Movie From The Start Within Multiple...
Hi all!

I have a problem that is driving me crazy.

I have built a movie in which I have multiple MCs that go one from another. Now once the movie goes and plays the last MC is stops. So I have tried to do gotoandplay(_root, 1) and tried couple of more and I am running out of ideas.

Does anyone know the right action for the movie to go back to the begining, which is SCENE 1 and play from the start?
All help would be greatly appreciated!!!
Thank you.

How To Start Playing Many Clips With A Different Delay For Each One?
Hi,
I have, let's say, 50 occurences of the same movieClip (a ball changing color) and I want to play them all with one click BUT not at the same time, so I need to put a different delay on each clip.
I use the following code to catch all my movieClip but then don't know how to play them with delay...


Code:
for (x in atomMain_mc){
var myMcs:Object = atomMain_mc[x];
if (typeof(myMcs) == "movieclip"){
myMcs.play();
}
thanks for helping....

When An Flv Stops Playing, Is There A Way To Get It To Loop And Start Again?
When an flv stops playing, is there a way to get it to loop and start again?

-Line

Start Playing Before Finished Loading?
Hi all.. whats the best way when I have a SWF emebdded in a page that it
will begin playing before it finishes loading in the background? Thx

SWFLoader Does Not Start Playing Loaded SWF
Hi there,

I'm building an application that's basically a frame in that another SWF file is displayed. My application loads SWF files generated by a server and displays them. As memory consumption increases over time, it it necessary that I unload the current SWF from time to time and replace it with a new SWF.
I use SWFLoader to load the remote SWF file. I create a new SWFLoader object for each new SWF and remove the old SWFLoader as soon as the new SWF can be displayed.
Now my problem:
SWFLoader sporadically does not start playing the loaded SWF. All of the SWF files that I load start with the same set of instructions. When all goes well, the SWFLoader gets some ProgressEvents and then an Event.INIT. After that the SWF starts playing. In some cases, however, I only get the progress events, but the INIT is never fired. In that case the SWF doesn't start playing. The number of bytes received reported by the progress event is the same as in the case when it goes right.
I'd appreciate any hint that can help me get along this problem.

When An Flv Stops Playing, Is There A Way To Get It To Loop And Start Again?
When an flv stops playing, is there a way to get it to loop and start again?

-Line

Sending Message From Php To Swf Were To Start Playing
Hi folks

I'm trying to build a html/php site that uses flash-menu's. When a new page is loaded (for example after I press the button Contact) I'd like the menu.swf that is also loaded again to stop with the button 'Contact' activated.

I no that it's possible to use php to send a message to the menu.swf were it should go in the timeline (like telling it which label it should go to), but I've never done this before.

Does anybody know some good tutorials on this, or does anybody have an example on how this works?

Thanks for the effort
billow99

Playing Outro Transition In Flash 8
Ok, here's the deal: I can't, of the life of me get a working outro playing into the intro of another external swf.

This is a piece of my button AS:

on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = "Sub2";
container.loadMovie("Sub2.swf");
} else if (_root.currMovie != "Sub2") {
if (container._currentframe>=container.midframe) {
_root.currMovie = "Sub2";
container.play();
}
}
}

The midframe is defined at the beginning frame of each external swf.

The first swf works and loads in the first page:

_root.currMovie = "Sub1";
_root.Container.loadMovie(_root.currMovie+".swf");

I'm tempted to believe that it is a targeting error, since the buttons are in the swf being loaded, but don't know enough about actionscript to correct it. HHAALLLPPP!!! All buttons refer to the container (the playing movie clip) but I don't know if the _root is sufficient since the Container movie clip is in the main swf

ie:

Main.swf holds Container

Sub1.swf loads into Container in Main.swf

Nav buttons in Sub1.swf play outro and load Sub2.swf, and Sub3.swf which have their own buttons and, on release, play their outro's and then load the .swf into the Container Movie clip.



IS THERE AN EASIER WAY?

Make A Movie Clip Start Playing?
hi! what's the AS for a button to make a separate movie clip start playing when i press it.

Flash Mp3 Player Won't Start Playing Automatically
i downloaded a simple Mp3 player placed it in my fla file but when i publish it the player won't start automatically... I'm missing something!!!! stuck please help

Start Playing From A Frame After This Flash Is Complete
Hi,

.Fla Link

How can i modify this flash so that after the object (or in my case several objects whereby i copy/pasted/renamed the actionscript sections) has been moved the flash starts to play from a different frame...so that i can enter a "well done" kind of message.

Thanks

<param name="movie" value="http://www.xadnet.com/files/drag_and_drop.swf">
<param name="quality" value="High">
<embed src="http://www.xadnet.com/files/drag_and_drop.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="obj1" width="303" height="302">

How To Start Off Playing Sound For PLAY/PAUSE
I am new to 3.0 and I can't figure out how to get my button to flip between play and pause with the music playing on enter frame. Help! I am sure this is super EASY!

I will post the file. Thanks in advance!


var soundReq:URLRequest = new URLRequest("nameofsoundfile.mp3");
var sound:Sound = new Sound();
var soundControl:SoundChannel = new SoundChannel();
var resumeTime:Number = 0;

sound.load(soundReq);

sound.addEventListener(Event.COMPLETE, onComplete);

function onComplete(event:Event):void
{
play_btn.addEventListener(MouseEvent.CLICK, playSound);

}


function playSound(event:MouseEvent):void
{
soundControl = sound.play(resumeTime);
pause_btn.visible = true;
pause_btn.addEventListener(MouseEvent.CLICK, pauseSound);
play_btn.visible = false;
play_btn.removeEventListener(MouseEvent.CLICK, playSound);
}


function pauseSound(event:MouseEvent):void
{
resumeTime = soundControl.position;
soundControl.stop();
play_btn.visible = true;
play_btn.addEventListener(MouseEvent.CLICK, playSound);

pause_btn.visible = false;
pause_btn.removeEventListener(MouseEvent.CLICK, pauseSound);

}


pause_btn.visible = false;

Start Playing Swf In Empty MC Before Load Complete
Hello everyone, I am working on a movie that loads a SWF into an empty MC when it reaches a certain frame in the timeline. Everything works great; however, the file is large and I would like the swf to begin playing after 25% of it has loaded. The code I am using to load the SWF is below.

stop();
load = loader2_mc.loadMovie("ImageGallery1.swf");

I'm sure that this is probably easy but for some reason I can't figure it out. Any help would be greatly appreciated!

Thanks!

Load External Mp3 And Start Playing On A Certain Frame
I am trying to load an external mp3 and have it start playing on frame 430 of my movie. The code I've tried either starts playing the mp3 right away or not at all. Here is what I'm working with:

onClipEvent (load) {

// sets up a sound object
faTrack = new Sound();
// load the external sound
faTrack.loadSound("intro.mp3", true);
// play the sound
faTrack.start(430);
}

After using this code it started the movie right after the sound was loaded. What is the proper method to make this work?

Display Movie-clip With Image/text/button ..when Clicked On A Button
We had generated a template.

Template has 2 area
Buttons on left and right had side area is blank

on click of button we want to display a movie-clip having image/text and buttons for nvaigation.


We found that on click we can display the movie ...it displays image text is not diapled. Also we want to display buttons on the same.

Your help is great value addtion to us.

Thanks in advance

Ramesh

Playing Transition Movie Between Loading Other Movies
I have Googled and search high and low for this functionality but have not been able to locate the right resource for it. I would like to play a simple transition movie in between loading other movies on stage. So let say if the user would like to go from "home" page to "contact" page, I would like to load a transition movie first before loading up the "contant" swf.

Flash Integrated In Html - How To Start Playing Immediately?
I created a portfolio site for graduation using html with dynamic layers. I also created a navigation system in Flash and several smaller Flash movies that load into a layer on the same page when
a button in the naviation menu is clicked. My problem:

The navigation movie and all the movies that open in the layers have
to completely download before anything shows on the page. The navigation movie has a preloader and I have added a preloader to the first movie that shows up (by default) but this doesn't show up until
all the movies for all the layers have downloaded.

The site can be viewed at: 2minteractive.com

What can I do to get the navigation movie and the first movie to show
up and the others to wait until they are requested by clicking the button?

Thanks,

emissal

Start Playing Movie Clip Instance In A Frame
I have this movie clip in my library. I dragged it onto the stage at a particular frame, gave it an instance name, but when I play it, the movie clip instance doesn't play at that frame (doesn't play at all). How can I make it so that the clip starts playing (and looping) at that specific frame? I tried adding instanceName.gotoAndPlay(1) but that doesn't seem to work? Please help me! I would use the search but I think it's down b/c I'm getting timeout errors. Thanks!

Playing A Swf From Start If It Hasn't Been Played On Page Load
Hi everyone

I have a logo that I'd like to slide into view when a user views a webpage. The thing is I don't want it to play every time a user moves from page to page. Is there a way to check if it's played for the user and therefore not play again until he/she comes and visits the site again?

Playing A Transition Without Jumping To A New Frame On My Main Timeline
Hello Friends

I am trying to play a transition to another page in my flash site without having the video in the back ground jumping. To be specific, I have a video playing in my main timeline of candles and I am going to do a transition where I mask the video. However the only way I know how to do this is to have a

on (release) {gotoAndPlay(681);}

on a button. But this creates jumps in my video clip which I have playing in the main timeline. Is there a way I can create the transition from where the user clicks it so there is no jumps in my video?

You can see my sample site here so you know what I am talking about:
http://www.mmas.unca.edu:16080/~djratlif/

Thanks For your help!

Button States - How To Keep Button On Rollover State When Clicked.
on (rollOver) {
this.btn_about.gotoAndPlay("mouseover");
setProperty(this.btn_about, _x, 25);
setProperty(this.btn_about, _y, 29);
}
on (rollOut) {
this.btn_about.gotoAndPlay("mouseout");
}

on(release){
_parent.gotoAndStop("about");
}

There's my button code. Now a rundown on my delima.

I have a movie "company.swf" that is loaded into an empty MC "content" that is located within my main movie "main.swf". My buttons are all located inside an MC "subnav" inside of company.swf. I have seperate MC's for each button with an actual button with just a "hit" area. I would like each button to stay in the rollover state when clicked so a user knows where they are in each section. I hope I'm being clear here. My rollover and rollout works fine.

Please help!! Thanks

Text Field Over Button Prevents Button Being Clicked
I'm trying to create a custom button class that lets you specify some simple parameters, including the text that goes on the button. However, the text field blocks the button (because it's on top of the button), and so the even listener assigned to the button doesn't detect a CLICK event.

I've read about setting mouseChildren = true, but that works for other display objects and isn't an option for a TextField instance.

Can anybody tell me what I'm missing here. And also, is there a different way of going about having some sort of customizable button that might be better?

If it helps, here is my basic class. An instance of the class is instantiated with:

var btn:ButtonSimpleText = new ButtonSimpleText(120, 20, "Button Label");
addChild(btn);

CLASS BELOW










Attach Code

package {
import flash.display.*;
import flash.events.*;
import flash.text.*;

public class ButtonSimpleText extends Sprite {
public function ButtonSimpleText(w:Number, h:Number, labelText:String){
// Button
var button:SimpleButton = new SimpleButton();

var up:Shape = new Shape()
up.graphics.lineStyle(0,0xFFFFFF,1);
up.graphics.beginFill(0xCC0000);
up.graphics.drawRect(0,0,w,h);
up.graphics.endFill();

button.upState = up;
button.overState = up;
button.downState = up;
button.hitTestState = up;
button.addEventListener(MouseEvent.CLICK, clickListener);

// Text format
var tf:TextFormat = new TextFormat();
tf.font = "Arial";
tf.size = 12;
tf.bold = true;
tf.align = TextFormatAlign.CENTER;
tf.color = 0xFFFFFF;

// Text label
var label_txt:TextField = new TextField();
label_txt.selectable = false;
label_txt.text = labelText;
label_txt.width = w;
label_txt.setTextFormat(tf);

var btnHolder:Sprite = new Sprite();

btnHolder.addChild(button);
btnHolder.addChild(label_txt);

addChild(btnHolder);
}

private function clickListener (e:MouseEvent):void{
trace ("Click");
}

}
}

GMG Audio Player: How Can I Make The Next Song Start Playing Automatically?
I've recently used the following tutorial to create an audio player.
http://www.gmg.com.au/assets/tutorials/flash-mx-audio/

Everything works great, I'm very happy with it. But, another feature that I'd like to add is for it to automatically start playing another audio file (not randomly) when each audio file ends.

The idea behind what I created is as follows, straight from the tutorial:

Quote:




And repeating all that once again for good luck:

http://www.gmg.com.au/assets/tutoria...-structure.gif

From left to right: we have a media-controller SWF file sharing out our controls to a second SWF file that has our audio media in it which is loaded and displayed by a third SWF file. Get it? Got it! Good.




So, in essence, what I need to do, but am unable to figure out, is to have the end of the audio file in the second SWF trigger the third SWF to gotoAndStop to a specific frame. I'm not sure what code to use, or where to put it.

Please take time to look through the tutorial, as I followed it to a "T":
At very least please view this page in order to get a better idea of how my player is structurally created:
http://www.gmg.com.au/assets/tutoria...o/page-02.html

Thanks in advanced for the help!
Steven

Preload Issue: Start Playing The Movie Once A Certain Frame Has Been Loaded.
I'm building a quite large flash movie with hundreds of movieclips (with their own preloaders) with approx 150 frames in the _root timeline. But I've until now never been very confident with preloaders, and that is causing me hairloss.

Once the user enter the site, I want a preloader to come up, but I want to use actionscript to start playing frame 2 once frame 2 content is loaded, not start playing frame 2 once the WHOLE movie is loaded.

I use the below code for simple preloading with no feedback of progress, however it loads the whole movie before it start playback of frame 2:

if (_framesloaded>=_totalframes) {
gotoAndPlay (2);
} else {
gotoAndPlay (1);
}

All help is greatly appreciated.


Rex

Preload Issue: Start Playing The Movie Once A Certain Frame Has Been Loaded.
I'm building a quite large flash movie with hundreds of movieclips (with their own preloaders) with approx 150 frames in the _root timeline. But I've until now never been very confident with preloaders, and that is causing me hairloss.

Once the user enter the site, I want a preloader to come up, but I want to use actionscript to start playing frame 2 once frame 2 content is loaded, not start playing frame 2 once the WHOLE movie is loaded.

I use the below code for simple preloading with no feedback of progress, however it loads the whole movie before it start playback of frame 2:

if (_framesloaded>=_totalframes) {
gotoAndPlay (2);
} else {
gotoAndPlay (1);
}

All help is greatly appreciated.


Rex

Voice Synthesizer: Set Playing Sound's Start Point And Duration To Its Length
How do I set playing sound's start point using an interval and also set the duration of play time to the sounds length? Then keep this happening for multiple sound that play one after the other?

I want to make a voice synthesizer and reduce the distance of gaps between sounds. "G"+"l"+"e"+"n" to "Glen" ect.

By the way, I'm making this from scratch and just want to understand how to do it. I don't actually need a working piece of software. I might make a mixing program later but wanna learn how to do all this stuff first.

Glen Charles Rowell

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