Minor Error In Coding, Please Help
Hi, I was given this doing to solve a problem but it wont work, because flash 5 doesnt seem to recognise _global is this an mx code if so what is the equivalent in flash 5??
on (press) {
if(_global.paused = 1){
_root.mc_slide_07.play();
_global.paused = 0;
} else {
_root.mc_slide_07.stop();
_global.paused = 1;
}
}
FlashKit > Flash Help > Flash Newbies
Posted on: 04-03-2004, 10:51 AM
View Complete Forum Thread with Replies
Sponsored Links:
Wt's The Error In This Coding?
Hi friends,
Im trying to draw a sequence of lines. Here am speccifying 20 as increment.
Im trying the below coding.But it not workin.. Why?
Code:
for(var t:Number = 0; t<=540; t+=20)
{
_root.createEmptyMovieClip("line_mc" + t, _root.getNextHighestDepth());
line_mc[t].lineStyle(1, 0x000000, 100);
line_mc[t].moveTo(t, 0);
line_mc[t].lineTo(t, 300);
}
View Replies !
View Related
Coding Error Question
Hi all,
Using: FlashMX prof. 2004 on a PC
Teaching myself ActionScript... and doing some videos and such to expedite the process.. but Ive run into an error here:
code: stop();
// -------------------<MCL>----------------------- \
var myMCL:MovieClipLoader=new MovieClipLoader();
var myListener:Object=new Object();
myMCL.addListener(myListener);
// -------------------</MCL>----------------------- \
myMCL.loadClip(“trigger.swf”, 5);
and another loadClip call on frame 10
code: myMCL.loadClip (“data.swf”,5);
the error I get is:
**Error** Scene=Scene 1, layer=a, frame=1:Line 9: Syntax error.
myMCL.loadClip(“trigger.swf”, 5);
**Error** Scene=Scene 1, layer=a, frame=10:Line 3: Syntax error.
myMCL.loadClip (“data.swf”,5);
Total ActionScript Errors: 2 Reported Errors: 2
Note: the movies, data and trigger are in the same directory as the master fla in which this code resides.
I must be going blind or such... as far as the typing... it is the same as the video... but it's not working for me, as you can see
Any insight here would be greatly appreciated! Kinda stuck here... Thanks for looking, hopefully we can figure this out together.
Kim
View Replies !
View Related
Find My Coding Error?
Can someone find my coding error, I followed this tutorial on making transitions between externals .SWF's but I couldn't get the buttons to work. Im using FLASH Professional 8
Tutorial - http://www.kirupa.com/developer/mx2004/transitions2.htm
FLA File - http://www.spaodesigns.com/boardriders.fla
View Replies !
View Related
Coding Practice Error?
So, normally I cherish the feedback I get from these forums, and I wouldn't post a seemingly easy question, which usually has to do with punctuation or sequencing (something I can probably find out on my own) however, I have searched and coded everything ' correctly' (in my own mind), and I cant seem to find the problem.
The first code quote works (it is from a seperate instance elsewhere in the main movie), while the second one does not. The difference in the second one is that the lock and lockMovie are within one other movieclip, and I don't see why they would no longer work. Could the alpha=0 part of the png image, if it is perhaps covering the lock mc, prevent me from rolling over it, even though it 'looks' transparent? I dont think this is the case though - I checked and the png is not overlapping.
All of the instances at play are mc's, and not graphics. What else am I missing?
Thanks for the help!
Nick
First quote box :
Code:
this.scene.bubble.lock.onRollOver = function() {
this.scene.bubble.lock._xscale = 140;
this.scene.bubble.lock._yscale = 140;
this.scene.bubble.lock.gotoAndPlay(1);
this.scene.bubble.lockMovie.gotoAndPlay(2);
};
this.scene.bubble.lock.onRollOut = function() {
this.scene.bubble.lock._xscale = 100;
this.scene.bubble.lock._yscale = 100;
this.scene.bubble.lock.gotoAndPlay(1);
this.scene.bubble.lockMovie.gotoAndPlay(139);
};
Second quote box :
Code:
this.scene.picture.bubble.lock.onRollOver = function() {
this.scene.picture.bubble.lock._xscale = 140;
this.scene.picture.bubble.lock._yscale = 140;
this.scene.picture.bubble.lock.gotoAndPlay(1);
this.scene.picture.bubble.lock.gotoAndPlay(2);
};
this.scene.picture.bubble.lock.onRollOut = function() {
this.scene.picture.bubble.lock._xscale = 100;
this.scene.picture.bubble.lock._yscale = 100;
this.scene.picture.bubble.lock.gotoAndPlay(1);
this.scene.picture.bubble.lock.gotoAndPlay(139);
};
View Replies !
View Related
Simple Video Coding Error--what Does It Mean?
I was working my way through a simple tutorial, and hit a big roadblock.
I'm connecting 3 components to a FLVplayback component
My actions layer is below my content layer
So I code the following: (btw, I checked all the spelling)
fishvid1.playPauseButton = playpause ;
fishvid1.seekBar = seeker ;
fishvid1.backButton = back ;
I get these two error messages on the first line
Statement must appear within on/onClipEvent handler
Expected a field name after '.' operator.
There are no error message for line 3
But for line 2 I get the following error
Statement must appear within on/onClipEvent handler
Interestingly when I--- Ctrl-enter---
the buttons seem to be active but I get the following error
1000: Unable to make connection to server or to find FLV on server
In the parameters for the playback component it has the path name to the video. Am I to guess that the video must be another folder for the test movie feature to work?
And if so which folder?
Also is it a problem that the FLvideo is named video1 and the instance name is fishvid1. And I am correct to use the instance name when coding?
View Replies !
View Related
[F8]simple Error Coding Mc To Control Main Timeline
I'm working on a site that uses movie clips as buttons to open new movie clips into an empty movie clip ('container'). Everything works fine.
I've had to add new buttons within one movie ('about') - basically 'sub' menu buttons. to keep a consistant appearance I'm using the same buttons within the 'about' movie clip that I have on my main timeline. The buttons within the movie clip don't work - I'm sure I'm just not properly telling them where to go. As a test, I copied and pasted one of the about buttons onto the main timeline and it works from there so I know it's just a problem of propper linkage from within the movie clip.
Here is the code for the buttons:
PHP Code:
onClipEvent (load) {
this.tb.tbabout.text = "About";
this.onRollOver = function() {
gotoAndPlay(2);
};
onRollOut = function () {
gotoAndPlay(16);
};
onRelease = function ()
{ if (_root.currMovie != "about") {
_root.container.attachMovie("m_about","container",1);
_root.container_m.moviePlayer.gotoAndPlay(16);
}
};
}
Also, in the first frame of every movie clip that goes into 'container' I have code like this:
PHP Code:
_root.currMovie ="m_about";
How do I control the main timeline from a movie clip within a movie clip? thanks!!
View Replies !
View Related
Minor Help
I accidently moved the timeline to a place I don't enjoy. I've spent the last hour trying to move it back and I don't know how to move it back so it'll be normal. Theres a picture of it below.
Thanks
View Replies !
View Related
Minor Help
I accidently moved the timeline to a place I don't enjoy. I've spent the last hour trying to move it back and I don't know how to move it back so it'll be normal. Theres a picture of it below.
Thanks
View Replies !
View Related
Minor Problem
Can someone tell me how to make the browser shake usint the getURL function in flash. I can make the thing shake with a button but cant figure out what I am supposed to do with the flash.
thanks
Chris Meeks
View Replies !
View Related
A Minor Problem... Maybe U Can Help
hi... thx for the help..... i am trying to make it so that when u press a button....more buttons come out and u can click it.....sounds complicated ok...... i will give example...... say when u click the "others" button..... a "guestbook" and "misc" button show up under it..... i want it so that when u click "guestbook" and "misc" it appears to the right side of the movie........
so far..... i ve gotten the "guestbook" and "misc" buttons to appear when u click "others"...... but i cant make it so when u click "guestbook" and "misc", it makes sumthing appear..... thx for the help.... i kno its pretty confusing
View Replies !
View Related
Minor Glitch...
Hi,
I've got some movie clips, and when you hover the mouse over them, a brief animation plays.
Well, the way it seems to work is...the longer your mouse cursor stays on the MC, the longer the MC animation loops -- which is fine!
However, on 3 out of about 10 of these MCs, it is not looping and only plays 1 time...unless you move your cursor off & then on again!
Why? All the keyframes seem to be in the correct places when I compared these MCs in editing mode.
At first I thought it was this: There is a transparent button that is causing these animations to activate. There seemed to be a dot (the little circle) in the first keyframe & the last keyframe -- but not on the one that wasn't looping. But I corrected that...and still no results.
I'm sure it's a simple fix! What do you think?
Thanks,
Christine
View Replies !
View Related
Minor Problem...
i am brand new at actionbscripting so please forgive my ignorance...
i have created a website with multiple links which are fed to a single textbox through various external text files. the problem i am having is that if you scroll down on one of the links and then click a different one, it does not start at the beginning but rather in the middle.
the flash files and the text files are in the .zip files so that you can see what i did...
any help would be greatly appreciated.
View Replies !
View Related
Minor Problem...
i am brand new at actionbscripting so please forgive my ignorance...
i have created a website with multiple links which are fed to a single textbox through various external text files. the problem i am having is that if you scroll down on one of the links and then click a different one, it does not start at the beginning but rather in the middle.
the flash files and the text files are in the .zip files so that you can see what i did...
any help would be greatly appreciated.
View Replies !
View Related
Minor Array Bug
Hey
I'm trying to walk through this array and hide each item. Here's my AS chunk:
Code:
//declare array
text = ['txt-action', 'txt-eval', 'txt-inv', 'txt-und' ,'txt-comm', 'txt-decisions'];
// hide function
function hideText(ar) {
for (i=0; i<ar.length; i++) {
ar[i]._visible = false;
}
}
If I change the _visible line to
Code:
trace(ar[i]);
It gives me back all my array items. All referenced mc's have their correct instance names, so I know that's not the problem.
This is probably somehting very minor, many thanks to anyone who can point out where I've gone wrong
View Replies !
View Related
Some Minor Help Needed
Hi guys, im trying to make a game, and Im having two general problems.
1. In the attachment, i have a guy, and a box. So far, if the guy hits the top of the box it goes down, and vice versa. However, when he hits the block from the left or the right, the box goes diagonal. I want it to go left and right (as if he was pushing it)
2. Secondly, i was wondering if anyone could tell me a code (if there is one) so that when i click something once (on(press)) a movie loads, but when you click it again it unloads.
Thanks for your help.
View Replies !
View Related
Take A Look, Many Minor Issues.
Flash Design
I am having minor issues: one, I have slides set up for each of these buttons, but my scripting is not going to them. two, the pointer isn't always doing what I want it to do, going between the logos and the buttons.
Thanks
Dan
View Replies !
View Related
Preloader Minor Help
need your help
i have done my preloader and here are the problem im faced with
my preloader does not work or display when i publish the movie
thx for the help i appreciate your help
th alot peace out
View Replies !
View Related
Almost Done With My Portfolio. Minor Help?
Hey guys,
Hows it going? Ive been working on a portfolio site in flash for a little bit now and this is the second try at this. The first time everything was so unorganized and the action script was bad so I thought I'd start from scratch. So I started a new file with a new design. Everything is in place (buttons, design, type, and layout) but i am having difficulty linking buttons to scenes.
On my flash doc i have a menu of 3 buttons (portfolio, resume, contact) after the intro plays the buttons appear. I attached this script to the buttons (with appropriote scene title):
on (release) {gotoAndPlay("Portfolio","1");}
now when i click on a button in the swf, it takes me to the wrong scene where I clearly labeled the right scene. If i wanted to click on portfolio, it goes to resume, if i click on it again it goes to contact, then to portfolio, then back to the beginning of the whole file before the intro. Seems really weird but I think I am just missing something in the script being that I am not experienced with it.
Also on my portfolio page (when I get there) there is a submenu of buttons at the bottom, which is attached with:
on (release) {gotoAndPlay(frame#);}
if i click on a button more than once, it takes me to another frame which is strange to me.
Some of the things i have been explaining might seem incomprehensible, but if you take a look at the swf or flash file I think you will understand what I mean.
Is there anyone that can help? This is the last step before I go on a few interviews for a new job. I feel im so close, but the buttons are really frustrating me.
SK_Portfolio Flash
SK_Portfolio SWF
Thanks in advance!
-Steve Kuznicke
View Replies !
View Related
Minor Problem
hi, lets say I create a btn and named it "sample1" in a mc named "aboutus". then I want when this btn inside the aboutus mc clicked, will pass it to a function named btnclicked() and then the function will perform some animation according to the mc name the parameters sent. The mc script is as below:
Code:
onClipEvent(enterFrame)
{
this.sample1.onRelease = btnclicked("aboutus");
}
And I coding the function at the timeline of this mc:
Code:
function btnclicked(aaa)
{
_root.aaa.gotoAndPlay(1);
}
It failed to run. I think I dunno how to passing the parameter from the mc to the function and in the function execute the animation by referencing the mc name. Someone pls corrent me. Thanks!
View Replies !
View Related
Need Some Minor Assistance
Ok, so I have two Flash ads to post for different companies. One has a defined URL in the file, the other doesn't.
Apparently the code I have doesn't show up in IE, so it's useless.
Can someone share some code with me that will post a Flash banner (with a URL defined by me), and that can be shown in IE and FF? Thank you very much if you can.
View Replies !
View Related
Just A Few Minor Newbie Questions...
1. I have noticed on numerous tutorials, there is writing on the actaul layers of the timeline itself (rather than just the title)...I was just simply wondering how this could be done?
2. I wanted to know how to publish multiple .swf files to one html page (without using dreamweaver)...Is this possible to do just with flash?
Thanx In Advanx, TNO.
View Replies !
View Related
PLease Help...some Minor Scripting Issues
Im wanting to create a simple script where on the same button and same frame I want on 1st release takes me to a different scene with the same button at the same frame (this is easily done). But then with the second (and on) click on that same button will take me to a URL....
CAn anyone helP???
Thnx guys
View Replies !
View Related
Minor Problem: MC Within A Button
small problem here - im not so good with a.s. so can i get some help?
i have a nested movie clip within a button,
and i'd like it so that when i rollout of the button, it will play frame 26 onwards in the movieclip thats inside that button.
ill attach the file
if anyone can fix this up and repost the fla i'd be thankful
cheers
View Replies !
View Related
XML... Grrrrr... Having Minor Trouble
i feel like screaming, but ill save my breath.
I am having trouble and i don't know what to do. I am new to xml and xml actionscripting. so if you can break it down into grade 3 talk, it would be highly appreciated.
#1 i have setup a step where it tells me if the xml document is loaded of not.
#2 The xml document loads perfectly, well atleast it tells me it has.
#3 the xml file code is setup like this:
<tracks>
<track name="ping" path="ping.mp3"/>
<track name="track 1" path="track1.mp3"/>
</tracks>
#4 the code i use to pry one of these lines into a dynamic textbox is this:
//title (dynamic textbox)
//audionum (when button pressed it adds or subtracts one from audionum)
title = tracks.firstChild.childNodes[audionum].attributes.name;
#5 I CAN NOT take any info from the xml document what so ever and everything im doing is on a main timeline, i am not using movieclips.
i have used everysingle tutorial in flashkit.com and nothing explaines to me in grade 3 what it's doing. if you can use comparisons, i would love you for it.
Thank you
Filosofer
View Replies !
View Related
Minor Tweak Needed
I've been using Brian Hogg's brilliant 'Scratch' item/component thing (www.mrhogg.com) which lets you have any frame rate applied to the mc of your choosing. There's one minor update that the scratch.as requires and I'm not a programmer. I've tried a couple of things which unsurprisingly haven't worked. I've also emailed Brian but haven't had a reply as yet.
Brian's scratch.zip is attached here. There's a Start, Stop, Pause and Resume feature but Start and Stop seems to be acting exactly like Pause and Resume. You use startScratch to apply scratch to an mc, and use stopScratch to 'disengage' scratch from it.
I'm finding that Scratch is remembering the frame number it finished on in say, myMC1 e.g. frame 62, so when I do a startScratch for my next mc, myMC2, it's starting from frame 63 instead of frame 1. This bug also affects mc's during replays.
SO, I'm after one of you 2-brainers to tweak scratch.as so that whenever 'startScratch' is used, it sends the playhead to frame 1 of the target mc. Please!
In the fla that I'm working on the mc's I'm controlling with Scratch are not continuous - they don't loop like the yellow boxes animation in Brian's example, hence my need to start each of my mc's from frame 1.
Have any of you had a sniff of MX 2004 yet? I'm hoping macromedia have built something like Scratch directly into flash.
Any help with this is GREATLY appreciated!
Many thanks
beauchamp
View Replies !
View Related
Minor Loadvariables Problem
I haven't heard of anyone else with this problem, and can't find an example in the search.. I'm using a simple
loadvariables("file.txt", this);
but the variable I'm loading from the text file doesn't enter into use right away. I'm trying to keep the movie on the main scene as a single frame. If I add more frames, then try to access the variable on, say, frame ten, it works (comes up as 6) Otherwise on the first frame it only comes up as 0.
In fact, even if I allow the movie to loop (I had a stop; script command on the first, since there is no use in letting it loop) with only the one frame, it still remains 0.
Not sure how to fix this.
View Replies !
View Related
Unloadmovie - A Minor Problem
What could possibly be wrong with this code:
on(release){
_root.exterior.unloadMovie();
_root.exterior.loadMovie("http://www.geocities.com/actionfiguresonline2001/blackcar.jpg");
}
When the frame begins a jpg is loaded into exterior. This works fine, but when I click the above button to change the image I just get a blank.
I'm sure this must be a very minor problem but can't work it out.
Any help would be much appreciated.
View Replies !
View Related
BREAKTHROUGH - Yet Some Minor Buggies
Alright.
First of, I'd like to thank my parents for supporting me, and all the people at FlashKit for their genrous help, but recieveing this award....
Ok, anyways.
I've gotten my resizing canvas, loaded with XML Jpegs, and even a scrollpane that scrolls XML loaded thumbnails.
And I even got the whole thing to animate with cool easing tweens upon transitioning from one jpeg to the next. It's really so far a combination of 3 various scripts I picked up through hours of forum trolling.
Problem is now, I added the scrollpane into a movieclip, so I can add the following code in:
onClipEvent (enterFrame) {
this._y = (_parent.canvas._y+_parent.canvas._height)+5;
_parent.nav.cmpThumbs.refreshPane();
}
From my little expertise, that should move my movieclip according to the resize of the newly loaded image, so as no overlapping happens, and I added a refreshPane so the thumbs reload into the new position.
Glorious.
Problem now, is that my scroll bar no longer works. The left/right buttons do though. I commented out this code, and the bar works fine, so now I know that it's not the fact that it's in a movieClip's fault.
I think it's because each loaded position causes Flash to lose track of the scrollbar's hotspot, but I'm no pro, so I'm asking you.
Any way to get the scroll bar to work?
Also, 2 minor bugs are how I can get the registration of newly loaded Jpegs in the middle.
I could get the canvas to resize from the middle by center-aligning the box in the MC, but I can't figure out how to position the top-left loaded jpeg to pop back in the middle without going all over the place.
Also, in my code, there's a line that looks like:
selectedThumb._x = xPos;
xPos += 60;
selectedThumb._y = yPos;
yPos = 10;
I have figured out that it is used for spacing my thumbnails when they're loaded into the MC, but for some reason, I can't set the first thumbnail to offset itself by 10 pixels off x and y.
Lastly, I would like to add another field to the XML to create a comment, so I can load the short text into a dynamic field into a MC that also moves accordingly. I've already created a comments="" field in the XML. I just need a little help defining it in the ActionScript so I can put it into the actions alongside with the loadMovie action.
I have included a zip.
Please get this back to me ASAP. Thanks.
Sidenote: I use MX2004, but I saved it as MX.
--iMat
View Replies !
View Related
I Have A Minor Problem With A Moving Car
Ok I got this from a tutorial and it works except when i press up my car goes left, and when i press down it goes right, which it isnt supposed to do, its a good tutorial just i must've messed something up.
Heres the tutorial: http://www.flashkit.com/tutorials/Ga...1042/index.php
and heres my file also, maybe someone can figure out whats going on. And lastly I use Flash MX
View Replies !
View Related
[F8] Minor Sound Issue...
I'm having a slight sound issue with a website I'm designing.
http://www.liberateart.com/xroze
I'm using this code to control the background volume with a slider:
Code:
bgSound = new Sound(this);
bgSound.attachSound("sound1");
bgSound.start(0, 99);
slider.slideButton._x = 85;
slider.slideButton.onEnterFrame = function() {
bgSound.setVolume(-7-this._x);
};
slider.slideButton.onPress = function() {
startDrag(this, false, -7, 0, 143, 0);
};
slider.slideButton.onRelease = slider.slideButton.onReleaseOutside=function () {
stopDrag();
};
stop();
This is embedded in the index.swf file. When you navigate to the media page (by clicking on the house ontop of the hill), the slider now controls the volume for the background as well as for the FLV files. I thought I used the right code to control just ONE soundclip and not the rest. But obviously, I chose wrong.
Any thoughts?
View Replies !
View Related
[F8] Minor Pauses During Animation
Im having this minor problem. Well, i did learn that runtime bitmap caching stops the animation from playing very slow, especially when using backgrounds. bitmap caching did work and it made my background run much smoother and quicker, but it still tends to pause a bit while playing. the animation still tends to pause a bit like about every few frames. I am animating this cartoon character walking and while he is walking, the background is scrolling. i dont know what the problem is, but for some reason, the animation pauses a bit a few times. What is the cause for the short pauses that occur in the animation and how do i make the animation run more smoother? I dont understand why flash has the habit of making my animations pause everyonce in a while. the pausing makes my animations unproffessional. any help would be greatly honored.
View Replies !
View Related
[CS3] Gallery Minor Issue AS2
hi people
got a small problem with a photo gallery im making. everything is sweet apart from this..
have buttons for previous and next. i have a preloader in frame one. the code i used for the previous button is
on (release, keyPress "<Left>") {
_parent.updateFrame(-1);
}
now obviously its gonna minus 1 all the way back to frame one where my preloader is. how do i get it to stop at frame 2?
View Replies !
View Related
Minor Problem With Variable
Hi Folks!
I've got i minor problem with "var mc" in a function.
btw sorry for poor english...
The function:
ActionScript Code:
function playerMove():Void {//Spieler agiert
var fields = 9;
for (var i = 0; i<fields; i++) {
var mc = _root[i];
trace(mc);
mc.onRelease = function() {
this.attachMovie("playerMC","player_mc"+i,1);
this.enabled = false;
var pushed = player_array.push(this);//Feld in Array speichern.
var popped = pool_array.pop(this);//Feld aus Computer-Pool entfernen. nicht richtig!
//pool_array.array_value_delete(2);//nicht ganz richtig
trace(player_array);
trace(pool_array);
enemyMove();//Funktion ausführen
checkWin();//Funktion ausführen
};
}
}
mc should be "0", "1", "2", etc. but there's always "_level0." in front of it - and i don't know how to get rrid of it.
can someone help?
thx,
gerrit
View Replies !
View Related
Help Pulling My Hair Out Over Something Minor.
Hi Everybody.
It has been a while since I had a flash project, so I haven't been active as I should.
I have a text symbol question and importing HTML.
In Flash, I have no problem getting the TM (™) symbol to work.
However, now I am loading HTML into a html enabled textfield via
loadText.load("mystery.txt");
loadText.onLoad = function() {
heading.htmlText = this.heading;
};
and it does not work. I get a square instead.
In message.txt, I have tried a number of ways to get it to work, but nothing.
My last code I have tried is
heading=<p>™</p>
I am going crazy here.
If you have any insight, please let me know.
Thanks a bunch.
Sean
View Replies !
View Related
Minor Quicktime Prob
In my swf I have 2 layers one with a button
and one with a embeeded quicktime movie,
positioned on the main timeline.
On my button I have
on (release) {
gotoAndPlay("25");
}
When I click the button the quicktime start playing
from frame 1 instead of 25 ! Why ?
View Replies !
View Related
Minor Button Prob.
my buttons not loading the swf.
heres the code im using for the button.
on (rollOver) {
_root.rollover.gotoAndPlay("NEWS");
}
on (rollOut) {
_root.rollover.gotoAndPlay("NEWSOFF");
}
on (release) {
if (_root.currMovie == undefined) {
_root.currMovie = "NEWS";
contents.loadMovie("NEWS.swf");
} else if (_root.currMovie != "NEWS") {
if (contents._currentframe>=contents.midframe) {
_root.currMovie = "NEWS";
contents.play();
}
}
}
the rollovers work and the code works in another fla. file, so i cant see where the problem is.
can anyone help?
edit: its also not loading the swf when the file plays as with this code
_root.currMovie = "NEWS";
contents.loadMovie(_root.currMovie+".swf");
View Replies !
View Related
Printing Minor Problem
I use the script below to do the printing of a movie clip.
Quote:
on(release){
var pj.PrintJob = new PrintJob();
if( pj.start() ) {
if( pj.addPage( 0 ) ) {
pj.send();
}
}
delete pj;
}
However, because the stage size is 800 x 600, it doesnt fit into an A4 size paper.
How do I edit the actionscript above to rescale it to fit the paper size?
Or perhaps print it in landscape format?
View Replies !
View Related
Help Pulling My Hair Out Over Something Minor.
Hi Everybody.
It has been a while since I had a flash project, so I haven't been active as I should.
I have a text symbol question and importing HTML.
In Flash, I have no problem getting the TM () symbol to work.
However, now I am loading HTML into a html enabled textfield via
loadText.load("mystery.txt");
loadText.onLoad = function() {
heading.htmlText = this.heading;
};
and it does not work. I get a square instead.
In message.txt, I have tried a number of ways to get it to work, but nothing.
My last code I have tried is
heading=<p>™</p>
I am going crazy here.
If you have any insight, please let me know.
Thanks a bunch.
Sean
View Replies !
View Related
Minor Flash Issue.
If you go to www.jbspencer.com and click on any of the links, you'll notice that the bar right below the logo at the top left "swooshes". However, it doesn't do it if you click anything else... it just plays once. Does anyone here know how I can get it to "swoosh" every time someone clicks any of the 4 buttons?
The fla is here:
www.jbspencer.com/index.fla
Thanks in advance.
View Replies !
View Related
Printing Minor Problem
I use the script below to do the printing of a movie clip.
Quote:
on(release){
var pj:PrintJob = new PrintJob();
if( pj.start() ) {
if( pj.addPage( 0 ) ) {
pj.send();
}
}
delete pj;
}
However, because the stage size is 800 x 600, it doesnt fit into an A4 size paper.
How do I edit the actionscript above to rescale it to fit the paper size?
Or perhaps print it in landscape format?
View Replies !
View Related
Minor Problemo, Please Advise..
Hey.. I gots a glitch.
I was advised by some members of the board to, instead of using scenes, load swf's. So I have been toying with that.
Here's the prob (bear with me please, I'll explain as in depth as I can):
I created 4 movies to test this..
#1 - blank.swf (Has Title and three dummy buttons)
#2 - pleaseSelect.swf (Contains a small animated text and two coded buttons (about and links))
#3 - about.swf (contains a simple movie animation and two coded buttons (home and links))
#4 - links (havent done anything with this yet, cause of the problem)
K, in the actions layer of #1 I have "loadMovieNum("pleaseSelect.swf", 50)".
In #2 I have an actions layer and an animation layer. At frame 10 in the actions layer i placed the code "gotoAndPlay(1);" to loop the animation. I coded the "about" button with "on (release) { gotoAndPlay(11); loadMovieNum("about.swf", 50) }, then in the actions layer in frame 20 I have "gotoAndStop(1);" - This should, in theory, play the rest of the animation from frame 11 -20 go to frame one and stop, then load the new movie in and unload the current movie.
In #3 I have pretty much the same code, which would be logical I think to get the same effect..
The problem is, this doesnt work, it will work well once, then after that, it wont play the closing animations in the current movie before it loads the new movie. It just jumps to the new movie.. As I ***** with this thing more and more, I cant see this working anyway.
The effect I'm tryin for is to have an animation or some content on the page, then when I click a button, have some kind of effect added to the current content to close it out, then load the new content. If you can tell me what the hell I'm doin wrong, I would be in your debt for short period of time .. If this thread makes no sense to you say so and I'll try to clarify..
View Replies !
View Related
[CS3, AS2]Minor Pagination Problem
I have combined together a pagination script to work with external xml which rather took me a long time to figure out. Everything work out great except the "total pages" required to make the pages work. The xml passes fine and displays the nodes great, but the next page button wont changes pages unless it knows what the total pages are.
heres my xml modified script:
PHP Code:
var xmlPath:String = "scripts/xml/issues.xml";
//the current page we're on
var page:Number = 1;
//the limit of values we need per page
var limit:Number = 6;
//the current row that we're working on
var row:Number = 0;
//The total pages that we have
var totalPages:Number = Math.ceil(values.length/limit);
//the text at the bottom of the page
var pageTxt:String = 'Page '+page+' out of '+totalPages;
//the function that will add all of the mc's to stage
function createValues():Void{
//this values array will hold all of the values we need to paginate
var nodes = xmlObj.firstChild.childNodes;
values = nodes.length;
//this will always limit the amount to the limit variable
//but, "i" will act as a marker for which part of the values
//array that we're going to use
for(var i = (page-1)*limit; i<page*limit; i++){
//checks if there actually is a value where "i" is
//otherwise we'll get some undefined movieclips
if(i < values){
//attaches the movieclip to the stage
attachMovie('artists_thumb', 'value'+row, i+1);
//sets the coordinates based on the row
this['value'+row]._x = 5;
this['value'+row]._y = 5+this['value'+row]._height*row;
//sets this guys value to the correct part of the array
this['value'+row]._issue.text = "Issue nº "+ nodes[i].childNodes[2].firstChild.nodeValue; //thisValue = values[i];
trace(nodes[i].childNodes[2].firstChild.nodeValue);
//move onto the next row
row ++;
}
}
//then we reset the rows so we can use the variable again
row=0;
}
//we have to remove movieclips from the stage if we're going to paginate
function removeValues():Void{
//its a simple function, hopefully you can understand it
for(i=0;i<limit;i++){
this['value'+i].removeMovieClip();
}
}
//adding functions to the buttons when they're clicked
mcPrev.onRelease = function(){
//if the page isn't too low
if(page > 1){
//then go to the previous page
removeValues();
page --;
createValues();
//updating the text
pageTxt = 'Page '+page+' out of '+totalPages;
}
}
mcNext.onRelease= function(){
//if the page isn't too high
if(page < totalPages){
//then go to the next page
removeValues();
page ++;
createValues();
//updating the text
pageTxt = 'Page '+page+' out of '+totalPages;
}
}
// XML Object
var xmlObj = new XML();
xmlObj.ignoreWhite = true;
xmlObj.onLoad = function(ok) {
if (ok) {
createValues();
trace(values)
} else {
trace("error loading xml");
}
};
xmlObj.load(xmlPath);
where I think the problem lies is the:
PHP Code:
var totalPages:Number = Math.ceil(values.length/limit);
i have tried countless times to modify it and place it else where for flash to get the node.length variable, but with no luck.
your help would be greatly appreciated. thank you.
View Replies !
View Related
Loadbar Problem :( (I Think It's Minor)
This is my actionscript (based off tutorials)
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
ns.setBufferTime(5);
ns.onStatus = function(info) {
if(info.code == "NetStream.Buffer.Full") {
bufferClip._visible = false;
}
if(info.code == "NetStream.Buffer.Empty") {
bufferClip._visible = true;
}
if (info.code == "NetStream.Play.Stop") {
bufferClip.seek(0);
gotoAndPlay("Animation", 1);
}
}
theVideo.attachVideo(ns);
ns.play("clip.flv");
rewindButton.onRelease = function () {
ns.seek(0);
}
playButton.onRelease = function () {
ns.pause();
}
var videoInterval = setInterval(videoStatus,100);
var amountLoaded:Number;
var duration:Number;
ns["onMetaData"] = function(obj) {
duration = obj.duration;
}
function videoStatus() {
amountLoaded = ns.bytesLoaded / ns.bytesTotal;
loaderx.loadbarxx._width = amountLoaded * 720;
loaderx.scrub._x = ns.time / duration * 720;
}
My scrubber works but my loadbar doesn't really...it doesn't work as it's suppose to. Once the video has completely it goes to from 0 to 100%....it doesn't gradually move all the the FLV is loaded. Is there a problem with the AS?
View Replies !
View Related
Cool Preloader With A Minor Flaw?
Could someone please let me know what is wrong with this preloader? It appears to work however I recently discovered, it is only about 98% accurate so even though it appears to work, any component that required your web page to be 100% preloaded will fail.
http://www.flashkit.com/movies/Scrip...5463/index.php
I like this one because it only takes one frame of your movie and a lot of people have commented on the nice readout.
View Replies !
View Related
Minor Annoyance.. No New Sound On Swords Way In... :(
Hi again. I have finally completed the sword comin out of the sheath with the "slink" sound effect. Now I have some more problems. I need the sword sound to play once on the way out then i need a sound to play while its out and i need to play a sound when the sword goes back in. Here, I will post the VERy useful code EstudioWorks gave me (this is on the first frame in a keyframe):
sworddrawn = new Sound();
sworddrawn.attachSound("sworddrawn2");
sworddrawn.stop();
emssword.onPress = function() {
startDrag(emssword, false, 100, 535, 700, 535);
sworddrawn.start();
}
emssword.onRelease = function() {
stopDrag();
sworddrawn.stop();
}
__________________________________________________ ________
And this is in the MC (the sword mc):________________
on(press) {
startDrag(emssword,false, 160, 580, 750, 580);
sworddrawn.Start();
}
on(release) {
stopDrag();
sworddrawn.Stop();
}
Now if you can help me please do i need it lol
View Replies !
View Related
A Minor Alpha/button Problem
i have a minor problem i can't seem to get right..
please take a look at http://www.perkinsphotography.net
check any of the picture sections (children, family, etc).
I'd like to make the buttons for prev. and next gray out when the reach the last picture for that section.
The pictures are dynamically loaded. The buttons pull the next picture, "photo" + i + ".jpg", and increment or decrement the value of i depending on the button.
For example, the children section has 4 photos. THe value of i is set to 1 when the placeholder clip loads in, and photo1.jpg is automatically loaded. I'd like the prev. button to be gray an unclickable if i=1. as soon as i>1, then the button should be clickable and full alpha. The same to the next button, provided that i=4, etc...
i have tried a simple if-then statement, and it worked for the first section, being if i=1, but after the other button got clicked, the alpha never changed...
i realize i'm getting long winded here, so if you wanna see an FLA file (this is not the most recent, but i'm at work right now and can't upload the current one), try this link:
http://www.perkinsphotography.net/FL...erkinsSite.fla
thanks,
-myk
View Replies !
View Related
Where Can I Find Flash 6 Minor Revisions?
Where can I get the older Flash plug-in 6.x revisions to test my work on?
As far as I know these are the minor revisions for
Flash 6 for Windows:
6.0.25.0
6.0.45.0
6.0.65.0
6.0.79.0
I have only found a Macromedia page that gives the latest revision of the major versions:
http://www.macromedia.com/support/fl...oldplayers.htm
Thanks in advance,
-Wade
View Replies !
View Related
A Minor Problem With Dynamic Text
got a problem. I have a dynamic htmlText box, and it pulls the text in fine, until i embed the font. I am using a pixel font, and when i embed the font, the first line of my dynamic text doesnt show.. Any ideas?
the files are attached.
thanks,
-myk
View Replies !
View Related
|