Simple Preloader Issue
Okay, I've tried several different preloaders including the one that comes as a component with Flash MX 2004 pro. My problem is that the preloader doesn't show on the screen until the movie is at 64% loaded. There is nothing but the preloader and it's code in the first frame of the movie. Can anyone tell me why this is happening...or better yet, how to stop it from happening? I have a fairly large movie and it takes several seconds (10-15) to load and I don't want to lose viewers. Thanks!
FlashKit > Flash Help > Flash ActionScript
Posted on: 09-07-2005, 11:22 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Simple Preloader Issue
I'm trying to make a preloader for my project. I've done a few tutorials but the same thign keeps happening. When I preview the movie, it keeps flashing, like a constantly refreshing browser kind of thing. I got my current AS from here Preloader is on the first scene. Any ideas?
Attachment .fla is too big (700kb) but download it at:
http://www.theautumnrun.com/preload_issue.fla
Flash MX 2004
AS 2.0
Thank you for your help in advance.
Simple Preloader Issue
This simple preloading code:
Code:
onClipEvent (enterFrame) {
output = "LOADING "+Math.floor(_root.getBytesLoaded()/_root.getBytesTotal()*100)+"%";
this.line._xscale = Math.floor(_root.getBytesLoaded()/_root.getBytesTotal()*100);
if (output != "LOADING 100%") {
_root.stop();
} else if (output == "LOADING 100%") {
_root.play();
}
}
...used to work fine with Flash Plug-in v7, exporting as v6/ActionScript 1.0 -
But it doesn work under Flash Plug-in v8, using the same export settings.
Can anyone explain me why?
Thanks in advance
- Wryenn
Preloader Issue - Code Is Correct, But Preloader Is Flakey
I'm using Flash MX 2004 to develop a flash-based website.
There is one main movie, and several external .swf's that are loaded into the main movie as needed.
All movies have a basic preloader, created as follows:
All movies have 2 scenes.
The first scene contains the preloader, which is 3 frames in total.
Frame 1 contains the following script:
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
this.gotoAndPlay(3);
}
Frame 2 contains the following:
this.gotoAndPlay(1);
Frame 3 is blank.
There is a 2nd layer which contains a dynamic text box which calls the variable "loadText".
This preloader works great in the main movie. The main movie contains buttons which call external SWFs to be loaded into a holder MC on the main movie's timeline. When I load an external SWF into my main movie, the preloader doesn't show up at first. At about 60%, the preloader FINALLY shows up and counts the last 40% before the movie plays.
After several attempts, I noticed that the problem is not with the code itself, but might have something to do with the amount of data loaded into frame 1 of my movies.
Using the debugging tool, and looking at the graph that Flash provides when previewing a movie, I noticed that my main movie contains about 5kb of data in Frame 1, and as mentioned above, the preloader works just fine.
When previewing each of my external SWFs separately, I noticed that the amount of data on Frame 1 of those movies is much greater - 101kb.
After searching the help files, I read somewhere that Flash MX 2004 loads certain data into the first frame of the movie by default, and I'm guessing that THAT is what's causing the preloader not to show up instantly.
Would appreciate any help in clarifying this issue, as the site is completely done except for this preloader problem.
TIA.
PLEASE HELP - Very Simple Issue
I need to know how to make a button within a movie go to a frame in the parent scene.
More or less, I have 1 scene and there are 2 frames in that scene. I have a movie in scene 1, and within that movie there is a button. I need to know how to make that button clickthru to frame 2 of scene 1.
PLEASE HELP I'm really stuck on what is probably a simple solution.
Thanks,
Walt
Simple Issue
how does a function access a variable outside its class? because Flash 8 keeps throwing errors at me when I try to access a variable in my timeline from my .as class file?
boombanguk
Please Help With This Simple Issue
I have a simple problem but dont know how to solve after many searches...
I have 4 buttons, say Button A, Button B, Button X and Button Z.
I want to replace or swap Button X with Button Z when I click on Button A and Swap button Z with Button X with I click on Button B.
I dont want to use timeline. I want to use some kind of swap or replace function or any other method to do this.
Like:
On (release)
{
Button X = Button Z
}
Kindly, help, I will be really gratefull.
Thank you in advance.
Haider
Simple Syntax Issue
I have for gotton the correct syntax for this. I am inside an MC and at the end want it to tell the main timeline to proceed to the next frame. Since there are different scenes, the one I am refering to is 'main'. I have tried:
_root ("main").gotoAndStop(2);
_root.main.gotoAndStop(1);
gotoAndStop ("main", 2);
None of these seem to work....
Can anyone help me?
A Simple Syntax Issue...
Ok, in the main timeline, i declare my variable:
movie = variable;
I have a series of buttons on the screen. Each one calls a different MC (e.g., instance 'ebusiness') and also assigns the value of that MC to the variable:
on (press) {
_root.ebusiness.play();
_root.movie = _root.ebusiness;
}
The MC plays normally. I have a general button outside on the main timline which closes whatever MC is open at the time, but this part does not seem to work too well:
on (press) {
_root.movie.play();
}
The 'play' is suppoed to get the MC to continue from it's internal 'Stop' command and it closes itself.
What am I doing wrong?
Sound Issue (simple)
I shouldn't be having this much trouble because I have great tutorial to explain, but yet I must still be doing something wrong.
take a look please, I need the mp3 to stop at frame 520, or near there depending on where in the movie exactly I want the sound to stop. Also, automatically fade the sound near the 520 frame mark would be helpful. THank-you in advance.
-=Simple Synax Issue=-
Whats the proper way to use the return command with a one-line conditional phrase?
(CheckIfTrue) ? return 0 : return 1
This will not evaluate properly. What do I need to do ... ASIDE from moving to IF conditional styles -_-.
~Brad
Simple Link Issue
Here is the situation:
I have a webpage. at the top of that page is a flash banner. On that flash banner I have a button. I want people to be able to click on that button and have the page switch to another page.
I'm not doing something right:
I click on the button and click on the get url action below. it adds "getURL();" to the code but that's it. obviously there is more to getting a link added to a button. Please tell me how I can add a link properly and publish it so that it will work when I add the flash banner to my page.
NOTE: I am not using a frameset. I dont want to open up a new window. I want the URL to load into the same page.
Thank you to anyone that helps me out!
Simple Script Issue
i have attatched a simple script to a button to make a menu bar fade up when i rollover it.
the problem is, every time i rollover the button the script starts again and the menu fades in every time.
can i make the action to only work once?
Regards,
Marcus...
Another Simple Button Issue
I have 4 pictures as buttons, I want them all to goto different scenes...the first scene is only 1 frame, with all the pictures. I want to beable to click each picture to goto a different scenes with more pictures, writing, etc. A little stuck on the codes though...any help?
A Simple Issue Of Delay
This may be a very very simple thing to do, but my searching has been spotty - most likely because I don't know how to word the question...
I'm attempting my first site (oh good, a newbie...)
and I just need to configure a button that performs three actions. However, the actions should do this:
On button click (mouse release) -
*load 1st movie into layer 3
*Pause for 15 frames
*Load 2nd movie onto layer 2(hidden by movie 1)
*Unload movie 1 on layer 3 (unhiding movie 2)
I guess my question is... can an actionscript be easily designed that can do an action, pause for a duration, then do another...etc...?
Thanks!
- TF
Simple Combobox Issue?
I have a simple combobox that just loads a URL. In testing in a blank doc 1 frame, 1 layer, it works great. When I try to add this to a current movie, I get the following errors, I have attached the script and the errors. Please help....
Script:
on (change) {
// trace("I selected: " + this.getValue() );
my_url = this.getValue()
if (my_url != "") {
getURL(my_url);
}
}
Error:
**Error** Scene=Scene 1, layer=Layer 37, frame=1:Line 1: Invalid mouse event specified.
on (change) {
**Error** Scene=Scene 1, layer=Layer 37, frame=1:Line 3: Statement must appear within on/onClipEvent handler
my_url = this.getValue()
**Error** Scene=Scene 1, layer=Layer 37, frame=1:Line 4: Statement must appear within on/onClipEvent handler
if (my_url != "") {
**Error** Scene=Scene 1, layer=Layer 37, frame=1:Line 7: Unexpected '}' encountered
}
Total ActionScript Errors: 4 Reported Errors: 4
I would do this any other way possible. I just need a pulldown that take users to a URL.
Thanks in advance.....
Simple Syntax Issue I Think....
making a basic coloring book,
the paint brush is coloring just fine, but the target areas are not.
any help on how to write this?
code:
startDrag(_root.paintbrush, true);
_global.chosencolor = 0x000000
myColor = new Color(_root.paintbrush.paintbrushColor);
_root.black.onRelease = function() {
myColor.setRGB(0x000000);
chosencolor = 0x000000
};
_root.blue.onRelease = function() {
myColor.setRGB(0x3300ff);
chosencolor = 0x3300ff
};
_root.green.onRelease = function() {
myColor.setRGB(0x33ff00);
chosencolor = 0x33ff00
};
_root.red.onRelease = function() {
myColor.setRGB(0xcc3300);
chosencolor = 0xcc3300
};
_root.area1.onRelease = function() {
area1.setRGB(chosencolor);
};
_root.area2.onRelease = function() {
area2.setRGB(chosencolor);
trace(chosencolor)
};
Simple Popup Issue
I have this action for my popup's:
on (release) {
getURL ("javascript:NewWindow=window.open('pords.html','F orm','width=550,height=300,left=0,top=0,toolbar=No ,location=No,scrollbars=yes,status=No,resizable=No ,fullscreen=No'); NewWindow.focus(); void(0);");
}
I want it to pop up in the center of the screen not the top left, what do I need to change for this to happen?
Thanks
New Dude-simple Issue?
Trying to get a grip on Koolmoves. I put together 4 frames, the LAST having animation. When I view the movie, the last frame does not show up. Actually, if I could ask some smart person a few questions, I'd REALLY appreciate it--I learn quick!
Simple Variable Issue
This is a simple task, but it is not working for me, thus I am forced to inquire...
-On the main timeline I can place an instance of a movie and name that instance "square"
-On the first frame of the timeline in square I can declare a variable named "cat" and assign it the value of "13"
var cat = 13;
-On the first frame of the main timeline (with the square movie instance present) I can place this code...
trace(square.cat);
And yet it will still output "undefined"
What am I doing wrong?
Thank you for your time. Best Wishes to you all,
Eric
Simple Date() Issue...
ok... here's the code:
Code:
Date.prototype.getFullDate = function() {
weekday = new Array('Sunday', 'Monday', 'Tuessday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');
month = new Array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
tmpDate = new Date();
day = weekday[tmpDate.getDay()];
monthname = month[tmpDate.getMonth()];
year = tmpDate.getFullYear();
date = tmpDate.getDate();
if (length(date) == 1) {
date = " "+date;
}
switch (date.charAt(1)) {
case 1 :
suff = "st";
break;
case 2 :
suff = "nd";
break;
case 3:
suff = "rd";
break;
default :
suff = "th";
}
return day+", "+monthname+" "+date+suff+", "+year;
};
currDate = new Date();
trace(currDate.getFullDate());
ok.. here's the problem :
the date suffix returned is ALWAYS 'th'... today is the 23rd... but i keep getting the 23th. What's wrong with this?.. why isn't the switch working properly?
I even tried to use 'if' statements to check and still get the same result... the 23th.
any help or thoughts?....
thx
Querystring Issue - Probably Simple
Hi all,
I've been having a real issue with one of my swf files collecting data from the querystring. I am using the Flash Satay method so my page stays xHTML compliant and have the following:
Code:
<div id="advert-top">
<object type="application/x-shockwave-flash"
data="flash/container.swf?path=flash/top_products.swf"
width="748" height="120">
<param name="movie"
value="flash/container.swf?path=flash/top_products.swf" />
<param name="wmode"
value="transparent" />
</object>
</div>
This is the code in the first frame of my container.swf:
Code:
_root.onEnterFrame=function(){
loadMovie(_root.path,0);
}
And all that is loading is the empty container.swf. HOWEVER when I cut out the querystring and hardcode the path directly into the container.swf (i.e. loadMovie("flash/top_products.swf",0) ) it seems to work fine?!
The reason I don't want to hard code it is because I am using this as a template snippet and I use PHP to substitute the website root path into the querystring (i.e. value="<?=$GLOBALS['webRoot']?>flash/top_products.swf where webRoot may be "../../" for example).
So why isn't my querystring loading into the movie?! What AM I doing here??
Thanks in advance!
Simple Addition Issue
I haven't been getting enough sleep....I CAN'T believe this has me stumped - thanks in advance for the lack of sarcasm in your help ; )
So, I have two text fields (var names myNum & myNum2 respectively) both with the number 0 in them. I then insert the simple AS "++myNum" and "++myNum2" in frame 2 and all is as it should be. The simple text fields count up forever.
Now, I want to make the addition happen from an AS in a frame of a MC - one for each of the text fields and I cannot get it to work to save my life. I can't believe it's not working....what am I missing here?
FLA File
[F8] Simple LoadMovie Issue
Hey, I made a separate swf to be the background for another movie. So I use the fallowing code to load it in:
code:
loadBg = function() {
this.createEmptyMovieClip("bg", this.getNextHighestDepth())
bg.loadMovie("images/cubes.swf", this)
bg.cacheAsBitmap = true
//tried w/ & w/o this, not sure if it works in the case?
}
It loads the movie and runs it fine with "this.onLoad = loadBg" also put at the bottom of course. Then as soon as I add another function to run, it works for about 20 seconds before grinding to a very very slow refresh rate, almost nothing. So i'm assuming it runs out of memory to work or something? Hence why I tried the cacheAsBitmap, but has a very tiny effect, if any. Any ideas how to fix this? The other movie is a graphic which has it's hue set to -180, then 359 frames later another is set w/ its hue to +180 w/ a motion tween in the middle. So I guess it is a very memory consuming process? Any ideas? Thanks, - Peter.
Simple Keypress Issue. Help
Hi i'm trying to make a pause button that is triggered by pressing the letter p. It won't work! why? Here's my code on the button:
Code:
on (keyPress "p") {
_root.pauser = true;
}
such a simple thing that is driving me nuts! Help!
Simple GotoAndStop Issue
I've got 2 scenes in my movie.
The first is the "main" mc and holds my homepage.
The second is tittled "content" and holds a single frame named "ad".
On a button inside a mc on the main scene, I use the following action script.
on (release) {
gotoAndStop("content", "ad");
}
Simple Syntax Issue
There seems to be a bit of a gap in my knowledge of AS syntax... In many of my projects in the past I've used code like this:
code: ["mc"+var]_x = 0;
to access a complexly named mc's fields. I had never tried to do the same for calling a method of such a movieclip, ie:
code: this.["mc"+var]doSomethingAwesome();
When I did try this however, Flash spits out "Expected a field name after '.' operator."
Does anyone know how to do this?
LoadMovie Issue -- Something Simple
My brain is just GONE over this one, and I know it must be simple.
I have a movie inside of a button. I am trying to load an external .jpg into the movie.
The button is on the root and the instance name is "photo1"
The movie inside the button's instance name is "thumb"
And here's the code I'm using:
Code:
photo1.thumb.loadMovie ("photo01.jpg");
What I doing wrong? Please help. Thanks.
[F8] Simple Script Issue
Code:
on(release){
if(_root.system.command = "/openfile/v2-rocket"){
v2._visible = true;
} else {
_root.system.command = "/openfile/WrongCommand";
v2._visible = false;
}
}
Anyone see an error with this script?
It seems to be ignoring the if command, and makes "v2" visible if the if command is correct or not.
Button Issue...really Simple
I cannot get a button within an MC on my stage to respond. The MC is 'togglemenu" and the button is 'next_btn'. What am I doing wrong? This is the code:
Code:
togglemenu.next_btn.onRelease = function() {
trace("check next");
};
Simple Swf Interaction Issue
Hi,
I've been spinning my wheels here for way too long about what should be a very simple thing, but nonetheless I'm sending out the Mayday. This is my first attempt at having multiple swfs in one project, and I can't seem to get them to communicate.
I have a swf (swf A) file which loads another swf file at runtime (swf B). They are both in the same directory. The swf (swfB) loads without any problems, and when it does (on the COMPLETE event ) I assign it as a public var in the document class of parent swf (A) like this:
in the parent class:
Code:
public var swfB:MovieClip;
// loading code
.
.
.
.
public function swfBLoaded:Event):void{
swfB = e.currentTarget.content;
}
All this seems to work fine. When debugging, I can see swfB has loaded in the debug panel.
I have a class in the parent (swfA) which is supposed to display the child (swfB) on a button press, but addChild(parent.swfB) in that class gets me this error:
1119: Access of possibly undefined property swfB through a reference with static type flash.displayisplayObjectContainer.
Now, swfB is not undefined, and it is not private, so what's the problem ?
Like I said, I can see it in the debug panel, and I have the path correct, but I must be missing something about swf interaction because it doesn't work the way I expected.
I'm really stuck here, and any help would be appreciated. Thanks in advance.
Very Simple Button Issue...
Basically I have 6 Layers
RedButton
Blue Button
Green Button
OrangeButton
Text
Actions
Each of the buttons corresponds to a different word which I have nested inside the "Text" movieclip which when pressed SHOULD bring up the word with a little alpha from 0-100
Each word has an instance name to be referred to as well.
Here's my action script for the first button
this.RedButton.on(release){
_parent.Text.Hello.gotoAndPlay(2);
}
When it compiles it gives me an error of "Field name expected after "." operator. Anyone know what this is or how I can fix my code....see any other errors? What's the best way to approach this movie?
Thank you for all your help...you guys are awesome.
Simple Flv Loading Issue
Some reason my code is not loading in my flv. I have stripped the code down to include just the basic parts and it still is not working.
here is the code that lives in my action layer frame 1.
ActionScript Code:
// ------------ [ Video Setup ] ------------ //
var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream();
flvVideo.attachVideo(ns);
ns.play("test.flv");
// ------------ [/ Video Setup ] ------------ //
Then on layer 2 I have a video object which I have placed there by going to the library properties menu and selecting "New Video". On the video properties tab I have selected "actionscript controlled". Dragged the video object on to the stage and gave it the instance name of "flvVideo" and sized it accordingly and when I test nothing happens.
I have tested my flv by dragging a media component and hardcodeing the flv name using the component inspector and the video loads fine but then i don't have AS control.
Here is the fla
Simple Loader Issue?
I am loading two images (png) into my swf file by use of the following code:
A.addEventListener(MouseEvent.CLICK,Abutton);
function Abutton(event:MouseEvent):void {
loader.unload();
loader2.unload();
var request1:URLRequest = new URLRequest("A1.png");
//var loader:Loader = new Loader();
loader.load(request1);
Front.addChild(loader);
var request2:URLRequest = new URLRequest("A2.png");
loader2.load(request2);
back.addChild(loader2);
if((Event.COMPLETE,request1),(Event.COMPLETE,reque st2)){
gotoAndPlay(2);}
}
The last two lines are my attempt at making actioscript 3.0 wait until the images are loaded to go to frame two and play. So far, this script is not working and the animation plays before the images are loaded.
Thanks for any help
Simple Issue With ScaleX
I'm trying a VERY basic rollover effect, and somewhere I'm missing the ship.
I'll just attach the fla as an example.
So I'm just trying to mask an image, and then add rollover/rollout functions that just enhance the size to like 120% and then back to 100% while masking the original size.
This is so simple, and I do it with AS3 no problem, but there's something I'm missing here. Something small, nagging, and annoying. So I figured I'd hope someone on here could spend 60 seconds looking at it to have the answer jump right out at them.
Thanks guys.
Simple Alpha Issue
Trying to figure out why my alpha is not working.
The initial alpha value is set to .5 or 50%.
On roll over the alpha becomes 1 or 100%.
On roll out the alpha becomes .5 of the intial value or 25%.
I need it to start at .5 go to 1 and then back to .5
What is happening is it starts at .5 goes to 1 then goes to 50% of the inital value which appears to be .25
Thanks in Advance.
Code below:
ActionScript Code:
package app.gui {
import flash.display.Sprite;
import flash.events.*;
import flash.text.TextField;
public class MenuButtonMain extends Sprite {
public var _label:TextField;
public function MenuButtonMain(labl:String) {
_label.text = labl;
_label.mouseEnabled = false;
buttonMode = true;
useHandCursor = true;
_label.alpha = .5
trace(labl);
this.addEventListener(MouseEvent.MOUSE_OVER, lablOver);
this.addEventListener(MouseEvent.MOUSE_OUT, lablOut);
}
private function lablOver(me:MouseEvent):void{
this.alpha = 1;
}
private function lablOut(me:MouseEvent):void{
this.alpha = .5;
}
}
}
Simple Variables Issue
Hi, I'm stuck on this probably simple problem.
I've got a text field called textR that I want populated with content from a variable defined as text1, text2 etc. The number for this variable is controlled by curPage so I've made the following:
ActionScript Code:
_level0.textR = _root.text+(curPage);
But this doesn't work because it just returns the number (curPage) in the text box instead of concatenating the elements and defining it as a variable. Please tell me what the answer is before I jump!!!
Thanks
Rich
Simple Issue / Login
I have a need for a less than truely secure login. I have an MC within the main movie named Login, with 3 text fields.. 2 input and one dynamic. With the correct varibles assigned.. But I can't seem to get this code work.
Code:
on (release) {
if (username == "user" & password == "pass") {
this._parent.mess = "success";
} else {
this._parent.mess = "Invalid Login";
}
}
I'm assuming that I'm not referencing the variables correctly.. but I have tried everything I can think of here. Any help would be great!
One note, it doesn't have an issue getting to the else message. But when entering the correct username and password, I still wind up at the else message..
Simple Styling Issue
http://entertainment.signonsandiego.com/profile/218638
Hello all, I now have a problem with a little styling quirk. Perhaps you can help me? If you first scroll the MP3 player a little then mouse over the link to the song "Goodnight, Goodnight" you will see that all the text below it jumps to the right to align with it. I have set display to inline, but it still all jumps on mouseover. I wonder if it has something to do with the bullet images I am using. I wasn't able to style list items so they wouldn't be too far to the right. Would appreciate any tips you can offer.
Simple Rollover Issue
I want to make a MC play when someone rolls over a button. The Button is
a logo and I want part of the logo to spin on rollover so the MC is in
the same spot as the button.
I tried to do this the most basic way possible, so I created a graphic
for the logo, I dragged it into a new symbol of a MC and animated it and
then I made a button and dragged the graphic into all of the states
expect the over state, and I placed the MC on the over state so it plays
this on rollover. I then positioned everything so it is on the same X
and Y coordinates.
However, when I test the movie when it is on the stage, it works though,
but the rollover (the MC) moves to a different location when the button
is rolled over?
Why is it doing this????
[FMX] Simple ? Variable Issue
I have a dropdown menu in my main movie with buttons like so...
onClipEvent (mouseUp) {
_root.Flabel = 25;
}
After clicking the button it sets the variable and an external movie is loaded.
Within the external movie the variable is called here
_root.contents.gotoAndStop(_root.FLabel);
This all works fine and dandy but I want to have several buttons go to different frames. Right now if I add this to another button:
ie onClipEvent (mouseUp) {
_root.Flabel = 17;
}
The variable doesn't get replaced. It just stays set to whatever the first buttons variable is set to. Shouldn't the mouseUp automatically change the variable when it's clicked. Not sure why this doesn't work.
Simple Align Issue?
I have 25 buttons that I wish to have aligned next to each other with equal spacing between them. What would be the easiest way of doing that? Might sound a bit dumb but I've never made use of the Align Panel...as when I choose e.g. align horizontal centre nothing is moving..
Also, on a similar note, if I want to centre text inside a button so that all text is in the same position for all buttons, how would I do that? Now I'm fiddling round too much with it ...
Y
Simple MouseOver Issue
TheCanadian really helped me last time with a similar problem, but in the attached code is a simple menu that fades when mouse_over. I can’t seem to figure out why the buttons on the sub_menu are not working.
Any ideas?
Simple Syntax Issue?
Hi,
I just want a function to return true, but after a LoadVars.onLoad
event.
Am I right in assuuming that the return in the onLoad = function below
relates ONLY to that function?
What I want is for the sendLockCheck()
to return true depending on the if statement within the onLoad.
function sendLockCheck() {
var lockCheckResult_lv:LoadVars = new LoadVars();
var lockCheckSend_lv:LoadVars = new LoadVars();
var lockCheckArray:Array = new Array();
lockCheckResult_lv.onLoad = function(success:Boolean) {
_root.loko = lockCheckResult_lv.loko;
if (lockCheckResult_lv.loko != "syn") {
return (true);
}
};
lockCheckSend_lv.sendAndLoad("check.php", lockCheckResult_lv, "POST");
}
Any help appreciated.
Thanks
Andrew
A Simple Button Issue?
Hi all,
I have a button that has 2 states: static state and pressed state.
However, I want to add a 3rd state (a rollover state that will show
a thumbnail image of the actual movie that will be loaded by clicking
on the button). The button stays one color when clicked on but the
rollover image obviously disappears.
I am really confused as to how to add this third state. I tried creating
a 3rd frame with a frame label and adding an onpress function into the as layer..but this didn't quite do it as the 'button' I have is a graphic with
two frames and labels. Hmm. I have attached the swf and fla. I'd really
appriciate any advice on this. Thanks a lot. Sorry for the dum question.
Simple Centering Issue
back with another request for help at http://www.anyablu.com
Most people can see everything fine. Some say that the top portion gets cut off...it is designed at 800x700.
how do i fix that?
I have published with the following html settings:
template: flash 8
detect on
dimensions: percent, 100x100
html alignment: default
scale: no scale
flash alignment: centered vertical + horizontal
thanks for your continued help!
Simple GotoAndStop Issue
I have a movie clip on the stage and have given it the instance name "team1". inside this movie clip there are two states. at frame1 it says one thing, then at frame 10 has an image.
team1 stops at frame 1 and what i want to do is when the main time line reaches say frame 50, i want the team1 movie clip to gotoAndStop at frame 10, thus showing the image and not the text.
i tried doing it by putting this on the main timeline at frame 50:
team1.gotoAndStop("team");
but it doesn't work. What have I missed as I know this is possible.
Sean
Help With Simple Scrollbar Issue
Hey,
I'm trying to make a fullscreen flash scroll bar and have been making some progress, in terms of adjusting a scrollbar to a fullscreen. Anyway, I've hit a bit of a stumble. In my function Stage.onResize I'm trying to make the scrollbar dragger a percentage of the amount of content which is shown on the screen as the picture below shows.
The problem is that when you scroll down for some reason the _y position of the scroller is creating a gap, which seems to become bigger the more you drag the scroller down (make sure you have the content displayed in a box like the picture, otherwise the scroller won't show because all the content is on screen.. like a scroller should do!).
So the red line is aligning to the scroll dragger's y position to show my point.
What I want to be able to do is when you drag the scroll dragger I want it to stop when you get to the bottom, at the moment it seems to be going to the bottom and beyond. I want it to stop when you get to the bottom of the content (all content shown on screen) like a normal html scroller.
It might be important to note that I have changed the registration points a little, as you'll see in the fla.
Any help on this would be greatly appreciated.
Here are a couple of pictures to illustrate the problems and source files and code.
Code:
//import for mac scrollwheel operation
import com.pixelbreaker.ui.MouseWheel;
stop();
//Align at top left?
Stage.align = "TL";
Stage.scaleMode = "noScale";
// Padding between top of stage and content **MAKE THIS A PERCENTAGE**
var contentPadding = 30;
//Set the position of the content in the middle of the screen upon movie load
content_mc._x = Stage.width/2;
content_mc._y = contentPadding;
//Position the scroller to the right and to the height of the stage upon movie load
scroller_mc._x = Stage.width-scroller_mc._width/2;
scroller_mc._y = 0;
scroller_mc._height = Stage.height;
// y position on top of the content box
var topContentBox = content_mc._y;
//Create new listener object to listen to stage resize
var stageResizeListener:Object = new Object();
//Everytime the stage is resized...
stageResizeListener.onResize = function() {
// Amount of content in pixels displayed on screen
var contentOnScreen = Stage.height-topContentBox;
// Percentage of content shown on screen
var pctContentOnScreen = contentOnScreen/content_mc._height;
//Position the scroller to the right and to the height of the stage
scroller_mc._x = Stage.width-scroller_mc._width/2;
//scroller_mc._y = Stage.height/2
//Set the position of the content in the middle of the screen
content_mc._x = Stage.width/2;
//scroller_mc.scrollerBar_mc._height = Stage.height;
scroller_mc.scrollerBar_mc._height = Stage.height;
//trace(Stage.height);
scroller_mc.scrollerDragger_mc._y = 0;
if (pctContentOnScreen<1) {
scroller_mc.scrollerDragger_mc.enabled = true;
scroller_mc.scrollerDragger_mc._visible = true;
scroller_mc.scrollerDragger_mc._height = pctContentOnScreen*(Stage.height-100)/2;
scroller_mc.scrollerDragger_mc._y = 0;
} else {
scroller_mc.scrollerDragger_mc.enabled = false;
scroller_mc.scrollerDragger_mc._visible = false;
}
//pctDraggerOnScreen = scroller_mc.scrollerDragger_mc._height / Stage.height;
//trace(pctDraggerOnScreen);
//this.scroller_mc.scrollerDragger_mc._y = topContentBox;
};
//create a listener for when the stage is altered
Stage.addListener(stageResizeListener);
scroller_mc.scrollerDragger_mc.onPress = function() {
//**WORKING ON THIS!!**//
this.startDrag(false,this._x,0,this._x,scroller_mc.scrollerDragger_mc._height+Stage.height);
};
scroller_mc.scrollerDragger_mc.onRelease = scroller_mc.scrollerDragger_mc.onReleaseOutside=function () {
this.stopDrag();
};
onEnterFrame = function () {
holder_mc._y = scroller_mc.scrollerDragger_mc._y;
};
SIMPLE Loading Issue....
I can't figure out why this wont work consistently.
I have a few containers in a column that load small swf files on run time. My code which always works in the past, looks like this:
Code:
client1.loadMovie("interactive/rocksolid_cs.swf");
client2.loadMovie("interactive/malibuchronicle_cs.swf");
client3.loadMovie("interactive/spod_cs.swf");
client4.loadMovie("interactive/chicknecessities_cs.swf");
and so on.
The issue is that sometimes, this works perfectly. I load the page and the files load. Then, randomly other times, only parts of the external swfs load. All of the external swfs have static text on one layer, then a rollover movieclip on the others. The times when it doesn't work correctly, usually the text loads, but the movieclips don't.
I don't understand why this isn't working, but I need it to 100% of the time.
Any suggestions on how to make this work?
Issues while in flash, and viewing in all browsers...
Thanks.
|