Dashed Line Blues
Does anyone know if it's possible to shape tween a dashed line in Flash?
When I try, the shape tween works but the line loses its dashes in the in-between frames even though the keyframes at the beginning and stay the same (dashed).
Maybe I need to think about it a different way - can anyone help?
Cheers.
J.
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX
Posted on: 12-19-2003, 06:38 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Dashed Line Blues
Does anyone know if it's possible to shape tween a dashed line in Flash?
When I try, the shape tween works but the line loses its dashes in the in-between frames even though the keyframes at the beginning and stay the same (dashed).
Maybe I need to think about it a different way - can anyone help?
Cheers.
J.
Animating Dashed Line
Hi,
This is simple in theory but hard in practice. All I want to so is create a kind of 'marching ants' effect with a dashed line, but it isn't in a straight line. Im creaing an animation which shows water flowing into the roots of a plant from the ground, hence why its not straight, this may give you an idea of what i'm trying to achieve.
I've tried a number of ways of animating it, mostly using masks. The closest I got was by converting a dashed line into a fill and setting it as a mask, then I animated a blue square moving under it. It still didn't look right though.
This is a relatively simple efect i'm trying to do, but I can't seem to pull it off. This effect must have been done a million times on animations for school science videos!
Thanks.
Draw Dashed Line
Hello.
Can i Draw a dashed line using the ActionScript 3? I just have success draw a normal line but not a dashed line.
Thanks
Dashed Line Between Keyframes
HELP! I'm going crazy. For some reason I can no longer create simple motion tweens. Every time I try to create a motion tween, it creates dashed lines instead of the solid arrow.
I've closed the program and created a fresh file just to test it. I drew a box, inserted a new keyframe downstream and then tried to create a motion tween. The result is always the same.
Can anyone tell me what's going on here and what I can do to fix it?
TIA,
Marc
Dashed Line For Motion Tween? Help Please
Hi everyone. I am having a major issue here. I am creating a little site intro, and here I am creating it, my tweens are going good everything is happening as expected. Than all of a sudden I make a new layor and I add a rectangle, I insert a keyframe and for some reason the keyframe, at the end, has a white frame with a circle in it instead of a grey one.
I have tried everything, deleting and remakeing it, doing everything I can and for some reason that last frame is always white! I don't know why and it is extremley hindering my project.
I would appreciate help asap, thanks.
Moving Dashed Line (hopping And Fading)
(sorry for my english)
Maybe very simple, but I just cannot figure out what the easiest way is.
I want a dashed line moving around a square button. So what you see is a dash hopping forward and fading dashes were it came from.
Anyone?
[MX04] Animating A Straight Dashed Line
is there any way of animating a straight dashed line without doing it frame by frame?
my first attempt at doing this frame by frame resulted in uneven dashes and gaps - not really the effect i was after...
alternatively, is there any way of consistently making the same sized dashes and gaps? (ive been using guides and the grid, but i must be a retard)
any help muchly appreciated
Shape Tweening With A Dashed Line Stroke?
I have a simple shape tween set up. The shape has the same dashed line for a stroke on both keyframes, but when the animation is played, the dashed line turns solid during the shape tween.
Why doesn't the stroke style animate?
Helicopter Moves Showing Dashed Line Path
I am building a .fla showing an Army helicopter flying a particular path demonstrating instrument flight to and from a navigational aid. I want the aircraft to leave behind a dashed line, like a trail of bread crumbs, so the viewer can see the path that the aircraft took from start to finish. I could use some assistance in developing the correct ActionScript to display such a path. Thanks for your help, Bob.
Edited: 12/04/2006 at 11:24:27 AM by Witchdoctor40
Dynamic Dashed Lines
I am dynamically creating a rectange. I would like the lines dashed or dotted. Is there a way to do this? The rectangle will change size when the corner is dragged, so the dashed lines would have to adjust.
_root.onMouseMove = function() {
_root.clear ();
_root.lineStyle (5, 0x6688AA);
_root.moveTo(0,0);
_root.lineTo(cornerPost._x,0);
_root.lineTo(cornerPost._x,cornerPost._y)
_root.lineTo(0,cornerPost._y);
_root.lineTo(0,0);
};
Thanks.
Help Me Draw A Dashed Border?
Here's my latest attempt at rendering a dynamic rectange (w/ width, height, border_width, border_color & background_color) I'm trying to render a dashed border, and can't seem to get the code right...
I've reworked my logic about five times, and can get the dashes to render right (almost) but the fill color disappears. It's rendered using actionscript. You can see the issues if you change the border width... Anyone mind taking a look to see what I'm doing wrong? It seems like the moveTo function isn't behaving right when I get to the end of each line. Thanks for any help!
I've attached the .fla, here's my code:
code:
var w:Number = 300;
var h:Number = 300;
var border_width:Number = 6;
var border_color:String = '0xcccc99';
var background_color:String = '0x336699';
var dash_width:Number = 10;
var dash_space:Number = (border_width*3);
// figure out how many horizontal dashes to render
// this is crude, but tried other ways and still the fill isn't right...
var h_num_dashes:Number = (w/(dash_width+dash_space));
var v_num_dashes:Number = (h/(dash_width+dash_space));
with(movBox) { // empty movie clip on the stage
if(background_color) {
beginFill(background_color,100);
}
lineStyle(border_width, border_color, 100 );
// start
moveTo(0,0);
// top line
//lineTo(w,0); // draws the next line without dashes for sanity's sake (debug)
var xpos:Number = 0;
for(i=0;i<h_num_dashes;i++) {
lineTo((xpos+dash_width),0);
moveTo((xpos+dash_width+dash_space),0);
xpos += (dash_width+dash_space);
}
lineTo(w,0);
// right line
//lineTo(w,h);
var ypos:Number = 0;
for(i=0;i<v_num_dashes;i++) {
lineTo(w,(ypos+dash_width));
moveTo(w,(ypos+dash_width+dash_space));
ypos += (dash_width+dash_space);
}
lineTo(w,h);
// bottom line
//lineTo(0,h);
var xpos:Number = w;
for(i=h_num_dashes;i>0;i--) {
lineTo((xpos-dash_width),h);
moveTo((xpos-dash_width-dash_space),h);
xpos -= (dash_width+dash_space);
}
lineTo(0,h);
// left line
//lineTo(0,0);
var ypos:Number = h;
for(i=v_num_dashes;i>0;i--) {
lineTo(0,(ypos-dash_width));
moveTo(0,(ypos-dash_width-dash_space));
ypos -= (dash_width+dash_space);
}
// finish
lineTo(0,0);
}
Dashed Lines In Flash CS3
Hi all, Is there a way to make the end caps of an imported dashed line (say from Illustrator or Canvas) straight? They seem to always come out round.
I have tried making them straight lines instead of dashed both before and after importing them to Flash but the end caps still come out rounded. Flash does not let me change the end caps of dashed lines at all. So even if I set it correctly when it's still a straight line, as soon as I turn it into a dashed line, it turns round and I can't change it.
Very frustrating.
Thanks for your help,
Aryeh
Edited: 03/07/2008 at 09:03:44 AM by aryehz
Help Me Draw A Dashed Border?
Here's my latest attempt at rendering a dynamic rectange (w/ width, height, border_width, border_color & background_color) I'm trying to render a dashed border, and can't seem to get the code right...
I've reworked my logic about five times, and can get the dashes to render right (almost) but the fill color disappears. It's rendered using actionscript. You can see the issues if you change the border width... Anyone mind taking a look to see what I'm doing wrong? It seems like the moveTo function isn't behaving right when I get to the end of each line. Thanks for any help!
I've attached the .fla, here's my code:
ActionScript Code:
var w:Number = 300;var h:Number = 300;var border_width:Number = 6;var border_color:String = '0xcccc99';var background_color:String = '0x336699';var dash_width:Number = 10;var dash_space:Number = (border_width*3);// figure out how many horizontal dashes to render// this is crude, but tried other ways and still the fill isn't right...var h_num_dashes:Number = (w/(dash_width+dash_space));var v_num_dashes:Number = (h/(dash_width+dash_space));with(movBox) { // empty movie clip on the stage if(background_color) { beginFill(background_color,100); } lineStyle(border_width, border_color, 100 ); // start moveTo(0,0); // top line //lineTo(w,0); // draws the next line without dashes for sanity's sake (debug) var xpos:Number = 0; for(i=0;i<h_num_dashes;i++) { lineTo((xpos+dash_width),0); moveTo((xpos+dash_width+dash_space),0); xpos += (dash_width+dash_space); } lineTo(w,0); // right line //lineTo(w,h); var ypos:Number = 0; for(i=0;i<v_num_dashes;i++) { lineTo(w,(ypos+dash_width)); moveTo(w,(ypos+dash_width+dash_space)); ypos += (dash_width+dash_space); } lineTo(w,h); // bottom line //lineTo(0,h); var xpos:Number = w; for(i=h_num_dashes;i>0;i--) { lineTo((xpos-dash_width),h); moveTo((xpos-dash_width-dash_space),h); xpos -= (dash_width+dash_space); } lineTo(0,h); // left line //lineTo(0,0); var ypos:Number = h; for(i=v_num_dashes;i>0;i--) { lineTo(0,(ypos-dash_width)); moveTo(0,(ypos-dash_width-dash_space)); ypos -= (dash_width+dash_space); } // finish lineTo(0,0); }
Animating Dashed Lines
Hello all,
here's a simple question. Is there an easy way to animate a dashed stroke?
I've included an example below. The illustrations are from Freehand. Making amovie clip etc is all clear. With a straight line I could just mask off parts and animated a moving line, but with the curves I want that crawling ants effect. Anyone?
Thanks!
-Patrick
Help Me Draw A Dashed Border?
Here's my latest attempt at rendering a dynamic rectange (w/ width, height, border_width, border_color & background_color) I'm trying to render a dashed border, and can't seem to get the code right...
I've reworked my logic about five times, and can get the dashes to render right (almost) but the fill color disappears. It's rendered using actionscript. You can see the issues if you change the border width... Anyone mind taking a look to see what I'm doing wrong? It seems like the moveTo function isn't behaving right when I get to the end of each line. Thanks for any help!
I've attached the .fla, here's my code:
ActionScript Code:
var w:Number = 300;var h:Number = 300;var border_width:Number = 6;var border_color:String = '0xcccc99';var background_color:String = '0x336699';var dash_width:Number = 10;var dash_space:Number = (border_width*3);// figure out how many horizontal dashes to render// this is crude, but tried other ways and still the fill isn't right...var h_num_dashes:Number = (w/(dash_width+dash_space));var v_num_dashes:Number = (h/(dash_width+dash_space));with(movBox) { // empty movie clip on the stage if(background_color) { beginFill(background_color,100); } lineStyle(border_width, border_color, 100 ); // start moveTo(0,0); // top line //lineTo(w,0); // draws the next line without dashes for sanity's sake (debug) var xpos:Number = 0; for(i=0;i<h_num_dashes;i++) { lineTo((xpos+dash_width),0); moveTo((xpos+dash_width+dash_space),0); xpos += (dash_width+dash_space); } lineTo(w,0); // right line //lineTo(w,h); var ypos:Number = 0; for(i=0;i<v_num_dashes;i++) { lineTo(w,(ypos+dash_width)); moveTo(w,(ypos+dash_width+dash_space)); ypos += (dash_width+dash_space); } lineTo(w,h); // bottom line //lineTo(0,h); var xpos:Number = w; for(i=h_num_dashes;i>0;i--) { lineTo((xpos-dash_width),h); moveTo((xpos-dash_width-dash_space),h); xpos -= (dash_width+dash_space); } lineTo(0,h); // left line //lineTo(0,0); var ypos:Number = h; for(i=v_num_dashes;i>0;i--) { lineTo(0,(ypos-dash_width)); moveTo(0,(ypos-dash_width-dash_space)); ypos -= (dash_width+dash_space); } // finish lineTo(0,0); }
Animating Dashed Lines
Hello all,
here's a simple question. Is there an easy way to animate a dashed stroke?
I've included an example below. The illustrations are from Freehand. Making amovie clip etc is all clear. With a straight line I could just mask off parts and animated a moving line, but with the curves I want that crawling ants effect. Anyone?
Thanks!
-Patrick
Tweening Lines Are Dashed HELP
Can some one please help me if i'm not too late. When i'm using my motion and shape tweening the arrow sometimes dashed. I know this means my tween is not working so how do i fix it? How do i do the tweening correctly in "shaping" so this won't occur. Plus i'm a new user to Flash so HELP ME!
Animated Dashed/dotted Lines
I'm looking for a way to have a rectangle surrounded by either dotted or dashed lines that seem to move around the rectangle, nothing fancy. I'm looking for an example or instructions on how to do something like this.
Using Flash 8
Thanks
Dashed And Wavy Lines Using Actionscript
OK, I'm stumped.
We have a piece of software created in Director which calls various Flash functions to draw different lines on the fly. These lines demonstrate various movements of football (soccer) players. You can drag a midpoint in a line to create a curved line. Now this is fine to do if the line is solid, so i simply use the curveTo function.
The difficult bit comes when I need to draw a dotted/dashed line along a curved path or even more confusing, a wavy line along a curved path. Can anyone give me any pointers as to where to look for guidance on this. I've trawled the net and can't really find any answers.
If anyone is willing to offer some helping in providing actionscript for this as well we're more than happy to credit you on the software (and give you a free copy!)
Many thanks
Iain Livingstone
Dynamically Scaling Dashed Lines Without Them Increasing In Size?
I'm trying to create a rectangular menu that is dragable, and has dashed lines connected from various areas of the screen, and then to each of it's four corners.
However, as far as I know, you can't "draw" lines in flash. Everyone uses the scale technique. However, Hairlines are the only lines that don't scale... and you can't make a dashed hairline. So...
Any way to "scale" a dashed line as if it were a hairline?
Also, these are "wavy" dashed lines, so I'm thinking that using the scale technique will give the appearance the lines keeping their anchor points. If the lines were redrawn somehow, how would we keep the same anchor points..
Anybody have any ideas?!!
XML Blues
I am working on an mp3 player, and I am still wet behind the ears with AS. I am loading Mp3 files from XML, I have figured out how to load them using a button, but now I just want to load an Mp3 from my XML file when the movie loads. I have been trying to figure this out for 2 days now! Any help would be great...
Here's my AS
code:
function roundNumber (toRound, numDecimals)
{
return Math.round (toRound * Math.pow (10, numDecimals)) / Math.pow (10, numDecimals);
}
var tracklist = new Array ();
var mp3List = new XML ();
mp3List.ignoreWhite = true;
mp3List.onLoad = createPlayList;
mp3List.load ("playlist.xml");
function createPlayList (success)
{
if (!success)
{
return;
}
var topLevel = null;
for (i = 0; i <= this.childNodes.length; i++)
{
if (this.childNodes[i].nodeValue == null && this.childNodes[i].nodeName == "playlist")
{
topLevel = this.childNodes[i];
break;
}
}
if (topLevel != null)
{
for (i = 0; i <= topLevel.childNodes.length; i++)
{
if (topLevel.childNodes[i].nodeName == "mp3file")
{
var track = topLevel.childNodes[i].attributes["track"];
_root.tracklist.push (track);
}
}
}
}
function randomBetween (a, b)
{
return Math.min (a, b) + random (Math.abs (a - b) + 1);
}
function playTrack ()
{
var track = _root.track;
if (track.getBytesLoaded () == track.getBytesTotal () && track.duration > 0)
{
clearInterval (_root.checkLoaded);
trackID3Info.text = "";
trackID3Info.text += "Title: " + track.id3.songname + newline;
trackID3Info.text += "Artist: " + track.id3.artist + newline;
}
}
_root.createEmptyMovieClip ("tracker", 1);
randomplayer.onPress = function ()
{
stopAllSounds ();
var trackNo = randomBetween (0, _root.tracklist.length - 1);
_root.track = new Sound ();
_root.track.loadSound (_root.tracklist[trackNo], true);
_root.checkLoaded = setInterval (playTrack, 500);
_root.tracker.onEnterFrame = function ()
{
_root.time.text = roundNumber ((_root.track.duration - _root.track.position) / 1000, 2);
};
_root.cliplength.text = roundNumber (_root.track.duration / 1000, 2);
_root.volume.text = _root.track.getVolume ();
};
StopClip.onPress = function ()
{
stopAllSounds ();
_root.track = null;
_root.time.text = "";
_root.volume.text = "";
_root.trackID3Info.text = "";
};
VolumeUp.onPress = function ()
{
if (_root.track.getVolume () < 100)
{
_root.track.setVolume (_root.track.getVolume () + 10);
_root.volume.text = _root.track.getVolume ();
}
};
VolumeDown.onPress = function ()
{
if (_root.track.getVolume () > 0)
{
_root.track.setVolume (_root.track.getVolume () - 10);
_root.volume.text = _root.track.getVolume ();
}
};
Thanks.
Xml Blues
I've made this dynamic thing where a bunch of xml is loaded from a php file...
Code:
gallery = new XML();
gallery.load("loadPics.php");
gallery.onLoad = function(success) {
if (success) {
makeHierarchy();
} else {
}
};
Well it works and stuff
In the function "makeHierarchy" I have a line that counts the number of one of the childnodes.
Code:
catcount = gallery.childNodes[0].childNodes.length;
and then I have a for loop that duplicates movieclips. I want that for loop to run as many times as the catcount is. (so basically for(c=0;c<=catcount;c++))
It works when I test it in my browser window but when I run it in flash it gets really slow and prompts me to abort the script.
This is because the catcount is infinity or sumthin' well anyway the "Success" in my onLoad() is true and it triggers the function although there is no xml loaded.
edit: I guess it's bcuz catcount is "undefined" and any text is equal to infinity...
I hope you get it...
Is there a way to fix this problem?
Xml Blues
I've made this dynamic thing where a bunch of xml is loaded from a php file...
Code:
gallery = new XML();
gallery.load("loadPics.php");
gallery.onLoad = function(success) {
if (success) {
makeHierarchy();
} else {
}
};
Well it works and stuff
In the function "makeHierarchy" I have a line that counts the number of one of the childnodes.
Code:
catcount = gallery.childNodes[0].childNodes.length;
and then I have a for loop that duplicates movieclips. I want that for loop to run as many times as the catcount is. (so basically for(c=0;c<=catcount;c++))
It works when I test it in my browser window but when I run it in flash it gets really slow and prompts me to abort the script.
This is because the catcount is infinity or sumthin' well anyway the "Success" in my onLoad() is true and it triggers the function although there is no xml loaded.
edit: I guess it's bcuz catcount is "undefined" and any text is equal to infinity...
I hope you get it...
Is there a way to fix this problem?
Preloader BLues
Please visit http://www.ceredigm.com/solarbrochure/index.swf
This swf files contains the preloader in Scene one and the main site in Scenes 2 thru 5
I have the preloader doing a cache check. If they have visited this before it should go to Scene 2 (after a quick transition)
If not...it should load intro.swf into Level 1.
The main site (Scenes 2-5) are fairly small so I really only need the preloader for the intro. I have a skip optin that unloads level 1 and goes to the main site.
for some reason when I visit the site (even when I have cleared my cache) It skips the preloader process (Loaded 100%) and jumps to the intro.
The source file is at http://www.ceredigm.com/solarbrochure/index.fla (415K)
I have also included the intro.fla (5M) but there should be no need to DL that. All I have is a stop action int he first frame and an unloadMovieNum (1); action attached to the skip button and the last frame of the intro.
Please respond as soon as you can.
Thanks!
ATTACHMOVIE BLUES
can someone tell me the advantages of attachmovie function along with its features.....
thanx
AS Buttons Blues,
hi guys
i got a problem, ive made buttons which grow bigger when the user roll overs they 'bonce up' and when the user rolls off they bonce back down ;
i made MC and on that i placed this code:
onClipEvent (load) {
mc2 = 100;
// initialise _xscale.
friction = 0.8;
ratio = 0.3;
speed = 0;
}
onClipEvent (enterFrame) {
if (mc2 != this._xscale) {
speed = (speed*friction)+(mc2-this._xscale)*ratio;
this._xscale += speed;
this._yscale += speed;
}
}
and in side of this movie clip is a graphic in one layer and an invisable button on another layer, on the invisable button i placed this code.
on (rollOver) {
mc2 = 150;
}
on (rollOut) {
mc2 = 100;
}
now the problem is they work , with the AS but i cant use them as buttons as i cant apply mouse actions, so when i want to use them to go to the next frame or scene it doesnt work. I want the AS buttons, cause they look good, but if i use it im not sure how to make them work as buttons. PLEASE HELP.
Pre-loader Blues
I have a flash film that is one megabyte, and made without a preloader in mind. There are a million different references to variables, functions and instances by their path ie. _root.movie1.movie2.variablename . As far as I can tell, if I try to load that movie into another movie so that I can make a preloader all of the path's get so messed the movie doesn't work. I've tried put a loader in the first few frames of the orginal movie and then used ifFrameLoaded (), but when I do that it still downloads about 500k before the loader even starts to play.
I know I should have thought ofthis ahead oftime, but I'm new to it all. Does anybody have any idea how I can get a well functioning pre-loader on this movie? Thanks. kcm
Animation Blues
Ok everyone here's the deal
I am brand spankin' new to this whole wide world of flash. I have been sleepless for the past 3 days trying to figure out how to work this thing. I have been through every tutorial (seems like, laff) and example I can find in this site. Anywho here's my prob...Im making an intro for a site I'm making, ok? Now then..The first scene has 16 layers on it. I finished the first scene and I tested it out. I clicked the play button, and everything worked fine. All my fade-ins fadin' in, all my cool stuff goin' on. So then I test the whole movie right? Well, heh, that's when it all started to goof up on me. Things were happining that weren't supposed to like, I had a few words fade in (they were movie clip symbols) well instead of fading in or even out they just appeared...and stayed there. Other things were happening as well. I know there HAS to be a few flash 5 HOT SHOTS out there, so if ya could tell me what I might be doing wrong. Just hit me with some ideas on what the prob is. I will appreciate any response (as long as it pertains to my problem that is ;D)
-thanks
-*Jeff
Preloader Blues
ok...I have apparently setup everything exactly the same as the example file.
2nd frame in pre-loader scene:
if (_root.getBytesLoaded() != _root.getBytesTotal()) {
gotoAndPlay (1);
}
3rd frame in preloader scene:
gotoAndPlay ("Main", 1);
in the example file this seems to work just fine and dandy when streaming. but in my file it appears to load everything (including preloader), my preloader flashes on for half a second and then goes onto the next scene. Does anybody know what idiocies may cause this disfunction?
Slowly going crazy. Help would be much appreciated.
Monica
Substitution Blues
I've a number of varibles like this
player0="name"
player1="another"
player2="more"
etc
etc
and I'd like to deal with these in a loop
ie
for (i=0; i<10; i++)
{
this="player" + i;
_root["msg"]=this
}
but this just gives me "player0", "player1" etc in msg.. and not "name" , "another"
how can I see the Substitution for "player0" ?
Password Blues
I have created a mock numerical keypad so that when the user presses numbers 0-9 the button is pressed and a beep sounds. I have an input text box where the user has to input a numerical password which is relative to the keys they press. However even when the input text box is selected these numbers when pressed are not typed in, can anyone think of a way around this problem? Is it because I am already using the On "Key Press" command for these characters?
Matt
Pop-up Menu Blues... Help
I've designed a menu system that expands up when a main button is moused over and back down when moused off. This menu is made in a separate movie clip and dropped in the main scene (Scene 1). My problem is I want to be able to click a button on the pop-up (in the MC) and go to another frame in the main scene. I have to set the onRelease action in the MC but when I test it, it seems to be looking for the frame within the MC not the main scene. Here is the action script I used:
on (release) {
gotoAndPlay ("Scene 1", "resume");
}
I even tried using the frame number instead of the lable and got the same result.
Any help would be appreciated. Thanks in advance!
Jordan
Preloader Blues
Alrighty,
So this is a very stupid problem... my pre-loader is like retarded... See, my movie contains 2 scenes, the loader and the main one called news. Now in the loader scene, i have 2 layers, one which contains actions and another that contains a 1 frame with a movie of spinning gears. Now in my actions for this loader scene (which only contains 1 frame) i have a stop command and a ifframeloaded command that checks if frame one of my news scene is loaded. if it is it loads it. now my loader just goes off into infinity. do i have to loop my ifframeloaded check and if i do plz explain to me how THANKS IN ADVANCE!
sinstone the newb
Actionscript Blues
Hello,
In scene 1, frame 1 I have placed a movie clip.
The movie clip is animated scrolling text built using some actionscript. This movie works perfectly on it's own, it scrolls the text and stops.
However, when I test the full movie, it keeps repeating itself. To overcome this I added (stop) to frame 1, scene 1 but this doesn't let the movie play properly, only showing the first letter of the animated text.
Can anyone help, or would you need to see the actionscript that is animating the text?
I wonder if I'm in a bit deep here for a beginner
Preload Blues...
Heres my situation...
I have my main movie that contains several buttons... each buttons calls an external.swf to load/play. I had to change this to using swapDepth to achieve the effect I wanted.
SO now I have (in my main movie) an MC that contains 3 other MC's in it. The 3 MC's each have a stop in the first frame...and a loadmovie (external.swf) command the the second. When I click on the button..I am NOT seeing a reaction ritgh away....I have a pause..and then the external.swf starts to play. (for visual reference to what I am talking about go here: http://www.dmstudios.net/shake/index_1.html )
What I need to know..is there a way to load these external pages in to the users cache so that when they click the button..you get an instant response? I am NOT looking for a 'preloader' animation bar thing..that will play when the external.swf is loading. I already have that...and it is taking long to load as well.
Is there maybe some javascript or something I can sue to load these pages. So I get a response as soon as the button is pressed?
Thanks
-whispers-
Frame 1 Blues ;..(
All I have in Frame #1 of my main timeline is a simple preloader(maybe 6k at most)yet when I look at the streaming bar graph, my frame 1 seems to be loading a lot more than just the preloader (seemingly the entire file). As a result, my preloader doesn't immediately appear on the stage. Any recommendations would be very much appreciated.
Key Press Blues
Hello,
I want to create the following:
When a user presses a key an animation will begin and on each subsequent press a new instance of the animation starts.
I can do this, but cant get each instance to remain animated and become overlapped by the next. I have tried duplicate movieclip and load movie with no luck.
Any ideas appreciated.
Thanks
New Window Blues
Greetings,
I have a flash movie "intro.swf". In this movie there is an invisible button located over top a race drivers helmet. When you click on the invisible button it is suppose to open a new browser window at a specific size and without any browser navigation.
Here is what is actually happening:
1. It appears that when the play head gets to the last frame of the move, it automatically opens a new browser window—I don't want it to do this, I want the user to click the helmet button to get the new window. All I have at the last frame is a STOP actionscript on the frame and the actionscript attached to the invisible button that opens the new window.
2. When it automatically opens the new browser window, the window is not sized properly and it still has all the browser navigation controls. But remember, I'd rather it not open up the new window automatically anyway.
3. If I go back to the original window and click on the helmet, a new browser window opens at the size I specified but it still has all the browser navigation. This is what I need to get rid of.
ActionScript
Here is the code I have asigned to the invisible button that is on the last frame of the movie, on top of the helmet:
on (release) {
getURL("javascript:window.open('http://www.t-i-w.com/staging/edpead/html/mainindex.html','newWin','width=720,height=420,lef t=0,top=0,toolbar=No,location=No,scrollbars=No,sta tus=No,resizable=No,fullscreen=No');NewWindow.focu s();void(0);");
}
You can see the whole mess by going to:
http://www.t-i-w.com/staging/edpead/index.html
Hope you can help.
Mark
Preload Blues
Hi.
Pulling my hair out here Can anyone help. Flash version 5
I have created a preload movie which uses a percent loader in a movie clip based on actionscript.
This works a treat.
The percent loader also inludes a page of text. When a user loads the webpage for the first time all is dandy, the user can read text while the percent bar creeps up, when its at 100% the movie continues with next scene. However. Next time the user goes to the webpage because the swf is cached the user gets a momentary flash of this text before it decides that its all cached and continues with the next scene.
So....
What I thought I could do, is stick an extra loop in before the percent bar to check the status of loading. This would be a blank screen.
I used the following code.
Frame 10 - code:
loadedBytes = _root.getBytesLoaded();
totalBytes = _root.getBytesTotal();
if (loadedBytes < totalBytes) {
gotoAndPlay (20);
} else {
}
gotoAndPlay ("Scene 1", "start");
Frame 15 - code
gotoAndPlay (10);
Now this sort of works. If I load the swf on its own (on the my local pc), it jumps fine straight to the next scene. However if I load the html page (either on web server or local PC) I still get a momentary flash of the text before I assume it decides all is well and continues with the next scene. If I delete the browser cache as you would expect the percent bar starts.
No matter what I try I cannot get it to stop this momentary flash of text when using an html page.
Even when I generate an exe, it works fine and jumps straight to the next scene with no flash of text...
Can anyone help.
Thanks
Preloader Blues
I am having a problem with a preloader tutorial that I got fom FK which uses a loading bar and percentage loaded. It works fine for my main.swf but when I put it on my loaded.swf it doesn't want to move.
I changed all instances of _root. to this. and managed to get the percentage loaded bit working but the bar still doesn't move and its holding me up.
Does anybody have any ideas? Here is the link:
http://www.flashkit.com/tutorials/Ac...-689/more2.php
and here is the Action Script ive used:
frame1
this._xscale = ((this.getBytesLoaded() / this.getBytesTotal()) * 100);
and frame2
this.gotoAndPlay(1);
As I said before i'm only have a problem with the loading bar expanding and not the percentage loaded part.
Pleeease help, i'm becoming desperate.
Preloader Blues
I am having a problem with a preloader tutorial that I got fom FK which uses a loading bar and percentage loaded. It works fine for my main.swf but when I put it on my loaded.swf it doesn't want to move.
I changed all instances of _root. to this. and managed to get the percentage loaded bit working but the bar still doesn't move and its holding me up.
Does anybody have any ideas? Here is the link:
http://www.flashkit.com/tutorials/Ac...-689/more2.php
and here is the Action Script ive used:
frame1
this._xscale = ((this.getBytesLoaded() / this.getBytesTotal()) * 100);
and frame2
this.gotoAndPlay(1);
As I said before i'm only have a problem with the loading bar expanding and not the percentage loaded part.
Pleeease help, i'm becoming desperate.
Movieclip Blues
I have been trying to animate a movieclip, instead of moving at a steady pace it accelerates, how can I overcome this?
I have attached the fla file with the problem -
im using a mac, you should try opening via the file>open command in flash which seems to work for me opening PC fla files.
Any suggestions welcome!
Deployment Kit Blues
Hi,
I have downloaded the Flash Deployment kit. My site needs Flash player 6 to work properly, so any user with a lower version should be directed to an 'upgrade' page.
I tried it out with Flash Player 5 on my PC, but with IE it goes to the 'Installation complete' page and with Netscape it goes to the page that says 'You don't have Macromedia Flash Player' . This is how it is working straight from the Macromedia site.
I am very much a beginner with JavaScript, so any help would be very much appreciated.
Mark
Preloader Blues
Found a tute that shows how to make preloader look like a clock, where hand moves around circle based on how much is loaded.
Modified it to increase the x & y values of a circular mask to make it look like color is seeping into a blue-and white pick. Also, use the getbytesloaded value to alpha in some text.
Problem is, shows on some machines, not others.
Here's the movie I'm working on: http://www.lake.k12.fl.us/makearipple.asp
and here's the as I use for the preloader:
frame 1:
x = getBytesLoaded();
y = getBytesTotal();
v = Math.floor(x / 1024) + "kb";
z = Math.floor(y / 1024) + "kb";
w = Math.ceil((x / y) * 330);
q = Math.ceil((x / y) * 500);
a = Math.ceil((x / y) * 100);
myTextField.text = "loaded: " + Math.round(x / y * 100) + "%";
if (x == y) {
gotoAndPlay("Scene 3", 1);
}
movieclip of text I want to fade in (not myTextField) :
onClipEvent (enterFrame) {
setProperty(this, _alpha, _root.a);
}
movieclip titled mask:
onClipEvent (enterFrame) {
setProperty(this, _width, _root.w);
setProperty(this, _height, _root.w);
}
frame 2:
gotoAndPlay(1);
Any suggestions?
Thanks!
Combo Box Blues
I have a combo box which when a component push button is clicked navigates another MC to a certain frame. It works on the first time but after that it seems to hold that value and doesnt refresh with any subsequent choices. Here is my code:
[code]var vararchive1;
function archive1Change() {
vararchive1 = archive1.getValue();
}
stop();
goto.setClickHandler("pushButton");
function pushButton(component) {
if (vararchive1 == "Burnley GSOB (A)") {
matchfirst.gotoAndStop(2);
} else if (vararchive1 == "Warbreck (Cup) (A)") {
matchfirst.gotoAndStop (1);}
}
stop();
[CODE]
ComboBox Blues :(
I'm trying to use a ComboBox as a way of navigating to various frames in my movie.
I used the following code that I found on this site...
function myChangeHandler() {
if (myComboBox.getSelectedItem()==1) {
gotoAndStop("request_info");
} else {
gotoAndStop("methods");
}
}
Only problem is that on playback, my movie keeps executing the "else" command.
I think the problem is that I do not uinderstand what the "1" means. Is that the order of the list item? Is that a value that is somehow assigned to the list item?
Someone please end my suffering!
ComboBox Blues :(
I'm trying to use a ComboBox as a way of navigating to various frames in my movie.
I used the following code that I found on this site...
function myChangeHandler() {
if (myComboBox.getSelectedItem()==1) {
gotoAndStop("request_info");
} else {
gotoAndStop("methods");
}
}
Only problem is that on playback, my movie keeps executing the "else" command.
I think the problem is that I do not uinderstand what the "1" means. Is that the order of the list item? Is that a value that is somehow assigned to the list item?
Someone please end my suffering!
ComboBox Blues :(
I'm trying to use a ComboBox as a way of navigating to various frames in my movie.
I used the following code that I found on this site...
function myChangeHandler() {
if (myComboBox.getSelectedItem()==1) {
gotoAndStop("request_info");
} else {
gotoAndStop("methods");
}
}
Only problem is that on playback, my movie keeps executing the "else" command.
I think the problem is that I do not uinderstand what the "1" means. Is that the order of the list item? Is that a value that is somehow assigned to the list item?
Someone please end my suffering!
ComboBox Blues :(
I'm trying to use a ComboBox as a way of navigating to various frames in my movie.
I used the following code that I found on this site...
function myChangeHandler() {
if (myComboBox.getSelectedItem()==1) {
gotoAndStop("request_info");
} else {
gotoAndStop("methods");
}
}
Only problem is that on playback, my movie keeps executing the "else" command.
I think the problem is that I do not uinderstand what the "1" means. Is that the order of the list item? Is that a value that is somehow assigned to the list item?
Someone please end my suffering!
|