Using Included Prototypes From Outside Where They Were Included.
How can I do this? I have the tweeing prototypes pack included in my main actionscript block, but I want to use it from some other movieclips. Is this possible?
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 05-02-2006, 05:41 PM
View Complete Forum Thread with Replies
Sponsored Links:
- Help - Fla Included
- Please Help, Zip Included
- Please Help Me With This (.fla Included)
- I WANT TO BE INCLUDED IN THE NEXT LESSON
- E-mail With Swf Included
- Included Fonts
- Few Questions FLA's Included
- Help Please (file Included)
- Help, My Scrollbar FLA Included.
- Help, My Scrollbar FLA Included.
- Help, My Scrollbar FLA Included.
- HELP Needed FLA Included
- #include Included
- Few Questions FLA's Included
- What Am I Doing Wrong? (fla Included)
- What Am I Doing Wrong? (fla Included)
- What Am I Doing Wrong? (fla Included)
- What Am I Doing Wrong? (fla Included)
- Please Help Me Out, Files Included...
- Actionscript Help, FLA Included
- Please Help Me Out, Files Included...
- .fla Included - Moving Obj
- Few Questions FLA's Included
- Double Load (fla's Included)
- Where's The Included Files For This Tutorial?
- Is Flash Player Included In IE?
- Getting A Varaible To Be Included In A Command
- Loading Bar With Random Swf Included
- Generator Is Included In Flash MX, But Where ?
- Loading SWF's Problem, Please Help...FLA Included....
- Font Included In Submovies ?
- Input Text (.fla Included)
- What's Wrong? Code Included
- Can Anyone Explain / Clarify Dis...example Included?
- Scroll Box Help - FLA File Included
- Music Player Help, FLA Included
- Need Scrollbar Tweak (FLA Included)
- Buttons For Newbies- Fla Included :-)
- CSS Problem AS Snippet Included.
- Is There An Easier Way To Do This Effect? (url Included)
- LoadMovie Won't Work With This .swf (.rar Included, Please Help Me)
- Problems With Rollover (FLA Included)
- Health Problem (fla Included)
- Show Included File
- [F8] Three Controlling Buttons - FLA Included
- [F8] Array Help Source Included
- Simpler 5 Sec Timer. (AS Included)
- When Are External Files Included?
- Will Not Reload External Swf (zip Included)
- Two Questions.. Code Included..
- Help With Movies Overlapping (FLA Included)
Please Help, Zip Included
Hey, this is my first post on these fourms and ive got a long post for my first eh.
If anyone can help, ill be really amped.
Project Description:
I have a scrolling text block to the left of the page that has names in it set as buttons. I'm trying to make it so when you click one of the names inside the scrolling text block it opens up information on the page.
Each part of the information is set inside a .php file in the folder "Sahid"
for example this is the script that goes inside the button.
on (release) {
Name = new LoadVars();
Name.onLoad = function(success){
if (success) {
name_function.htmlText = this.name_function;
}
};
Name.load("Sahid/name.php")
stop();
}
.........
When you click the button it gets the information thats inside of "name.php" and places it in the text field called "name_function"
-----------
If you look at the .fla file there is a white circle that is a button, that white circle has the code in it that i want to put inside of one of the buttons on the main scrolelr to the left, but for some reason it wont work inside of that scrolling text block.
please someone help me
here's teh file www.feelthissite.com/nico/joel/movie1.zip
View Replies !
View Related
Please Help Me With This (.fla Included)
I've looked around on the forum and I can find some topics close to mine, but not exactly. Any help would be greatly appreciated
So, here's what I have:
- A dynamic text box with a Variable name of: newsbox and a scrollbar attached to it.
- 2 buttons, each, when clicked will change the text in the dynamic text box.
All I need is for the scrollbar to adjust/work when the buttons change the length of the text in the dynamic text box. You can highlight the text and scroll down like that, but you can't use the scroll bar.
This is a key component to my web site and I'd love some help on it
View Replies !
View Related
E-mail With Swf Included
I tried to send e-mails with a swf movie like a promo but allways with problems.
First I tried with this article:http://www.webreference.com/multimedia/flash/email/
with bad results, nobady can see the swf???
Teh second time I tried to send a site with Outlook Express but with security problems.
What can I do???
It must exist one form for send one swf with compatibility...
: )
View Replies !
View Related
Included Fonts
I have two SWFs one loads the other.
Let's call them mc0.swf and mc1.swf.
mc0.swf loads mc1.swf into a placeholder mc.
Now, in mc1.swf I have an included font that displays nice and crisp when opening mc1.swf itself. Once mc1.swf is loaded into mc0.swf though the font(s) becomes blurry.
What goes on there?
Next up. When running mc1.swf on it's own there is, as I said, an included font. On the first two frames all my txt shows nice and crisp. On the third frame the txt-box's content is displaying blurry. The font is included Aliased and all that. Help me out please...
Thanks
V
View Replies !
View Related
Few Questions FLA's Included
peepz,
i downloaded a script for a dock menu, but i need to tweakk it up a bit.
from the original version i want to let the balls (i changed in squares) mask a photo thats behind it (if its posible, i want to place my own photos behind it).
in my new version (dockmenu-new.fla) it seems it's not running smoothly anymore, and also if i publish it in flash player 7 it its not workin right anymore.
i placed some comments in the code so you can find it easy. (i also included the original)
i hope someone can make al my above questions work!
thanks already!
View Replies !
View Related
Help Please (file Included)
in scene 2 you will see the main timeline broken up into 5 sections of 10 frames per section. you will see 3 of the 5 sections labelled:
CarPort
Submarine
Angel
in the library under movies
go to mcOne
that clip has 3 buttons:
Carport
Submarine
Angel Wings
i'm trying to get the buttons of that movie clip (mcOne)
to play the labelled sections of scene 2.
the goal in this project is to incorperate other movieclips into one flash file
if there is a way to do this with actionscript i would much rather learn to create this personal project that way. please help me.
the file is located at :
http://net.saddleback.edu/gonufer0/cim264b/nextpage.fla
the file format is flash 8 and is rather large.
View Replies !
View Related
Help, My Scrollbar FLA Included.
I've been trying to make a scrollbar and it is supposed to be finished but I just can't get it working!! I followed step by step but the tut was using a much older version of flash so I got confused.
If someone could take a look and tell me what I need to do it would be GREATLY appreciated, thanks!
View Replies !
View Related
Help, My Scrollbar FLA Included.
I've been trying to make a scrollbar and it is supposed to be finished but I just can't get it working!! I followed step by step but the tut was using a much older version of flash so I got confused.
If someone could take a look and tell me what I need to do it would be GREATLY appreciated, thanks!
View Replies !
View Related
Help, My Scrollbar FLA Included.
I've been trying to make a scrollbar and it is supposed to be finished but I just can't get it working!! I followed step by step but the tut was using a much older version of flash so I got confused.
If someone could take a look and tell me what I need to do it would be GREATLY appreciated, thanks!
View Replies !
View Related
HELP Needed FLA Included
Hi,
i didn't want to make a duplicated post so i'm giving the link here cause maybe i was wrong to ask it in Actionscript forum since nobody replied it
http://board.flashkit.com/board/showthread.php?t=708696
my problem is simple for an intermediate-advanced user but i couldn't solve it.
thanks for any help,
View Replies !
View Related
#include Included
good evening.
if i want to do something like have an include file that looks like this.
PHP Code:
onEnterFrame = function () {
if (Key.isDown(Key.UP)) {
V2DUpKey = true;
} else {
V2DUpKey = false;
}
if (Key.isDown(Key.DOWN)) {
V2DDownKey = true;
} else {
V2DDownKey = false;
}
if (Key.isDown(Key.LEFT)) {
V2DLeftKey = true;
} else {
V2DLeftKey = false;
}
if (Key.isDown(Key.RIGHT)) {
V2DRightKey = true;
} else {
V2DRightKey = false;
}
if (Key.isDown(Key.ENTER)) {
V2DEnterKey = true;
} else {
V2DEnterKey = false;
}
if (Key.isDown(Key.SPACE)) {
V2DSpaceKey = true;
} else {
V2DSpaceKey = false;
}
};
and i included it into fmx2004pro like this
PHP Code:
#include "includethis.as"
onEnterFrame = function () {
if (V2DUpKey == true) {
trace("upkey");
}
};
but yet when i do this. it doesnt even work. please tell me what im doing wrong.
View Replies !
View Related
Few Questions FLA's Included
peepz,
i downloaded a script for a dock menu, but i need to tweakk it up a bit.
from the original version i want to let the balls (i changed in squares) mask a photo thats behind it (if its posible, i want to place my own photos behind it).
in my new version (dockmenu-new.fla) it seems it's not running smoothly anymore, and also if i publish it in flash player 7 it its not workin right anymore.
i placed some comments in the code so you can find it easy. (i also included the original)
i hope someone can make al my above questions work!
thanks already!
View Replies !
View Related
What Am I Doing Wrong? (fla Included)
Hi
i made a flash with a rollover button (the first green arrow on the left) and a callout image.
When i move my mouse down, all is well.
When i move up to the callout, an ugly loop appears. How do i fix this?
fla link: http://www.legendid.ee/anim.fla
The only script i used besides stop(); :
on (rollOver) {
this.gotoAndPlay (2);
}
on (rollOut) {
this.gotoAndPlay (10);
}
View Replies !
View Related
What Am I Doing Wrong? (fla Included)
Hi
i made a flash with a rollover button (the first green arrow on the left) and a callout image.
When i move my mouse down, all is well.
When i move up to the callout, an ugly loop appears. How do i fix this?
fla link: http://www.legendid.ee/anim.fla
The only script i used besides stop(); :
on (rollOver) {
this.gotoAndPlay (2);
}
on (rollOut) {
this.gotoAndPlay (10);
}
View Replies !
View Related
What Am I Doing Wrong? (fla Included)
Hi
i made a flash with a rollover button (the first green arrow on the left) and a callout image.
When i move my mouse down, all is well.
When i move up to the callout, an ugly loop appears. How do i fix this?
fla link: http://www.legendid.ee/anim.fla
The only script i used besides stop(); :
on (rollOver) {
this.gotoAndPlay (2);
}
on (rollOut) {
this.gotoAndPlay (10);
}
View Replies !
View Related
What Am I Doing Wrong? (fla Included)
Hi
i made a flash with a rollover button (the first green arrow on the left) and a callout image.
When i move my mouse down, all is well.
When i move up to the callout, an ugly loop appears. How do i fix this?
fla link: http://www.legendid.ee/anim.fla
The only script i used besides stop(); :
on (rollOver) {
this.gotoAndPlay (2);
}
on (rollOut) {
this.gotoAndPlay (10);
}
View Replies !
View Related
Please Help Me Out, Files Included...
Hi there,
I've asked this question a couple of times but I haven't got much useful response. This time I've reconstructed my situation for you to look at.
Here is the problem swf
In the zip file you can find all the fla files.
So if you have done what is mentioned, then you see that the content jumps to the second 'frame'. So how can that function be reset to start on 'frame' 1 each time?
As I mentioned, this is a reconstructed situation, the real thing is here:
Childrens farm
The problem is in the stable section, and when leaving it, and returning.
So can someone please help me out? It's pretty frustrating, and I've tried almost everything i can think of...
Thank in advance !
View Replies !
View Related
Actionscript Help, FLA Included
Hi all, I've been working on and off on this portfolio-website for a bit and I'm running into a little trouble with the Actionscript. The site is a simple setup with 4 rectangles. When a button is pressed to open a page, the currently open rectangle closes and the new rectangle opens.
What Im having problems with is that sometimes the sequence will work right, but sometimes the rectangle will skip to the closed frame and automatically start opening up the clicked page. Basically, things are inconsistent and I cant figure out how to fix it.
I've attached the fla file so that you can see where i'm headed with this, I'm sure its something simple, but I can't figure it out.
Thanks for any help!
Attached FLA File
View Replies !
View Related
Please Help Me Out, Files Included...
Hi there,
I've asked this question a couple of times but I haven't got much useful response. This time I've reconstructed my situation for you to look at.
Here is the problem swf
In the zip file you can find all the fla files.
So if you have done what is mentioned, then you see that the content jumps to the second 'frame'. So how can that function be reset to start on 'frame' 1 each time?
As I mentioned, this is a reconstructed situation, the real thing is here:
Childrens farm
The problem is in the stable section, and when leaving it, and returning.
So can someone please help me out? It's pretty frustrating, and I've tried almost everything i can think of...
Thank in advance !
View Replies !
View Related
.fla Included - Moving Obj
Hi all!!!
My problem:
1. How do you change variable value by pressing a button??!!
I'm attaching .fla file so you'll be able to understand my problem.
2. How do I display date, time continiusly??
If I use mydate = NewDate() etc. flash returns me the time when movie started and clock doesn't clock anymore!!!
Help!
Thank you!
View Replies !
View Related
Few Questions FLA's Included
peepz,
i downloaded a script for a dock menu, but i need to tweakk it up a bit.
from the original version i want to let the balls (i changed in squares) mask a photo thats behind it (if its posible, i want to place my own photos behind it).
in my new version (dockmenu-new.fla) it seems it's not running smoothly anymore, and also if i publish it in flash player 7 it its not workin right anymore.
i placed some comments in the code so you can find it easy. (i also included the original)
i hope someone can make al my above questions work!
thanks already!
DOWNLOAD FLA'S
View Replies !
View Related
Double Load (fla's Included)
Ok, have a look to these files:
http://www.cyrax.ch/flashers/doubleload.swf
http://www.cyrax.ch/flashers/doubleload.fla
http://www.cyrax.ch/flashers/toload.swf
The file doubleload.swf has the following order:
It have to load the "toload.swf" File into it (in the Target "Loaded"). However, this works. But the cracknut is somewhere else. I want now to duplicate this loaded movie, if possible also in a target, but how to do ? I tried duplicateMovie etc and it didn't worked (it only copies the template "Loaded"). I could also use again the loadMovie Function, but I don't want that flash loads the file twice, because of speed issues. I hope someone can help me.
View Replies !
View Related
Loading Bar With Random Swf Included
Hi..
i need to know how can i make a loading bar (percentage) for an swf that includes another swf. The problem is that this swf must be a random of different external movies (5 in total), so i don't know the weight of it.
(sorry cos my english, i hope somebody will understand..)
THANKS::
View Replies !
View Related
Loading SWF's Problem, Please Help...FLA Included....
Hi flashkit,
Ive got a problem with the .swf's that are being loaded at _level1 in my movie. Basically instead of the .swf's being loaded at _level1 theyre being opened in a new Internet Explorer window...
Id be very grateful if someone could tell me where im going wrong
http://www.onebadpromotions.co.uk/onebad-test.zip
Thanks in advance
View Replies !
View Related
Font Included In Submovies ?
I have some questions about fonts.
1. If you include all characters from a font and you load a submovie in the main movie do you have to include all characters in the submovie too or not?
2. If you use the font in different sizes do you have to include it only once.
thx
ReSoul
View Replies !
View Related
Input Text (.fla Included)
Attached is a .fla file...I want to input a value in the first input box, then when I click the next frame button, I want that same value to appear in the input box of the second frame....pretty easy but for some reason I can not figure it out!!! AAAAHHH!
help please...it should take a normal person 1 minute.
View Replies !
View Related
What's Wrong? Code Included
What is wrong with the following :
function GetAppArea_Result(result) {
// result is a 2-dim array
var arraylength = result.length;
//result[0][0] contains a string for example "Food"
var MainAppArea = result[0][0];
//ListBoxToFill will contain a string being the name of the listbox-//component in which to fill the rest of the data from result
// a trace maessage shows that ListBoxToFill contains the string:
// MainAppAreaListBoxFood
var ListBoxToFill = "MainAppAreaListBox" + MainAppArea;
for (i=1;i<arraylength; i++) {
//The following line should add the data to the listboxcomponent bud..
// it doesn't !!! However if I would replace:[ListBoxToFill] with ea.:
// MainAppAreaListBoxFOOD than it works
[ListBoxToFill].addItemAt(i-1,result[i][0],result[i][1]);
}
}
The problem is somewhere in the correct use of brackets,point-notation in the additem command in the last line.
Question is, what is wrong?
View Replies !
View Related
Can Anyone Explain / Clarify Dis...example Included?
Hello,
I'm fooling around with the listener / broadcasting functions.
I have a movie in which a MC is changed when a boadcastmessage is received (by clicking a button)..
Inside the MC is the code for a broadcaster / listener.
But it only works with one MC.
I need several instances of the MC which all respond to the same broadcastmessage...
Here is file :
http://www.xs4all.nl/~newmedia/room101/setup.html
If someone can make the two MC's listen to the same broadcast I'd be more than happy!!...
Thankz...
Lars J.
View Replies !
View Related
Scroll Box Help - FLA File Included
Hi there. i am trying to make a simple scroll box with a small bit of inertia at the end. I got this FLA off FlashKit and am really trying to learn. how would I keep this same effect, but lose the buttons on the side? I try to do without them, but then FLA stops working. Can anyone help?
Thanks!
Jack
The FLA is:
DOWNLOAD FLA HERE
View Replies !
View Related
Music Player Help, FLA Included
i created this little dragable music player where you can change tracks etc.. the problem is, i have a masking animation for it to open the player, and a masking animation to close the player, but at the same time I dont want the file to loop the music when the player is minimized.
if you didnt understand what i just said, imagine a mp3 player bieng able to minimize, thats what im basically trying to do, i have all the animation set up, just that the movie file loops when it is minimize, looping the current music playing, causing double music. So if you listen the first track repeats when the movie is minimized.
heres the file, flash mx
http://members.aol.com/davre00/music.fla
if theres a genious that can figure this out i'd be very thankful, i guess im gonna have to use non minimizing one for the moment.
View Replies !
View Related
Need Scrollbar Tweak (FLA Included)
peepz,
i found this fine scroller on the forum, but if i use a container (with dynamic content) instead of a normal MC it won scroll properly
can somebody make it work properly ?
i only need the up and down scrollbuttons...
and the actionscript is on the buttons en on the MC "theImage"
thnx for all your help!!!
FLA
DOWNLOAD FLA
View Replies !
View Related
Buttons For Newbies- Fla Included :-)
I'm bored.
So many people have helped me here, I figured it's time to help others.
It seems 1 out of 15 posts has something to do with button animations. So I made a basic menu with buttons that have a rollOver and rollOut animation. If the button is pressed, it stays in the rollOver state. If another button is pressed, then the current button that is in the hit state plays it's rollOff animation. This is the hardest thing I tried to figure out when I first started using Flash. Just using the "if" condition alone blew my mind away. But once I got it, it opened so many other doors to how action script really works.
If you have any questions, post them here. Please don't email me. Others may have the same question too.
Flash version is MX. Sorry, I can't afford Pro right now.
Reguards,
Josh
View Replies !
View Related
CSS Problem AS Snippet Included.
Well since so people are probably going to the site i posted and seeing no errors (I hate that) I have included the snippet of code that I used to load on of the text fields. If i can program it a better way, please let me know.
// Dynamic Text field
biography_txt.depthChild0._alpha = 0;
biography_txt.setStyle("borderStyle", "none");
biography_txt.html = true;
//laoding Headline stylesheets
var biography_css = new TextField.StyleSheet();
biography_css.load("assets/bio/biography.css");
biography_css.onLoad = function(success:Boolean) {
if (success) {
biography_txt.styleSheet = biography_css;
} else {
trace("Error loading CSS file.");
}
};
//loading top story text files
var biography_lv:LoadVars = new LoadVars();
biography_lv.load("assets/bio/biography.txt");
biography_lv.onLoad = function(success:Boolean) {
if (success) {
biography_txt.text = this.content;
} else {
trace("unable to load text file.");
}
};
View Replies !
View Related
Is There An Easier Way To Do This Effect? (url Included)
Hey guys, I want to do the same effect this person shows in his tutorial:
http://www.tutorialoutpost.com/count/795
But I just have 3 questions first...
1) Is there a shorter method?
2) Is there a way to make the glowing dot move in a circle instead?
In his example, he has the dots going straight down the skyscraper building... or a minor curve on the thing at the bottom right...
I have a picture of this circle that's been transformed a bit (photoshop: transform-->distort)... more or less it still resembles a circle, is there any way to make the glowing dot complete an almost 360degrees?
3) Also, if it's possible... is there anyway to have the dot start at one spot on the circle...move really fast along the circle..slow down...and as its coming back to where it started move really fast again? (not sure if that makes sense...)
Questions #1 and #2 are more important, but if it's not too hard I wouldn't mind attempting #3 hehe.
Sorry for my nubish questions ^_^ Im just learning flash now hehe
Thx!!
-A.
View Replies !
View Related
Problems With Rollover (FLA Included)
This is just an example but I am experimenting with rollover in Flash and it just doesn't seem to work right.
I have it so when I rollover it should set the alpha of the blue block to 30. It changes the alpha of the whole movie to 30. Is there anyway to fix this?
Also instead of alpha I tried using _tint but that didn't work. Help anyone?
View Replies !
View Related
Show Included File
Hi, im new to flash, and need help on how to include and show a piece of text.
Lets say i need to show 'text/test.txt' inside the swf-file,
how would i include and show it?
lets pretend; the file test.txt conatins the text "Hello world",
the file is included by the flash document, and "Hello world" appears in the document.
View Replies !
View Related
[F8] Three Controlling Buttons - FLA Included
I found an .fla on this site that I have managed to tweek to where I can use it the way I need to, however there is a snag I'm running into. I've been trying to change the labeling on the buttons to reflect the play, pause, and rewind symbols I designated. The problem is I'm an ameture when it comes to extensive actionscripting and I can't seem to get it right. All the code is in frame 1 that allows it to work but I just can't seem to find the right syntax to change it. I have included the .fla that I have experimented with so far and I hope someone can help. Thank you!
View Replies !
View Related
[F8] Array Help Source Included
Description:
It is just the archivePage1.fla and the xml file. I need the XML to stay the same. In the .fla file the code is in the middle text field on the left side. It has an array in it that is not populating correctly. The array needs to display the Date from the XML and should be clickable (each date will eventually link to another page and display the full contents (date, subject, etc.) in another page. I need the array to display 5 records on the left page text field and five records on the right page (in the right page text field) and the bottom arrows should refresh the two text fields with the next ten records.
Thanks for any help!
View Replies !
View Related
Simpler 5 Sec Timer. (AS Included)
When you land on the 1st keyframe, the counter counts down from 5secs then goes to the 2nd keyframe. Then in the 2nd keyframe it counts down again from 5secs and goes to the 3rd keyframe...and so on.
_root.createTextField("timer",_root.getNextHighest Depth(),5,0,100,25);
_root.timer.text = 5;
function updateTimer() {
if (int(_root.timer.text)>0) {
_root.timer.text = int(_root.timer.text)-1;
} else {
gotoAndStop(5);
clearInterval(myInterval);
delete myInterval;
}
}
myInterval = setInterval(updateTimer, 1000);
Now this code works fine, but if i use a button to jump to the next keyframe before the timer has counted down it mucks up and gets in a fit
Does anyone know of a much simpler countdown script I can borrow?
Thank you
View Replies !
View Related
When Are External Files Included?
when you have an external class .as file, like this:
package{
class
}
when will it be included in your .fla file? you don't have to include it urself, so how does flash know it has to include that file?
i dont understand in general the act of including .as files.
View Replies !
View Related
Will Not Reload External Swf (zip Included)
Hi,
Download .zip here www.ekolinemedia.com/ekolinemedia.zip
***Note: Only "Profile" "Accolades" buttons are functional
I have created a website that loads external swfs
Everything works BUT...when I try to reload a page it does not work
For instance: I open up the "index" swf. I click on "profile", it loads and transitions perfectly. I click on "accolades", it loads and transitions perfectly. HOWEVER, if I click on profile again it does not load the "profile" swf properly. Same if I click "accolades" again it does not load properly.
From my knowledge the "profile" swf loads on the stage, BUT the MC "Transition" is not proceeding to the frame label "Opening". Therefore it is stuck on frame "48" the last frame of frame label "Closing".
I have been trying forever to get this to work, please help
View Replies !
View Related
Two Questions.. Code Included..
1. why in the world is
ActionScript Code:
stage.scaleMode = StageScaleMode.NO_SCALE;
not working.. the stage align right above it works fine.. ??? but as soon as I uncomment it, it errors out when played.
2. I'm trying to determine what needs to be added to an "ADDED_TO_STAGE" function in order to use a preloader swf.. i've got the preloader working, but i know that it's throwing a null because of a null object reference.. usually stage right?? well I've tried a bunch of different things and it's just not happening.. any suggestions..
code:
ActionScript Code:
package
{
import com.boostworthy.animation.easing.Transitions;
import com.boostworthy.animation.management.AnimationManager;
import com.boostworthy.animation.rendering.RenderMethod;
import com.boostworthy.core.Global;
import flash.display.Loader;
import flash.display.MovieClip;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.events.ProgressEvent;
import flash.filters.GlowFilter;
import flash.net.URLRequest;
import flash.ui.ContextMenu;
import flash.ui.ContextMenuItem;
public class Atoll extends MovieClip
{
//URL Requests
//______________________________________________________________________________________
var _intro:URLRequest = new URLRequest('Intro.swf')
//Variables
//______________________________________________________________________________________
//IDE item Vars
var _fullScreen:fullScreenButton = new fullScreenButton();
//Animation Vars
var _animationMNGR:AnimationManager;
//Menu Vars
var _atollMenu:ContextMenu = new ContextMenu();
var newMenuText1:ContextMenuItem = new ContextMenuItem("test");
var newMenuText2:ContextMenuItem = new ContextMenuItem("©");
//Loader Vars
var _bgSWFholder:MovieClip = new MovieClip();
//Loaders
var _mainLoader:Loader = new Loader();
//PreLoader Vars
//CONSTRUCTOR***************************************************************************
public function Atoll()
{
trace("Document Class Works");
this.addEventListener(Event.ADDED_TO_STAGE, init);
function init(event:Event):void
{
trace('added to stage')
}
//Animation Manager
_animationMNGR = new AnimationManager;
//Fullscreen
_fullScreen.buttonMode = true;
_fullScreen.addEventListener(MouseEvent.MOUSE_UP, toggleFullscreen);
_fullScreen.addEventListener(MouseEvent.MOUSE_OVER, fullScreenOver);
_fullScreen.addEventListener(MouseEvent.MOUSE_OUT, fullScreenOut);
_fullScreen.filters = [new GlowFilter(0xffffff, 1, 0, 0, 1, 1)];
_fullScreen.x = stage.stageWidth/2;
_fullScreen.y = stage.stageHeight/2;
//_fullScreen.alpha = .5;
addChild(_fullScreen);
//Contextual Menu
//______________________________________________________________________________________
this.contextMenu = _atollMenu;
_atollMenu.hideBuiltInItems();
_atollMenu.customItems.push(newMenuText1);
_atollMenu.customItems.push(newMenuText2);
//BG MovieClip Loader and Holder
//______________________________________________________________________________________
_mainLoader.load(_intro);
_mainLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, mainLoaderLoaded);
_mainLoader.contentLoaderInfo.addEventListener(Event.ACTIVATE, mainLoaderActivated);
_mainLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, mainLoaderProgress);
//Scaling stage RESIZE
Global.stage = stage;
stage.align = "TL";
//stage.scaleMode = StageScaleMode.NO_SCALE;
this.stage.addEventListener(Event.RESIZE, resizeListener);
function resizeListener(event:Event):void
{
reposition();
}
reposition();
//END OF CONSTRUCTOR
}
function reposition():void
{
/*middleClip.x = stage.stageWidth/2;
middleClip.y = stage.stageHeight/2;
topClip.width = stage.stageWidth;
topClip.y = 0;
topClip.x = 0;
botClip.width = stage.stageWidth;
botClip.x = 0;
botClip.y = stage.stageHeight - topClip.height;*/
trace("stage width: "+stage.stageWidth);
trace("stage height: "+stage.stageHeight);
if (stage.stageHeight > _bgSWFholder.height || stage.stageWidth < _bgSWFholder.width)
{
_bgSWFholder.height = stage.stageHeight;
_bgSWFholder.scaleX = _bgSWFholder.scaleY;
}
if (stage.stageWidth > _bgSWFholder.width || stage.stageHeight < _bgSWFholder.height)
{
_bgSWFholder.width = stage.stageWidth;
_bgSWFholder.scaleY = _bgSWFholder.scaleX;
}
_animationMNGR.move(_fullScreen, stage.stageWidth/2, stage.stageHeight/2, 500, Transitions.QUART_IN_AND_OUT, RenderMethod.ENTER_FRAME);
//_animationMNGR.alpha(_fullScreen, .25, 1000,Transitions.EXPO_OUT, RenderMethod.ENTER_FRAME);
//_animationMNGR.alpha(_fullScreen, 1, 2000, Transitions.EXPO_IN, RenderMethod.ENTER_FRAME);
//_animationMNGR.pulse(_fullScreen, "alpha",.25, .75, 5000, RenderMethod.ENTER_FRAME);
//_animationMNGR.pulse(_fullScreen.colorMatrix, "brightness", 0, 90,5000,RenderMethod.ENTER_FRAME);
//_animationMNGR.pulse(_fullScreen.glowFilter, "BlurX", 0, 500, 5000, RenderMethod.ENTER_FRAME);
}
//MainLoader Event FUNCTIONS
function mainLoaderProgress(evt:ProgressEvent):void
{
var _percentLoaded:Number = evt.bytesLoaded/evt.bytesTotal;
_percentLoaded = Math.round(_percentLoaded * 100);
trace(_percentLoaded);
}
function mainLoaderLoaded(evt:Event):void
{
trace('Load Complete');
_bgSWFholder = evt.target.content;
addChildAt(_bgSWFholder, 0);
reposition();
}
function mainLoaderActivated(evt:Event):void
{
trace('activated');
}
//Fullscreen Button FUNCTIONS
function fullScreenOver(evtObj:MouseEvent)
{
trace('full screen over');
_animationMNGR.filter(_fullScreen, GlowFilter, "blurX", 13, 500, Transitions.CUBIC_OUT, RenderMethod.TIMER);
_animationMNGR.filter(_fullScreen, GlowFilter, "blurY", 13, 500, Transitions.CUBIC_OUT, RenderMethod.TIMER);
_animationMNGR.brightness(_fullScreen, 100, 500, Transitions.QUART_IN_AND_OUT, RenderMethod.ENTER_FRAME);
_animationMNGR.move(_fullScreen, _fullScreen.x+1, _fullScreen.y+1, 250, Transitions.EXPO_IN_AND_OUT, RenderMethod.ENTER_FRAME);
}
function fullScreenOut(evtObj:MouseEvent)
{
trace('fullscreen out');
_animationMNGR.filter(_fullScreen, GlowFilter, "blurY", 0, 500, Transitions.CUBIC_OUT, RenderMethod.TIMER);
_animationMNGR.filter(_fullScreen, GlowFilter, "blurX", 0, 500, Transitions.CUBIC_OUT, RenderMethod.TIMER);
_animationMNGR.brightness(_fullScreen, 0, 500, Transitions.QUART_IN_AND_OUT, RenderMethod.ENTER_FRAME);
_animationMNGR.move(_fullScreen, _fullScreen.x-1, _fullScreen.y-1, 250, Transitions.EXPO_IN_AND_OUT, RenderMethod.ENTER_FRAME);
}
function toggleFullscreen(evtObj:MouseEvent)
{
switch (stage.displayState)
{
case "normal" :
stage.displayState = "fullscreen";
break;
case "fullScreen" :
default :
stage.displayState = "normal";
break;
}
trace("Toggle Fullscreen");
}
}
}
I know this is probably horrible coding, so any advice would be greatly appreciated.. thanks
View Replies !
View Related
Help With Movies Overlapping (FLA Included)
Im customizing a flash template from flashden for a friend (I hate using templates) Anyway I cannot for the life of me think of why movie clips will not load correctly into a mc holder. It seems to be a problem with overlapping movie clips. I got out of the flash scene quite a while ago so this is a trip down memory lane.
I have uploaded the whole flash folder to this address: http://www.approachdesign.co.uk/foobar/flashfolder.zip The problem is when I call another movie to replace the existing movie in a mc holder. The main files you will need to look at is index.fla, if you run through a preview and click the design menu button wait for a second or two then the previous loaded movie overlaps the new loaded movie which I don’t want i.e. half way through the design slide playing the previously loaded home_slide overlaps instead I want only the design slide to be visible. The back button also creates duplicate clips which clash against each other it isn’t nice at all!
I know this is a bit vague but if you have a looksie you will be able to see for yourself what the problem is.
Thank you in advance for your time and priceless help!
View Replies !
View Related
|