External Inferface Killing Loadclip Support
so... i've been doing some testing- (Opera 9 is still )
import flash.external.*;
once you import the flash external capabilities, the movieClipLoader support seems to be removed when displaying the SWF in Opera 9.0; movieClipLoader works in every other browser after importing flash.external;
anyone have any ideas?
cheers-
ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 08-16-2006, 01:37 AM
View Complete Forum Thread with Replies
Sponsored Links:
External SWF - LoadClip() Problem
I have used loadClip, and loadMovie a ton of times and have never ran into this problem, so I am hoping someone here can provide me some insight on how to fix this.
I am using loadClip() to load up external SWF's for a portfolio, everything is functioning perfectly, it preloads, it gets all the values from the clips properly, but when the movie loads up the animations from the SWF exceed (or go outside of, and are still visible) the published size. So instead of seeing what I normally see when I publish the SWF, I see everything that happens, even stuff that is meant to appear "off screen", or in the case of the SWF, outside the published size. As far as how I am going about loading up the SWF's, I am just using an empty movieclip and loading them into there.
Does anyone know why this may be happening? Any help will be greatly appreciated!
View Replies !
View Related
HELP? Button To LoadClip From External SWF W/Preloader
I'm familiar with basic script and computer programming from way back with fortran in college but this is making me nuts trying to figure this out. I was hoping someone would be able to provide me with script and what each line means or point me to where I can find it. I understand most of the script but get confused with the details.
OK here's what I want to do. on my main timeline I have buttons. I want each button to load an external swf into my main timeline so it takes over the screen. I also want each loaded external swf to begin with the same preloader in main movie.
So far I know I need:
a button
an empty movie clip
a preloader movie
external swf's
clicking the button should load (loadClip) the external swf into my empty movie clip
listeners run script like this:
preload.onLoadProgress = function(targetMC, lBytes, tBytes) {
bar._width = (lBytes/tBytes)*100;
pText.text = "% "+Math.round((lBytes/tBytes)*100);
(here i get everything but the preload.onloadprogress. what exactly does that mean/do?)
While that is waiting to get to 100% I want my preloader movie to playing in the empty clip.
AS if that isn't enough, can I make the movies that load into the clip fill my stage no matter the original size of the external swf's.
If anyone can help with this I would murder one of your worst enemies for you ;-}~
View Replies !
View Related
Button To LoadClip From External SWF W/Preloader
I'm familiar with basic script and computer programming from way back with fortran in college but this is making me nuts trying to figure this out. I was hoping someone would be able to provide me with script and what each line means or point me to where I can find it. I understand most of the script but get confused with the details.
OK here's what I want to do. on my main timeline I have buttons. I want each button to load an external swf into my main timeline so it takes over the screen. I also want each loaded external swf to begin with the same preloader in main movie.
So far I know I need:
a button
an empty movie clip
a preloader movie
external swf's
clicking the button should load (loadClip) the external swf into my empty movie clip
listeners run script like this:
preload.onLoadProgress = function(targetMC, lBytes, tBytes) {
bar._width = (lBytes/tBytes)*100;
pText.text = "% "+Math.round((lBytes/tBytes)*100);
(here i get everything but the preload.onloadprogress. what exactly does that mean/do?)
While that is waiting to get to 100% I want my preloader movie to playing in the empty clip.
AS if that isn't enough, can I make the movies that load into the clip fill my stage no matter the original size of the external swf's.
If anyone can help with this I would murder one of your worst enemies for you ;-}~
View Replies !
View Related
I Am Trying To Use Loadclip To Load An External Swf Into A Target Movieclip On Level
OK, I know I am being stupid here. I should know this but for the life of me I can't dig it up.
I am trying to use loadclip to load an external swf into a target movieclip on level 50, so I can control the alpha and positioning and what not of the target movieclip. How do you do this?
This is what I have so far, but it's clearly not working:
ActionScript Code:
var navLoader:MovieClipLoader = new MovieClipLoader();
this.createEmptyMovieClip(navMCLoader);
navMCLoader.attachMovie("navMC","navMC",50);
navLoader.loadClip("nav.swf",navMC);
navMC._alpha = 50
;
View Replies !
View Related
Accented Characters Support For External Text Files
Hi there! I created a site which imports external text from a TXT file. The text is in Spanish, so I need accented vowels and Ñs. I've tried using simple text and HTML text... but when I run my movie, it doesn't show these international characters. Instead, I get some weird symbols or question marks... What should I do? Thanks in advance!
View Replies !
View Related
External SWF Loads Too Early With .loadClip And Starts Playing Before .onLoadInit
Hi
I am trying to load an external SWF file using the MovieClipLoader. I have had success before in the future but i have never tried loading an external animation, just a static, on frame SWF. Here is my problem. When i load the swf using .loadClip("swf", target) my preloader pops up and starts preloading this movie. Before the preloader stops loading, the external swf animation starts playing in its target and by the time the preloader is finished and faded out the swf is a few seconds in. The preloader works fine (i think) because it loads static swf's fine and fades in and out at the right times etc. This has been puzzling me for a while now. i tried putting
stop();
_root.onEnterFrame = function() {
if (_root.getBytesLoaded() >= _root.getBytesTotal()) {
play();
}
}
in the external swf in question and this still causes the same problem, so for some reason the preloader thinks its still loading, it it isnt. I thought it might have been because the movie plays before it stops loading and "streams" what it has loaded so far but obviously not.
Any help with this will be fantastic, thanks
Wasim
Attach Code
var movieLoader:MovieClipLoader = new MovieClipLoader();
var loadListener:Object = new Object();
movieLoader.addListener(loadListener);
var preloader = preloader_mc;
var loaderbar = preloader_mc.loaderbar_mc;
var percenttxt = preloader_mc.percent_txt;
preloader._alpha = 0;
function loadPage(page:String) {
if (page != currentPage) {
loaderbar._xscale = 0;
percenttxt.text = "0%";
var fadeIn:Tween = new Tween(preloader, "_alpha", Strong.easeOut, 0, 100, 1, true);
var fadeOutEMC:Tween = new Tween(placeholder_mc, "_alpha", Strong.easeOut, 100, 0, 1, true);
fadeIn.onMotionFinished = function() {
currentPage = page;
movieLoader.loadClip(page + ".swf", placeholder_mc);
loadListener.onLoadProgress = function(target:MovieClip, loaded:Number, total:Number) {
percent = (loaded/total) * 100;
loaderbar._xscale = percent;
percenttxt.text = Math.round(percent) + "%";
}
loadListener.onLoadInit = function() {
var fadeOut:Tween = new Tween(preloader, "_alpha", Strong.easeOut, 100, 0, 1, true);
var fadeInEMC:Tween = new Tween(placeholder_mc, "_alpha", Strong.easeOut, 0, 100, 1, true);
}
}
}
}
home.onRelease = function() {
loadPage("intro");
}
Edited: 04/13/2008 at 06:21:48 AM by Woz Records
View Replies !
View Related
This Is Killing Me....
i just don't know what's happening...
I think i do everything allright. The problem is if you don't have the font i used installed, than you will see it all messed up.
But i didn't use dynamic fields, or device fonts, i did all the right things with this pixel font, the size, the position.... everything.
The problem is this.. if you don't have it, you won't see it.. but i've saw a lot of flash sites with fonts i don't have so the problem can't be very big, right?
Can some of you please be kind to solve this problem please?
Thanks in advance!
Alexandre Silva
View Replies !
View Related
MX Is Killing Me... Ugh
I've tried giving a button the old:
on (release) {
gotoAndPlay(2,1);
}
You know, like I used to - before MX... but it won't work! What on earth do I have to do now just to get my button to go to another scene, once its clicked?
Please Help!
~Vik
View Replies !
View Related
This Is Killing Me
Hi,
I have a feeling this is going to be a long email, forgive me. Any help is going to help me sleep at night. I'll try and explain as clearly as possible.
I am create a navigation system. It is just a number of square blocks, which are the buttons.
As you move over a block it extends horizontally to reveal the button's 'name' (just text). It will push any of the blocks to its right along with it
Obviously, this can simply be achieved by creating a movie clip with 5 different 'labels'.
Then onRollover a specific button, lets say the third block, I can tell the playhead to goto and play the specific label 'Extend block 3'.
When I roll out of the button the playhead to go back to the start (just the blocks nothing extended).
This looks unprofessional and not very smooth because it flicks from label to label.
I have assigned the following ActionScript to the first frame.
code: myBoolean=false;
Block1.onRollOver=function(){
myBoolean = true;
}
Block1.onRollOut=function(){
myBoolean = false;
}
Navigation_mc.onEnterFrame=function(){
if(myBoolean){
this.play("Button1_open");
}
else{
this.prevFrame();
}
if(Navigation_mc._currentframe>=37){
this.stop();
//do something here
//this.loadMovie('someMovie.swf",1);
}
}
Basically, this tells the movie clip to play on the label of block 1 extending. It 'rewinds' the movie clip to give a smoother collapse. (See attachment)
This is all very well FOR BLOCK 1. You will see I have used a 'transparent' movie clip as the 'hit area' for the action. When the movie clips plays and the block extends the hit area obviously stays the same. So from a visual point of view you can still be on the button but you can move your mouse off the hit area collapsing the blocks.
Again, if the user rolls over the second block and I apply a True bolean. It's just going to play the first block moving out.
I thought maybe setting a varible which was a number. If you rolled over block one the varible would be set as '1', and if you rolled over 2 the varible would be '2' etc. If any of the blocks where rolled out of the varible would be '0'. and the playhead would reverse until I worked out how to stop it at a specific point?
I've not tried this but I can't see it doing what I want it to.
How would I be able to make the play head stop at a specific keyframe, if there are more than 1 varible?
Is that all hurting your heads? It gets worse...
...I would then like the same flowing motion to happen after a block is extended.
For example, if you have rolled over block 2 and not rolled off, so it has stopped fully extended and you then move over block 3 straight away then the movie clips would play extending block 3 smoothly as block 2 retracts to it's original state. This motion could rewind to it's start point as well.
It would create a smooth wave of expanding and retracting buttons.
My headhurts now - does anyone know what I mean, I don't think I do anymore.
Anyone?
View Replies !
View Related
IE Is Killing Me
like xesz, i am having problems with IE too. My preloader works great in Mozilla, but with IE, it will not load the numbers which are counting to 100%....ideas? tried already to embed the font
View Replies !
View Related
IE Is Killing Me
like xesz, i am having problems with IE too. My preloader works great in Mozilla, but with IE, it will not load the numbers which are counting to 100%....ideas? tried already to embed the font
View Replies !
View Related
I'm Killing Myself With This NAV BAR Any Help?
hey guys Anyway I've been asking for help alot on this and I guess Im still not getting the picture. Basically I'm trying to replicate the TAZO TEA script from there web site.... www.tazo.com ... i'm trying to get that nav bar that they have i was using this script but Its not working or i guess i have the elements in the wrong place? Also At one point I had got it to work and didnt save it BUT* I couldnt figure out of to make a button in one movie clip call up another movie clip behind it. Hmm if you want check out my fla file ... thnx alot guys
menu.but.onRollOver = function()
{
_root.onEnterFrame = function()
{
menu._rotation +=1;
if(this._parent._y >= 100)
{
_root.onEnterFrame = null;
}
}
}
View Replies !
View Related
Ok This Is REALLY Killing Me PLZ HELP
I'm using Flash MX....Ok so this is a simple example of what I'm trying to do...I have my main time line and I added a circle...I converted the circle to a movie clip...I double clicked it. In the movie clip I double clicked the same circle and converted it into a button....Ok so in the movie clip I click actions for the button that i've created and did a on release goto and stop on frame one of scene two script....I added a scene 2 to the file with a stop action in frame one....when I load up the movie and click the button it DOESN'T goto scene 2. I believe it's because I don't know how to script nested things can someone PLEEEASE help me? What is the syntax for nexted things like this????
View Replies !
View Related
[F8] This Is Killing Me...please Help
hi guys,
i am working with cs3 and im trying to do somthing ive done a bunch of times in mx and cant figure it out and im going nuts...
i have a photo gallery that has nice transitions saved as "header.swf"
and a movie clip instance in my flash cs3 movie called empty
and ive tried hours of code substitutions with a whole lot of dumb error messages:
empty.loadMovie("header.swf");
yields
TypeError: Error #1006: loadMovie is not a function.
at dynamicsite_fla::MainTimeline/dynamicsite_fla::frame1()
loadMovie("header.swf", "empty");
yields
1180: Call to a possibly undefined method loadMovie.
View Replies !
View Related
Oh My God This Is Killing Me...
Hey Flashers.
I am having a total nightmare trying to code the script to close a movie clip. I must have spent about 3 hours trying to do it but as I'm rubbish as AS I'm really struggling : (
My new site is one main .swf that pulls in all the other .swfs with code. so far so good. however some of the .swfs that are pulled in need to be closeable (if thats a word).
What should work is a close button with the code:
on (release) {
page_mc.removeMovieClip("page.swf");
}
but sadly it doesn't
I have made a really simple version of my site to explain the problem as its kinda hard to explain and uploaded it.
http://www.digital-farm.co.uk/flashfiles.zip
If one of you really nice people could take a couple of minutes to look at it I would be sooooooo grateful. For anyone who knows AS it will be super simple but as I'm still in early learning stages its super hard for me.
Thanks so much for reading this.
Regards,
Stef.
p.s. the file you need to open is 'mainpage.swf'
View Replies !
View Related
This XML Is Killing Me
I have an XML file that I need to read and display the results, I am able to read and load the xml in to the action script with out a hitch. My problem is the results is boolean and I'm not sure how to parse through that.
XML snipet: (cleaned up version)
Code:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<CheckStoppingRuleResponse xmlns="TrialIVBuMel">
<aSubGroupContinueIndicators>
<boolean>false</boolean>
<boolean>true</boolean>
<boolean>false</boolean>
<boolean>false</boolean>
<boolean>false</boolean>
<boolean>false</boolean>
<boolean>true</boolean>
</aSubGroupContinueIndicators>
<sErrors />
</CheckStoppingRuleResponse>
</soap:Body>
</soap:Envelope>
My Actionscript:
trialXML = new XML();
trialXML.ignorWhite = true;
trialXML.load("results.xml");
trialXML.onLoad=function(success){
if(success){
trace(this.firstChild.firstChild.firstChild.childN odes[0]);
function subGroups(trialXML){
for (var n=0; n<trialXML.firstChild.firstChild.firstChild.childN odes.length; n++) {
trace(trialXML.firstChild.firstChild.firstChild.ch ildNodes[n].firstChild.nodeValue);
}
}
}else{
output.text + "XML Loading Error!";
}
};
View Replies !
View Related
PLEASE Help Me Out This Is Killing Me
i have buttons in my library. I try to put the code
Code:
getURL("http://www.blahblah.com", "_blank");
into it when i edit it from the library but it always says "current selections can't have actions applied to it". How do i get to it so i can have a link pop up when i click the button? does the "getURL" also work for files on my computer? for instance i want to click a button and have a movie pop up from one of my folders on the c drive. what would i code to do that? thanks SOOOOOO much to whoever can help me out, i have been trying to do this for days...
View Replies !
View Related
Buttons In MC Are Killing Me
Hi there!
Need some more help..
I made a movieclip containing 4 buttons, each for going to a different scene.
The first button works, I did:
on (release) {
tellTarget ("_level0") {
gotoAndPlay ("scene 3", 1);
If I do the same for the other buttons, but gotoandplay scene4 and so on, they still go to scene3?
What do I do wrong??
Please help!
thnx
View Replies !
View Related
Hierarchy Is Killing Me
i need help with the path of my grid of boxes.
the problem is i have created a grid of boxes looking something like this
# # # # #
# # # # #
# # # # #
# # # # #
each boxes has a unquie instance name.
Scene 1
posX = 5;
posY = 20;
var myLife = new Array();
for (i=1; i<=300; i++) {
_root.attachMovie("blokk", "blokk"+i, i);
_root["blokk"+i]._x = posX;
_root["blokk"+i]._y = posY;
posX += 12;
live[i] = "alive";
if (i%15 == 0) {
posX = 5;
posY += 12;
}
}
then i want to be able to change the color of each of the boxes and then use a button and antoher for loop to check the color of each box.
Any ideas out there?
thanks
View Replies !
View Related
This Actionscript Is Killing Me...
I have a movie clip that has a button inside it. This movie clip is
placed on my normal scene (scene 1).
Upon pressing the button in the MC, I wish to go to a different frame
on my normal scene (scene 1) the solution I am told is
_root.MyClip.gotoAndStop(2)
However I have music playing in the background in another MC.
This sends my music crazy! I think they are interfering with each
other!
Does anybody have any solutions?
Thanks!
View Replies !
View Related
DuplicateMovieClip Is Killing Me
Hello everybody.
I write here because I REALLY need help now.
I have a button that, on Rollover, makes a duplicateMC, then goes to a frame and finally it puts the new MC on same position of mouse (x and y)... or this is what's suposed to do!!
Code for button:
---------------------------------
on (rollOver) {
duplicateMovieClip (kick, newkick, 3);
kick.gotoAndPlay("bomb");
call("reset");
}
---"reset" is a frame with some AC to stop counters on the
video game and so... and the instruction to go to the "frame"
Code for the "frame" i'm going to:
----------------------------------
newkick._x=_xmouse;
newkick._y=_ymouse;
trace(_xmouse+ "-" + newkick._x);
stop();
The trace command is set to give me the real position of the new MC, but its in blank!!! So it doesn't make any duplicate!??!?!?!?!?
Something else...
if I use setProperty(newkick, _x, _xmouse); ......
THE WHOLE STAGE MOVES TO THE MOUSE POSITION!!!
INCREDIBLE!! ISN'T???
Please... heeeeeeeeeeeelp.
Thanks
View Replies !
View Related
GetTimer() - This Is Killing Me.
[size="small"]This is gonna cost me my every last nerve, I swear ...
Here's what I'm trying to get done:
User comes to my "work" page (= subhome of my portfolio area)
While the user reads some text, I want to present a looping slide show that consists of 10 mc's ("container01" ... "container10"), with an image in each container
"container01" is supposed to be visible for 3 seconds then fade out (_alpha to 0) within one second to reveal "container02" beneath it. "container02" remains visible for 3 seconds then fades out within one second etc. etc. ...
The images within each container are going to be changed frequently, so sticking all the container mc's in one "monster mc" with
a "gotoAndPlay(1)" isn't really an option
What I have so far is:A slide show container mc (slideshow_mc) with one frame and ten levels
"container01" to "container10", each on one level in slideshow_mc
"container01" contains an mc with a jpg in it (jpg01_mc), "jpg01_mc" fades out in one second
The first frame of each container has the following code attached to it:[/size]
stop();
this.onEnterFrame = function(){
if(getTimer() >2999){
play();
this.onEnterFrame = null;
}
}
[size="small"]for the subsequent containers, I simply increased the time by 4000 each - and bingo, I have a beautiful (or so I thought) slide show ...
Everything works just fine until the last image has faded out ... since there doesn't seem to be a way to reset/restart the timer, I simply have no clue how to get the sucker to loop back to the first image and start over ...
Is this approach a dead end? I'm increasingly getting the feeling that I can't "see the forest for all the trees", I've been sitting over this for way too long and my brain feels like jello ... is there an easier way to accomplish this?
Any help/hints/tips/code snippets you guys can provide would be wonderful!!
kubik
p.s. if it's of any help, I'll gladly post a test .fla[/size]
View Replies !
View Related
This Is Killing My Brain
What the crapping hell does flash think it's doing? i have a preloader clip that is called perfectly fine from all root buttons in the main movie, the code being _root.preloader.play(): . So why oh why is it not playing when I use exactly the same command from within this if statement that is in an external swf, loaded into a blank movieclip??? all the other commands are being executed except the _root.preloader
if (numberclip.pin == 0000) {
content = "staff";
_root.status = "loading so+so clip";
gotoAndPlay("accepted");
_root.preloader.play():
} else {
tellTarget ("invalid") {
gotoAndPlay("open");
}
}
anyone? PLEASE. feel like smashing something up if this doesn't work soon.
(version 5 by the way!)
View Replies !
View Related
Killing OnEnterFrame
i trying to make this kirupa preloader tutorial complitly dynamic
but something is killing my ONENTERFRAME event
fla-file is attached, please HELP!
notice that this line39
trace("pleas dont stop");
stops executing as soon as the trans-mc timeline reach the 9th-frame
if u omit this line 30 from maintimeline
attachMovie("tr", "transition", 20);
enterFrame suddenly keep going
so far, something inside of trans-mc is rapeing my onEnterFrame
bu i cant figure out what, specialy couse ther is very simple stuf inside of trans-mc, like:
_root.section = "profile.swf";//frame1
_root.content.loadMovie(_root.section);stop();//frame9
stop();//frame 24
so what is it????????????????????????
View Replies !
View Related
Killing SetInterval
Hi Guys,
Need a hand here with my setInterval. on the first frame of oh my nav movie I have this code;
Code:
function getNews() {
loadMovie("news.swf", target="_root.clips");
clearInterval(getNews);
}
and on my button I have the following
Code:
on (release) {
_root.clips.alfa(0, 5);
setInterval(getNews, 3000);
setProperty("_root.clips", _x, 420);
setProperty("_root.clips", _y, 183);
}
}
everything works fine except that the setInterval just wont die! even though I have tried many variations of the clearInterval code.
Could someone please explain or help in anyway.
Thank you!
View Replies !
View Related
I Need Some Serious Help W/ Javascript (it's Killing Me)
I have a movie, which is not used within html. This movie will have many links, which will open html files. Now, what I need is to specify in the button code the size of the browser and what html file it will open. For example:
Button1 (in flash movie) - will open http://www.whatever.com/a.htm in new broswer with a width=500 and height=300 and NO scrollbars, statusbars, addressbars or anything else for that matter.
So, when Button1 is pressed, the code will basically open a.htm file in a new broswer, which is 500 by 300. It should do nothing else, meaning it should not open a third popup window or anything else (I've seen many codes that do that). I've also seen many codes that require to place a code in an html file and then in the flash code, what's all that about?
Can someone provide me with some basic steps that will enable me to achieve this???
Thanks in advance!
View Replies !
View Related
Fscommand Is Killing Me
Hello all,
This seems like it would be easy to do, but I've had no luck figuring it out. I want to send a command from a JavaScript that tells my flash movie to go to a frameLable. I know this involves fscommands and/or functions. I'm not sure how to pass the command or where to put the function in the flash movie. I've been able to find lots of information on how to pass commands Flash to JavaScript but nothing going the other directions. Any help would be greatly appreciated.
Thanks
-Len
View Replies !
View Related
OnClipEvent(s) Killing My CPU
Anybody have a remedy for this?
I have a menu.swf that sits in _level0, with an onClipEvent loading animated header images, matching the content page loaded.
That's OK, but after I load another content swf in _level1 which also has an onClipEvent to check something, the two running together bump my processor up to 100% and all the animation speed suffers considerably.
Are there workarounds for this?
View Replies !
View Related
Killing Enemies
Say I had my hero walk into an enemy. I want to show my enemy "dead". So instead of it moving around and whatever, i want it to change to it's dead version. Can anyone point me in the right direction, I know its something to do with hittest.
I hope I've explained well enough.
Thank you.
View Replies !
View Related
Virum Killing Me...help Me Out
Hi All
Everytime when I start my computer the desktop goes white....
it`s a html site on top of desktop filling the whole screen
I have installed several ad remover tool but it can`t clean it.
the properties on desktop
file://C:WINDOWSWebdesktop.html
how do I remove it...please help
many thanks
pilotX
View Replies !
View Related
This Animation Is Killing Me
i am making an animation to a voice over. it will be exported to an projector and distributed on cd, so everytime i test it i export it as one.
everytime i play it it goes at a different speed!!!
its giving me the heebie jeebies because the images are supposed to match up to the voice.
i know there is a way of creating markers in director to slow down the animation or speed it up to match with chosen points in the sound, but does such a thing exist in flash?
if it doesnt, whats the closest thing to it?
how can i fix it to make sure it plays the same speed everytime on all computers?
im using flash mx 2004 pro
cheers.
View Replies !
View Related
Flash Is Killing Me
I'm having major problems.
I'm creating a portfolio site. In the "portfolio" section, the movie loads scene by scene, instead of following the commands of the buttons. Why?
I have two separate swf files, one for my preloader, and another for my main site. After about a minute, the entire site reloads and resets to the splash, then all the buttons work correctly.
This is driving me crazy!!!!!
Any help would be monumentally helpful.
www.saucedesign.com
View Replies !
View Related
LoadVariables Killing Me
Hi,
I dont think I've ever been so frustrated by something that seems so simple.
I'm trying to import a value from a txt file, which I want to use in a condition, and for the life of me I can't understand why it isn't working. The condition never results true!! Should the syntax be different in the txt file or do I need to convert the variable to a string or something?
TXT FILE contains:
registration = registered
catchClip(Movieclip used to catch the data):
onClipEvent(data){
_parent.play();
}
TRIGGER:
on (release) {
loadVariables("demo.txt", "catchClip");
}
CONDITION WITH COMPARISON:
if (catchClip.registration == "registered") {
trace("condition is true");
}
View Replies !
View Related
These Buttons Are KILLING ME
I have a Template Monster template, and I am trying to take one set of buttons, and make more of them to replace the other type down the side.
Can someone please help me out????
here is a link to the Flash I speak of, as well as a link to the FLA
I want to take the buttons from the top and replicate those down the side replacing the ones that are currently down the side. I don't want to get rid of the top ones, just have the ones down the side look the same, same effect etc. So just to recap - I like the one on the top nav, and want the side navto have the same buttons.
For some reason when I try to dup them, and then change the button text more than one button's text changes. What the hell am I doing wrong?
http://www.etwdesign.com/buttonproblem.zip
Any help would be GREATLY appreciated!!!!!
View Replies !
View Related
AttachMovie Is Killing Me
i am really confused about the attachMovie method. So far this is the code that i have:
Code:
on (release) {
mc.attachMovie("mclink", mc1, 3);
}
mc is the name in the library mclink is the name in the linkage panel in the library mc1 is the new instance name and 3 is the depth. Is that right? this isnt working for me at all and its starting to get annoying. Any help would be much appreciated
Mavrisa
View Replies !
View Related
Helpflash9 Is Killing Me
Hi, I am new to the forum. I have tried to read the posts about Flash9, but can't make heads nor tails. It says no question is STUPID. Well, maybe I am the one stupid. Here is the problem. I downloaded Flash9. Whenever I open sites that use flash(myspace for instance) I get a pop-up box that says something about the flash.ocx error, then it closes out every window that is open. I am not a computer wiz BUT I am not completely dumb when it comes to computers. Maybe it is too many chair shots to the head as I am a pro wrestler. Anyways, if someone could help me, it would be GREATLY appreciated. You can post here, or email me with instructions on what to do to fix this. pastorrayrouse@hotmail.com. PLEASE SOMEONE HELP ME!!!!!
View Replies !
View Related
Killing Functions
How do you kill a function?
Take the code below (which does not work.):
code: function blink() {
_root.onEnterFrame = function() {
_root.pop_mc._alpha -= 1;
};
};
blink();
stopper_mc.onPress = function() {
delete blink;
};
The only 2 ways I know to stop the "blink" function from firing are:
1.) Kill the "onEnterFrame" event.
2.) Wrap the function up in an "Interval" & then clear that.
Is there no way to kill a function directly? I have tried setting the function up as an object & then trying to delete that eg:
_root.blink=function(){
//stuff;
}
stopper_mc.onPress = function() {
delete _root.blink;
};
Any help much appreciated
View Replies !
View Related
[F8] Killing A Navigation
I have this bit of code that creates a slide out navigation when the mouse moves. What I want to know is how to dis able this so it stays hidden when a button is pressed and re instate in on another button press.
Here's the code for the slide out navigation:
#include "mc_tween2.as"
var home:MovieClip = this;
var hideInt:Number = setInterval(hideNav, 100);//A higher number here will cause the hide animation to delay
var mouseListen:Object = new Object();
navL.origX = navL._x;
navR.origX = navR._x;
Mouse.addListener(mouseListen);
var soundPlay:Boolean = true;
mouseListen.onMouseMove = function() {
_root.navL.xSlideTo(0, 1);
_root.navR.xSlideTo(1920, 1);
clearInterval(hideInt);
hideInt = setInterval(hideNav, 500);//A higher number here will cause the hide animation to delay
Mouse.show();
}
function hideNav() {
var shouldHide:Boolean = true;
var b:Object = _root.navL.getBounds(_root.home);
if (_xmouse > b.xMin && _xmouse < b.xMax && _ymouse > b.yMin && _ymouse < b.yMax) {
shouldHide = false;
}
var b2:Object = _root.navR.getBounds(_root.home);
if (_xmouse > b2.xMin && _xmouse < b2.xMax && _ymouse > b2.yMin && _root._ymouse < b2.yMax) {
shouldHide = false;
}
if(shouldHide == true){
Mouse.hide();
_root.navL.xSlideTo(_root.navL.origX, 2);
_root.navR.xSlideTo(_root.navR.origX, 2);
}
}
View Replies !
View Related
EnterFrame Killing JS
My swf is embedded in a page with a lot of JS running around the edges - I've got a handful of objects (usually around 10) that run enterFrames to update their position and scale. The problem comes in when JS tries to tween a layer (motion and alpha) over the top of the swf - on most new computers it runs fine but on older machines the JS freezes up mid-tween and leaves weird half-transparent divs on the page.
When I cut out the enterframe everything works fine, leading me to believe it's a CPU problem, but looking at a system trace, the swf is only running at 20%. Anyone have any similar experience or advice?
View Replies !
View Related
SetInterval Killing Me
I am using setInterval to play animate a movie clip by progressing through the frames until the last frame is reached at which point the interval is cleared. That works fine. The problem comes when a user would exit that part of the movie before my logic clears the interval and the whole thing goes nuts. The interval seems to keep speeding up. I think the AS will explain better.
//drill arrays
CDrills1 = new Array("Drill1_Ex1","Drill1_Ex2","Drill1_Ex3");
CDrills1_Html = new Array("Drill1_Ex1.htm","Drill1_Ex2.htm","Drill1_Ex 3.htm");
CDrills1_Names = new Array("The Bend and Reach","The Rear Lunge","The High Jumper");
//set some variables
spacing = 20;
//pull in the html
var dt:LoadVars = new LoadVars();
function getDrillText(theDrill) {
dt.onData = function(content) {
_root.mainContentMC.drillText.drillTextBox.condens eWhite = true;
_root.mainContentMC.drillText.drillTextBox.styleSh eet = _root.styles;
_root.mainContentMC.drillText.drillTextBox.htmlTex t = content;
};
theDrillHtml = "Drills/" + theDrill;
dt.load(theDrillHtml);
}
//play the attached movie clip
function drillFrameTimer (theDrillClip) {
thisFrame = theDrillClip._currentframe + 1;
if (theDrillClip._currentframe <= theDrillClip._totalframes) {
theDrillClip.gotoAndStop(theDrillClip._currentfram e + 1);
} else if (thisFrame > theDrillClip._totalframes) {
thisFrame = 1;
trace("here")
clearInterval(drillHolderMC.theDrill.playDrill);
delete drillHolderMC.theDrill.playDrill;
} else {
thisFrame = 1;
clearInterval(drillHolderMC.theDrill.playDrill);
delete drillHolderMC.theDrill.playDrill;
trace("Interval Cleared");
}
}
exerciseSpeed = 500;
function populateDrills() {
for (i=0; i < CDrills1.length; i++) {
theNav = "DrillNav" + i;
drillHolderMC.attachMovie("DrillNav",theNav,i);
x = i * spacing;
drillHolderMC[theNav]._x = x;
drillHolderMC[theNav].drillNavNumber.text = i + 1;
drillHolderMC[theNav].item = i;
drillHolderMC[theNav].onRelease = function() {
trace("Intv Exists " + drillHolderMC.playDrill);
clearInterval(drillHolderMC.playDrill);
delete drillHolderMC.playDrill;
trace("Interval Del " + drillHolderMC.playDrill);
_root.mainContentMC.drillText.drillExName.text = CDrills1_Names[this.item];
this._parent._parent.getDrillText(CDrills1_Html[this.item]);
drillHolderMC.attachMovie(CDrills1[this.item],"theDrill",10);
drillHolderMC.theDrill._x = 50;
drillHolderMC.theDrill._y = 125;
drillHolderMC.theDrill._xscale = 50;
drillHolderMC.theDrill._yscale = 50;
drillHolderMC.playDrill = setInterval(drillFrameTimer,exerciseSpeed,drillHol derMC.theDrill);
}
}
}
stop();
View Replies !
View Related
This Is Killing Me... No Clue How To Do It...
Hey,
So basically I have a MovieClip Object (Container) holding MovieClip objects (Holder), making one, big long clip. This part works.
At anytime I am showing 3 of the "Holder" objects inside of the "Container". This is also working. Think of these 3 that can be seen as the previous, the current and the next. I have 2 buttons which allow me to move the Container both ways.
What I cannot figure out is this: I start with the first object being held inside of the "Current", and the second is obviously in the next frame. The previous frame is obviously blank. What I want to do is make it so that if the first "Holder" object is currently selected, I will see the last object of the "Container" in the "Previous" area, and when I go backwards, I can navigate backwards through the list, over and over. Likewise, when the last object if in the "Current" area, I should be seeing the first "Container" object at the start, and I could navigate through it, over and over.
Think of it like a never ending loop. I have tried a bunch of different things, but I am getting absolutely no where... this is the code that deals with it, only using 4 Holders. If anyone could give me a hand it would be amazing.
'Big Long MovieClip (Container)'
Code:
var i:Number = 0;
var mcContainer:MovieClip = this.createEmptyMovieClip("mcContainer", this.getNextHighestDepth());
var loader:MovieClipLoader = new MovieClipLoader();
while (i < 4) {
var mcHolder:MovieClip = mcContainer.createEmptyMovieClip("mcHolder" + i, mcContainer.getNextHighestDepth());
var mcName:MovieClip = mcHolder.createEmptyMovieClip("mcName" + i, mcHolder.getNextHighestDepth());
var mcThumb:MovieClip = mcHolder.createEmptyMovieClip("mcThumb" + i, mcHolder.getNextHighestDepth());
loader.loadClip("image" + i + ".jpg", mcName);
loader.loadClip("image" + i + "thumb.jpg", mcThumb);
mcName._x = i * 190;
mcThumb._x = i * 190;
mcName._y = 0;
mcThumb._y = 80;
i++;
}
Button Code
Code:
right_btn.onRelease = function():Void {
var twMove:Tween = new Tween(slider.mcContainer, "_x", Regular.easeOut, slider.mcContainer._x, slider.mcContainer._x + 190, .1, true);
}
left_btn.onRelease = function():Void {
var twMove:Tween = new Tween(slider.mcContainer, "_x", Regular.easeOut, slider.mcContainer._x, slider.mcContainer._x - 190, .1, true);
}
Thank you
View Replies !
View Related
Cache Killing
Hi,
Recently got a mac which means I can run a server on my laptop (Hoorah), but I've run into a problem. Whenever I test from within flash, any files I'm loading in (txt, xml etc) that I've appended a cache killer to:
Code:
"myfolder/myfile.xml?chk="+ new Date().getTime()
fail to load.
Is there any way round this? I don't want to have to go through each fla and add the cache killer just for publishing.
Thanks
View Replies !
View Related
Killing A Child
When I use the addChild property, I'm not sure where flash is putting it.
For instance, I have a basic class:
Code:
package
{
import flash.events.*;//Trigger events
import flash.display.*;//MovieClip objects
import flash.net.*;
public class BackgroundMovie extends MovieClip
{
var backgroundLoader:Loader = new Loader();
var bitmapImage:Bitmap = new Bitmap();
public function BackgroundMovie(p_image:String)
{
ChangeBackground(p_image);
//Load regular events
}
public function LoadBitmap(e:Event)
{
bitmapImage.bitmapData = e.target.content.bitmapData;
addChild(bitmapImage);
bitmapImage.x = (bitmapImage.height * -1)/2;
bitmapImage.y = (bitmapImage.width * -1) /2;
trace(bitmapImage.x + " : " + bitmapImage.y);
}
public function ChangeBackground(p_image:String):void
{
backgroundLoader.load(new URLRequest(p_image));
backgroundLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, LoadBitmap);
}
}
}
What this class does is basically add a new child every time I call ChangeBackground from another portion of the program. The problem here is, that as you can see, there is no removeChild because I don't know how to kill the previous loaded background.
I either need to find a way to kill the old child or learn how to reuse an existing element, and reload its bitmap data.
Don't know how to do either. Note: removeChild(bitmapImage); does not seem to be working.
Thanks for the help,
NB
View Replies !
View Related
Clarification On Doing A Killing...
deleting, killing objects and functions.
There seem to be a few different ways to achieve to completely get rid of unwanted objects and functions(which are in turn objects as well, no?)
Just to refresh:
objects:
Code:
object = undefined // does the job
object = null // does the job
exception: if the object is referenced anywhere else in the application, the object is still in memory, unless the object's reference is killed as above.
also: if you attempt to try cleaning up and object , which has objects itself, (e.g. object.subObject = new Object()), then those subObjects are still alive.
To properly clean up the object with subObjects, the subObjects have to be killed off seperately.
Am I right so far?
I am just writing this, because, yet again despite quiet some experience by now I had some setIntervals running in some objects, and they somehow kept appearing somewhere, because again somewhere, I didn't clean up the intervals and accompanying objects.
Can anyone comment on the above being right/wrong, best practice, etc.
Please be detailed, tell me in machine code if you must.
Mainly developing interactives for exhibition spaces which have to run for hours, memory leakage, is something not everyone has to take that serious, yet I do.
Cheers,
uncleunvoid
View Replies !
View Related
Php Variables Are Killing Me
I'm using a WHERE condition in a SELECT clause of my query thats looking for 3 parameters. When I plug the WHERE condition with strings it works:
mysql_connect(localhost, $username, $password) or die(mysql_error());
mysql_select_db($database) or die(mysql_error());
// Get a specific result from the "example" table
$result = mysql_query("SELECT * FROM allMeetings WHERE city = 'Boise, Idaho' AND day = 'Monday' AND time = '7:00a'")
or die(mysql_error());
// keeps getting the next row until there are no more to get
while($row = mysql_fetch_array( $result )) {
// Print out the contents of each row
//echo $row['city']." - ".$row['group']. "<br />";
echo $row['city']." - ".$row['day']." - ".$row['time']." - ".$row['group']." - ".$row['address']." - ".$row['flag1']." - ".$row['flag2']. " - ".$row['flag3'].'<br />';
}
Now the fun part. If I replace the strings with variables it errors out:
$fcity = "Boise, Idaho";
$fday = "Monday";
$ftime = "7:00a";
mysql_connect(localhost, $username, $password) or die(mysql_error());
mysql_select_db($database) or die(mysql_error());
// Get a specific result from the "example" table
$result = mysql_query("SELECT * FROM allMeetings WHERE day=$fday AND city=$fcity AND time=$ftime ") or die(mysql_error());
// keeps getting the next row until there are no more to get
while($row = mysql_fetch_array( $result )) {
// Print out the contents of each row
//echo $row['city']." - ".$row['group']. "<br />";
echo $row['city']." - ".$row['day']." - ".$row['time']." - ".$row['group']." - ".$row['address']." - ".$row['flag1']." - ".$row['flag2']. " - ".$row['flag3'].'<br />';
}
The above returns the following:
You have an error in your SQL syntax near ' Idaho AND time=7:00a ' at line 1
I'm sure its something simple and stupid so if anyone can enlighten me I would be much obliged.
View Replies !
View Related
PopupManager Is Killing Me
I use PopupManager to display a canvas that show the user some option when the user clicks an option I remove the popup and change the state of the base application. This should all work fine but it doesn't because after the popup is removed the application components are all disabled. Can anybody help me?
View Replies !
View Related
This Is Killing Me...preloader
This is my code in a movieclip which is loaded on the main timeline and the duplicated.
Its task is to load an image and i want to show the loading process.
temp is a textfield which should show the loading progress.
but it says 0% then "infinity"and finally 100% but nothing in between.
What is the problem???
__________________________________________________ _
this.createEmptyMovieClip("preloader", 1000);
this.createEmptyMovieClip("container", 1001);
container.loadMovie("images/" add imagename);
container._visible = false;
preloader.onEnterFrame = function() {
var l = container.getBytesLoaded();
var t = container.getBytesTotal();
var getPercent = l/t;
temp = Math.round(getPercent*100)+"%";
if (l>0 && l>=t) {
container._visible = 1;
delete this.onEnterFrame;
}
};
View Replies !
View Related
Killing One Function With Another
Ok... That was a pretty bad way of explaining what I'm trying to do.
The deal is as follows:
I have a movieclip that is wider than the stage. When the user moves his mouse within a certain area on the left or right sides the movieclip tweens to that side. So far, so good.
Now I also have scripted tweens when the user clicks on certain movieclips within the sliding clip, and when this occurs I want to disable the left/right scrolling detection. What I've done is to declare a variable (mayScroll) with a boolean value and to make this conditional for the sidescrolling to occur.
The problem is that somehow the variable is updated to early sometimes when leaving the zooming tweens, and so my movieclip springs all over the place.
I'm sure by now noone understands what the hell I'm on about, so here is the script:
ActionScript Code:
#include "lmc_tween_as1.as"
var mayScroll = true;
var xMouse = _root._xmouse;
var yMouse = _root._ymouse;
showUI = function(){
backBtn.alphaTo(100, 2, "easeinSine",1)
backBtn.enabled = true;
}
seksjonFunk = function(){
panel.skjermBtn.enabled = true;
panel.vognBtn.enabled = true;
mayScroll = true;
}
panel.onMouseMove = function(){
if ((_xmouse > 600)&&(mayScroll == true)){
this.slideTo(-367,0);
} else if ((_xmouse < 150)&&(mayScroll == true)){
this.slideTo(0,0);
}
}
panel.skjermBtn.onRelease = function(){
mayScroll = false;
panel.scaleTo(200,2,"easeoutelastic",0.2);
panel.slideTo(-50,-420,2,"easeoutelastic",0.2);
panel.rotateTo(5,2,"easeoutelastic",0.2);
this.enabled = false;
showUI();
}
panel.vognBtn.onRelease = function(){
mayScroll = false;
panel.scaleTo(200,2,"easeoutelastic",0.2);
panel.slideTo(-800,-450,2,"easeoutelastic",0.2);
panel.rotateTo(8,2,"easeoutelastic",0.2);
this.enabled = false;
showUI();
}
backBtn.onRelease = function(){
panel.rotateTo(0,1,"easeoutCirc",0);
panel.scaleTo(100,1,"easeoutCirc",0.3);
panel.slideTo(0,0,1,"easeoutCirc",0.3);
this.enabled = false;
this.alphaTo(0,2,"easeoutCirc",0.2);
mayScroll = true;
seksjonFunk();
}
And here is the .fla
SWF can be found here
What I need help with is the following:
Whenever the user clicks one of the movieclips that starts a zoom-tween, the sidescrolling stops altogether.
When the user leaves the "zoomed in area" and returns to the main section, the sidescrolling does not start again until after the zoom-out tween is over and done with.
As you can see I'm using the tweening libraries from http://laco.wz.cz/tween/, so the .fla will not play properly unless you save it in the same folder as these prototype files.
Sorry bout that.
If anyone have any ideas I would be most relieved as this is supposed to go live shortly and I've been staring into the screen for far too long to see what I'm missing.
-m
View Replies !
View Related
Effect Is Killing Me
http://www.10061.com/10061.php#/art
this "flap" (dunno what to call it) effect has really gotten to my head. I even dream about it, but I cant figgure out how to make it!! Can someone please show me or give me a hint or anything. Would really be sooo nice!
Regards // Chris
View Replies !
View Related
This Is Killing Me...please Help AttachMovie()..etc.
Ok, I have a site with a main index.swf file.
ALL this SWF does is to create an empty movie clip and load my main movie into it.
My main movie contains the basic set up for the site: Some graphics, navigation bar with butttons, email list registration, etc. This movies library also contains the movie clips that will load when each button is clicked. The movie clips are exporting properly, etc.
My main problem is this:
1. I attached this actionscript to each button to get the movie clips in the library onto the stage when the buttons are clicked.
on (Release){
attachMovie("clipName", "instanceName which is same as clip name", depth - 3 for now);
instanceName._x=value;
instanceName._y=value;
}
THAT WORKS.
2. In each movie clip there is a "home button" on a layer with some actionscrip attached to it. I need to have the movie clip play out the rest of the movie (basically the close animation) and then load the home page movie clip in place of the current sections movie clip. To do this, I placed actionscript at the end of each section' movie clip to reload in the home page section using attachMovie.
This is the action script:
stop(); - to stop the movie from replaying again
attachMovie("name", "name", depth);
name._x = value;
name._y = value;
THIS IS THE PROBLEM:
1. Why aren't my x and y values being passed when I attachMovie this time. They work when the button is clicked and loads the section movie clip, but not when this actionscipt is called.
I have been working on this, as well as two other problems for the past three days, and I'm dying. Please, if anyone knows anything, let me know. This is the main problem with this site. And I can't get it to work. My brain is fried from reading tutorial after tutorial and not one has touched on this problem. Thanks.
View Replies !
View Related
|