Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Some.swf?parameter=true (does It Work?)



I tried and didn't succeded... Could the variables be posted into Flash aplication this way?

some.swf?parameter=true

Can it be done:

1) From .swf application? (eg. link inside .swf calls the same .swf but with parameter fullScreen=true. The parameter is then checked inside Flash and the fullScreen button is no longer visible)

2) From HTML?

Thanx!



KirupaForum > Flash > Flash 8 (and earlier) > Flash MX
Posted on: 02-13-2004, 06:55 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Some.swf?parameter=true (does It Work?)
I tried and didn't succeded... Could the variables be posted into Flash aplication this way?

some.swf?parameter=true

Can it be done:

1) From .swf application? (eg. link inside .swf calls the same .swf but with parameter fullScreen=true. The parameter is then checked inside Flash and the fullScreen button is no longer visible)

2) From HTML?

Thanx!

Evals True But Still Does Not Work
here is the code I have. I have tried this in many different configurations with the same result. The statement will evaluate true but only display the text of the else statement. I have traced the variables, they all return proper values. I am soo lost.

chosenson


on (press) {
user = new Array("harry", "karen", "mine");
passes = new Array("mine", "hers", "too");
logged = new Array(_root.login.text);
passed = new Array(_root.pass.text);
i = 0;
while (i<user.length) {
equaled = ((user[i] == logged[0]) && (passes[i] == passed[0]));
if (equaled) {
gotoAndPlay("userCalendar", 1);
} else {
_root.message.text = "Username or Password invalid. Please try again. If you feel you are recieving this message in error, contact the webmaster";
}
i++;
}
}

[F8] This._lockroot=true; WON't Work
Hi,

I'm trying to lock the root of an mp3Player.swf that I load into a mc. The Mp3Player works good when its byItself, but when I add it to my Movie the button won't work.


N E suggestions?

Why _visible=true Does Not Work?
I have an horizontal sliding mc.When the target position is reached, I set the buttons to _visible=false, they are no more useful because the end of slider is reached.But then I want to set them to _visible=true when the slider changes the position back.
Everything works except _visible=true.
Can someone tell me why?


PHP Code:



import mx.transitions.Tween;
import mx.transitions.easing.*;
new Tween(mc, "_x", Bounce.easeOut, 1151, 0, 1, true);  
var target = 0;  
next.onRelease = function() {  
    target -= 770;  
    new Tween(mc, "_x", Strong.easeInOut, mc._x, target, 1, true);  
    if (target == -770) {  
        this._visible = false;
        trace(target)
    } else {  
        this._visible = true;  
    }  
};
prev.onRelease = function() {  
    target += 770;  
    new Tween(mc, "_x", Strong.easeInOut, mc._x, target, 1, true);  
    if (target == 0) {  
        this._visible = false;
                          trace(target)
    } else {  
        this._visible = true;  
    }  
}; 

If(true){ Doesnt Work?
I have a game, and I want it to be pausable, so I put all of the game's code into an if statement, and I noticed it malfunctioned. I then changed the if statement to if(true){ yet the code still didn't work properly. Putting code within if(true){ should be the same as not putting it in, yet the code acts differently! Does anyone know why?

SetRendererStyle() -> 3rd Parameter Don't Work
Hello,
i am trying to get more information about the third parameter of the setRendererStyle()-Method:

public function setRendererStyle(name:String, style:Object, column:uint = 0):void


I thought i can format my DataGrid-Coloums with several TextFormat-Instances, like:

Code:
dataGrid.setRendererStyle("textFormat", tfOne,0);
dataGrid.setRendererStyle("textFormat", tfTwo, 1);
dataGrid.setRendererStyle("textFormat", tfSomething, 2);
dont't work

Can you post Example's to format the DataGrid-Columbs with more then one TextFormat-Instances ?

Thank for reading, please help me...
Thomas

How Do True/false Variables Work In As3?
Hello,

How do variables true/false custom variables work in flash?

For example, what I want to do is create a simple true=false variable that I can call on an if statement later.

For example:


Code:
Var1 = true;

if (!Var1)
{
Do this;
}
else
{
Do that;
}
I noticed that neither the "Var1 = true;" part or the if(!Var1) part worked in flash. I saw them somewhere as I was researching other stuff, but can't find an example anymore. Any help?

Thanks!

ForceSmoothing=true Does Not Work In Browser, As2
Hi all, i hope some of you could help me.

Im using moviecliploader and on loadInit event im setting forceSmoothing=true.
This seems to work as long as i keep wathing the movie by hitting +enter but as soon i watch the swf in browser the smoothiness is all gone. Also, shwn i trace the forceSmoothing property of the MC, it returns undefined.


Code:
public function loadBitmapSmoothed(url:String, target:MovieClip) {

var listener:Object = new Object();

listener.onLoadInit = function(mc:MovieClip) {

mc.forceSmoothing = true;

};


var loader:MovieClipLoader = new MovieClipLoader();
loader.addListener(listener);
loader.loadClip(url,target);
}
I am using that inside a class where i generate thumbnails.

Someone pls?

System.usecodepage=true; Doesn't Work
Hi All,

I've visited here: http://www.kirupa.com/developer/mx/i...characters.htm but I still find that some characters (mostly capital letters and html formatted items) don't appear in my dynamic text fields.

Text is loaded from a txt file into a text field with characters embedded (the first four options - which includes capitals) but I'm getting weird results.

See here: http://www.thepaddingtonbeautyroom.c...ting/tpbr.html

Thanks
C

System.usecodepage=true; Doesn't Work
Hi All,

I've visited here: http://www.kirupa.com/developer/mx/i...characters.htm but I still find that some characters (mostly capital letters and html formatted items) don't appear in my dynamic text fields.

Text is loaded from a txt file into a text field with characters embedded (the first four options - which includes capitals) but I'm getting weird results.

See here: http://www.thepaddingtonbeautyroom.c...ting/tpbr.html

Thanks
C

Flash Mx Trial Files Won't Work In True Version
gahh...

shiver me timbers...

i saved some files in the trial version of mx
and i tried to re-open them... but the stinking thing comes up blank.... no library files or nothing
but it's still saying that the file size is correct
if ya see what i mean

help me

TextArea Editable - False/true ... Doesn't Work
well, either setting the textArea component manually to 'false' on the editable part of the parameters ... OR doing it via actionscript as the help files says:
code:
myTextArea.editable = false;


Both of these method's do NOT work ... as far as I've tested. Am I isolated? Or does MM know about it?

Thanks

Duplicated Button Not Work & Sending Parameter To Other Frame..please HELP
dear all,
i've button the instance name is "btn_more". i want to loading text n image from database, then with the button "btn_more" i want to click detail for each rows. because of this, i using duplicateMovieClip to duplicate my button. and give it action to enter a frame..

this is my code:

for (i=0; i<5; i++) {
//duplicate button

duplicateMovieClip(_root.main.btn_more, "btn_more" add i, depth);
setProperty("_root.main.btn_more" add i, _y, yposition+30);
_root["main.btn_more"+i].onRelease = function() { gotoAndPlay ("test1");};
depth--;

// Set the y position plus 30
yposition = yposition+120;
}

the duplicated button (ex 5 button) wa appear but they cannot show up like a button ( cannot mouseover, or onrelease).

and how to send parameter to frame "test1" with the variable from the database, example
if i click the button "btn_more1" (result of looping above), then will execute the frame "test1" that contain script to call an ASP file :

//script in frame test1
loadVariablesNum("DetailVilla.asp?id=" add i, 0);

parameter i in this script are take from those looping above.

please help...it would be many thanks if anyone can help me...please....

thank you
ika

Is It Really True That The "embedFonts" Doen't Work ?
Hello

I'm trying to embed the font I use in a created textfield.
My code looks like this:
code:
_root.createTextField("myOutputText",1,0,0,300,100 );
myOutputText.type = "input";
myOutputText.border = true;
myOutputText.embedFonts = true;
trace (myOutputText.embedFonts);
myOutputText.text = "abcdefg";

var myformat = new TextFormat();
myformat.color = 0x000000;
myformat.font = "verdana";

myOutputText.setTextFormat(myformat);


The trace says true, when I preview my movie. But the text dissapears. There's nothing to be seen. I've looked through this board and it seems like a lot of people has experienced this. But I haven't been able to find a solution.

Any ideas??

Regards
Michael

TabChildren = False; --> TabChildren = True; Doesn't Work
i have a check box, that blacks out some textfields/enables the textfields.

when its clicked off

"tabChildren = false" gets called and it works, the textfields don't get tabbed through.

the problem is that i try to call "tabChildren = true" to re-enable the textfields but they dont get enabled.

Styling Components: _global.styles.Label.setStyle("autoSize", "true"); Does Not Work
According to the Flash 8 Actionscript Bible, it is possible to set a style that will affect all instances of a certain component class by typing the following code:
ActionScript Code:
import mx.controls.*;
import mx.styles.CSSStyleDeclaration;
_global.styles.componentClassName = new CSSStyleDeclaration();
_global.styles.componentClassName.setStyle("styleAttribute", "value");



A disclaimer says that "[this style technique] will work with almost all of the component classes. However, the following classes will not allow you to set a class style object: List, DataGrid, Tree, and Menu." (ch 29, pg 644)

So why does the following do nothing:
_global.styles.Label = new CSSStyleDeclaration();
_global.styles.Label.setStyle("autoSize", "true");

??

If Lalala = True Goto Sing, Else If NE True, Goto Humm
ok, I asked this question about a month ago, I cant find the post though, and I want to go into a little more detail anyways. Using something like if(...) = True to verify a web page, or directory, or even a file. How do you specify that? What is the exact AS for 1. an offline file, and two, a Online Web Page. Like if http://www.dick.net/vagina.htm = True goto sex, else if ne True, goto disney.

Thanxz

(P.S. This is in no way related to my example, i was bored!)
AKA If File Exist

Is This Okay? If(btn.ROLL_OUT==true && Btn2.ROLL_OUT==true){
Is this okay?
Code:
a1.addEventListener(MouseEvent.MOUSE_OVER, mouseOutHandler);
a2.addEventListener(MouseEvent.MOUSE_OVER, mouseOutHandler);

function mouseOutHandler(event:MouseEvent):void {
if(a1.ROLL_OUT==true && a2.ROLL_OUT==true){
gotoAndStop(1);
}
}

Is It True That...
Is it true that my swf is bigger if i do it frame by frame than it is when I use tweeing? if that's the case I've got another question: why?
//RAW

Can This Be True? A Bug?
I am working on a flash website and i just discovered what i think is a bug.
I have some symbols which i'm putting on the page when user clicks on an icon. It's a page for a hairdresser and on the last icon always the hair miraculousely disappiers. Just the hair, nothing else. I tryed with moving layers (changing order) with breaking things apart... nothing helped. And then at one point it started to work. Juhu! i said.
But i was pissed off again when i discovered that now the third icon is not working. I used the same tactic and it started to work - and again the fourth icon is not displayed correctly.

If you want you can mail me and i'll send you the fla (52kb).


Please help me if you know how!

Lenart

***** IS THIS TRUE? OMG
I wonder if this true, does masking slow down flash rendering time and by how much? Is it significant?

I am making a Flash operating system (yeah in flash), so lets say i made a component that interacts like a windows "window". Everything is great except the content of the window overlays the window itself and does not stay inside the window, it overlaps the edges of the window. So i am thinking to apply a mask to the window in order to keep the conent "inside the window", the only problem that i know of is that dynamic text does not show up through masking but i am not sure how or by how much it affects my performance.

Is This True?
i heard that browsers are being equipped with flash plugin
has anyone else heard this

That's True
I agree 100%. Flash lets you do things HTML will never allow you to do and in much less time HTML could ever hope to. It's just a matter of time before rich content takes over.

Why Is IF Always True?
Hi there. I have a movie clip with four labeled frames: up, down, over, and active. I'm using it as a button using on(rollover), etc., and am trying to have it be in its "active" state when appearing on certain pages. I am using FlashVars to send a variable to the SWF that should tell it when to use the active state.

Here's the code I have attached to the movie clip instance (mcWriting):

onClipEvent (load) {
if (section == "w") {
_root.mcWriting.gotoAndStop("active");
} else {
_root.mcWriting.gotoandstop("up");
}
}

Now here's my problem... It always executes the code as if the IF clause is true. I have a variable text field on the page to make sure the right value is being passed to the "section" variable, I have tried using numbers and characters as the passed value (i.e. using 1 in place of the "w" above), and I have tried telling it to go to "up" first, then have the if statement without an else. I have tried different ways of structuring it, using ==, then != and swapping the results, etc... No luck.

No matter what I do, or what I set section equal to, it always behaves as if the IF condition were true -- executing the code in the {}s after it...

All the rollover code (sample below) works fine, so it doesn't seem to be a level issue...

on (rollOver) {
_root.mcWriting.gotoAndStop("over");
}

I'm sure I'm missing something stupid. I am a newbie, who's learned just enough from these forums to be dangerous.

Thanks for the help!

ADAM

Is It True?
:::
Loader.loadClip("file.swf", Container);
:::


How do you pass variables using loadClip?! is it true that it's not possible? That can't be...

So Is It True Then....
Is it true that when duplicating a movieclip that has a dynamicly loaded image, the image will not duplicate?
This is what is happening to me, and from what I have read, it is a lost cause.
Please tell me it isn't so, and how to fix it...

I have no hair left...

True Zero?
On flash movies that are scaled to 100% I usually create 2 variables called trueZeroX and trueZeroY. These variables hold the _x and _y values which visually represent 0,0 once the stage is scaled and I calculate them by hardcoding the stage's initial width and height:


ActionScript Code:
var trueZeroX:Number = -(Stage.width-initialWidth)/2;var trueZeroY:Number = -(Stage.height-initialHeight)/2;


Is this logical? I mean it works, but is there a better way to get the new 0,0 without having to hardcode in the initialWidth and initialHeight.

Cheers,
ghjr

Is It True You Can't Put AS On MC's In AS 3.0?
Hey! So I heard that in Flash 9, with AS 3.0, you can't attach code to an MC, but rather all the code would be in one place. Is that true?

And if so, what's done to work around that? Like, if you were to have a hundred duplicates of an MC scattered around on the stage that you would want to behave the same, would they all have to have different instance names and then use a loop to control all of them?

Or is this just totally bogus? X)

Get Parameter
Please...anyone who know how can I capture a parameter from the browser? Exp : <param name = variable1 value = "testing
" >
[Edited by lms11 on 11-28-2001 at 09:25 PM]

Parameter
please, i'm new at flash developing and need some help.
i'm using f5 and want to pass a variable from one flash file to another and read this, checking its value. thanks anyway...

Parameter
Hello!

I've just started to work with flash (MX) and I wonder...
How is it with parameters in flash.

If I have four scenes: start,intro,pictures,and music.

When a new visitor enter the site for the first time then I want to have an intro on every page. I have declared a boolean "introfirst=true" ---> if(introfirst){I play my intro and then setting the introfirst-parameter to false, which means next time the visitor click on the link to current page s/he wont to have to se the intro again}

What I've done is at the beginning (my startscene) I declare/set attribute to all my booleans which controlls if the visitor have entered my 4 pages. And then I change their attribute when entering current page. E.g I enter music I see the intro and the parameter "musicfirst" is set false.
But that doesn't work.

To my question is it like in java that the parameters both can be global and local. Shall I print start.introfirst or what shall i print ????

I hope you understand what I mean.

Thanks for helping me /M8M8

Get Parameter From Url
my url is http://www.somesite.com/default.html?someparameter=x1

i need the parameter 'someparameter' from the url for my action-script.

how can i get the parameter?

thanks.

Capslock = True? Or No?
Im making a crossword puzzle.
when making an input field. how cani automatically set capslock to ON...so all the text is UPPERCASE? or how can a letter equal A or a

True Or False (help)
Well it's been one of those days whe you learn somthing new and you say hey this is neat, then you go to save and what happens the Fu**ing comp crashes and can i figure out how i got it to work first time :( PISSED OFF :(

here we go, i will try explain this best i can.

on the first key frame of the movie i have this
dismain = false;
discon = false;
disgb = false;
dischat = false;
dischart = false;
dislink = false;

The dis"" is the name of the mc's that r going to be displying the information.
inside each of the mc's first frame i have a mc for clipevents. this has
onClipEvent (enterFrame) {
if (_root.dismain==true) {
_root.dismain.gotoAndPlay("dismain_on");
}
}
i know that this code is not complete becuase i need to and an if statement to check and see if it is false as well (if someone can tell me how to do this cheers). The second frame has a gotoAndPlay(1) 1 being were the clip is checking for true or false.

Now i have a button that triggers dismain to be true.

on (release) {
gotoAndPlay ("unload_signin");
_root.dismain = true;
}


I think thats about it. So can someone see were iam going wrong.
Sample movie
http://ecosse-web.com/~activefm/active/activemain.swf
i am looking to control when the diplay mc plays with true or false.

Does everybody follow me.

cheers

If (mousedown = True) {
is someone able to help me out with the following problem:

i am creating a record on a turntable as a navigation menu for a website so that when the record is turned at different angles (it follows the mouse) you click and go to that angles respective page, as far as i know you can only make the record turn if it is a movie clip, but if it is a movie clip i cant use on (mousedown) so instead i am using if (mouseDown = true) here is some of my code:

a2 = record2._y-_ymouse;
b2 = record2._x-_xmouse;
angleB = Math.atan2(a2, b2);
degrees2 = angleB/(Math.pi/180);
setProperty ("record2", _rotation, degrees2);

deg2 = getProperty ("record2", _rotation )
if ((deg2 > 0)&&(deg2 < 90)) {
setProperty ("equip2", _visible, true);
if (mouseDown = true){
getURL ('news_equ.asp', _self);
}
}else{
setProperty ("equip2", _visible, false);
}

if ((deg2 > 91)&&(deg2 < 180)) {
setProperty ("records2", _visible, true);
if (mouseDown = true){
getURL ('news_rec.asp', _self);
}
}else{
setProperty ("records2", _visible, false);
}
etc...

my problem is as soon as the mouse enters the screen it instantly opens all the links, is anyone able to tell me why or if there is another way i can catch clicks over a MC given the mouse is between certain angles of that MC?

True Zoom
Can anyone help

I have made a map that can be zoomed in on using _scale. I want now to be able to focus on a particular point on the map when zoming in. The mc parent is in the centre of the clip so if its focusing on a part other than the parent, the position changes as it grows bigger.

Fullscreen, True?
I'm using fscommand ("fullscreen", "true"); in my standalone projector and I've set the stage of my movie to be an easy ratio of the monitor resolution (ie. 800x600).
When the projector runs on a Mac, there's about a 20px border on the top and bottom of the screen but it does fill the screen from left to right.
What's with that border? How can I get rid of that? The contents of my movie fits perfectly within the stage. I can't figure out why it's not filling the screen vertically.
Thanks.

True Or False?
hi guys,

i am trying to "trap" the value of a checkbox. (true or false)

i know the value is changing, as i have used the debugger and it works fine, i.e. it changes the value as it should.

i now want to use that value to validate a form. here is my code for the submit button

----------------------------------------------
on (release) {
if (termsread != "true") {
gotoAndPlay("tickerror");
stop();
} else {
gotoAndPlay("truetest");
}
}
----------------------------------------------

termsread is changing from true to false correctly. but it always goes to the tickerror frame and never to the truetest frame!!

any ideas?

gary

[simple]if(abc || Abc==true)
Hi, would you know what's the meaning of following syntaxs?
1. if(!abc)
2. if(abc == true)
3. if(abc == false)
4. var abc=true
5. var abc=false
Thanks in advance!

HELP. Can't Get True Gradient
If someone can help me...
I have a bird flying with a trail behind it. I put a gradient mask over the trail (following the bird) so it looks like it trail fades slowly. Seems easy, right? Well, the graident is 0% Alpha on the left of the box and the same color as the sky on the right.
HOWEVER, there is a band of white between the )% Alpha and the Blue. I CAN'T get rid of it. Has anyone ever heard of this or am I doing something wrong?
Please help, Thanks so much...

If Html Is True. . ..
My variable ("index") is a text box in which I want the text to be read as HTML.

Question: Why can't I display images within the HTML code embeded? Is there a way I can display images within the HTML code? Are there only certain TAGS that flash reads when rendering HTML code?


When I use img src="http://www.domain.com/images/corectlocation.gif" I get a blank spot in the display where it would go. . .not a RED X, but nothing, nodda, zillch.



Thank you for reading this far!

AttachMovie = True?
in an if statement i am wanting to check to see whether a mc is attached? like.
if ((Math.floor(_root.bgClip._x))==1604 && (_root.bdudeStage.AttachMovie) == True)

i dont think that is the proper syntax.
can someone tell me how to check if a mc has been attached and use it as a condition?

thanks
c

True/False
Is there a way to do a trufalse against an array of numbers, as opposed to doing,


Code:
if ((x = 1) or (x = 2) or (x = 3) or (x = 4)){}

Visible=true
hey guys,

i want to make it so when you move your cursor over my button, all of a sudden a movieclip appears. and when you move off it goes black again. what's the code for this? it's something liek this isn't it

on (rollOver) {
visible=true;
}

can you give me the full code?

Ugh.. How Can This Be True? Var Checking.
This is buggin me pretty bad.

I have 2 textboxes, one named "answer1" and the other "answer2". In the timeline is this code:
code:
stop();
//
q1 = new Object();
q1.question = "What is 3+5?";
q1.correctAnswer = "8";
q1.answer1 = "6";

//
_level0.question.text = q1.question;
_level0.answer1.text = q1.correctAnswer;
_level0.answer2.text = q1.answer1;

On buttons next to 'answer1' and 'answer2' I have this, respectively.
code: onClipEvent (load) {
var textbox = _level0.answer1.text
onRelease();
}
on (release) {
trace(textbox)
if (textbox.text == q1.correctAnswer) {
trace("Score + 1");
} else {
trace("Incorrect");
}
}

//
// Button 2:
//

onClipEvent (load) {
var textbox = _level0.answer2.text
onRelease();
}
on (release) {
trace(textbox)
if (textbox.text === q1.correctAnswer) {
trace("Score + 1");
} else {
trace("Incorrect");
}
}

And they both return true. HOW?! Ugh.

This is pretty urgent, so please and thanks.

Not When ONLY BOTH Conditions Are True?
Hey,
I was wondering if the folowing is possible with just a normal if-action:

Code:
1. if(Key.isDown(Key.SPACE)){
2. if(varOne == 4 && varTwo == 6){
3. } else {
4. //--Perform code---
5. }
6. }
As you can see, in line 2, I'mn first testing if both conditions are true. If this is the case it does nothing. When one of the conditions is false it will execute the code starting at line 4.

Why don't you just use an != (not equal) you're thinking? Well, this is why:

Code:
1. if(Key.isDown(Key.SPACE)){
2. if(varOne != 4 && varTwo != 6){
3. //--Perform code---
4. }
5. }
This will ONLY perform the code when BOTH conditions are true. But I want to execute the code when ONE or NONE are true.

So, now my question, is there a code that can fix this?

Hittest Is Always True
Hi, I am not making anything, I am just trying to learn about hittest.
In my file I have a ball moving down and a square moving right. I have a text box, with code for it in a frame:

if (_root.ball, hitTest(_root.square)) {
hityo.text = "ball intersects square";
} else {
hityo.text = "ball doesn't intesect square";
}

It always evaluates to true. I even am using the code directly out of "reference" so help me.

WTF!

Visible = True; ?
HI

I have a movie clip with instance name of newsBox and i'm trying to make it invisible in action script. and i have no idea if i'm doing this right.

_root.newsBox.visible = false; ??? is this right ? if not can somebody tell me how to make a MC invisible ?

thank you

True,false.
I want to make an advanced shooter game.I made one before in which there is a black point appearing when you shot(thehole of the bulet).
I don't like 'buttons shooters'where you just press on heads.
The code for the appering bullet:

Code:
onClipEvent (mouseDown){ _root.blood.duplicateMovieClip("bulletNew", i);
if (i == 10) {
i = 0;}}
Now,I want to make that when you shoot on a bad guy,a blood MC appears just like the bullet but does not appear when you shoot at a wall...I tried to use true and false.
This is the code I used:

Code:
"shoot",false
if (_root.crosshair.hitTest(_root.ds)){"shoot"==true;}
And in the crosshair:

Code:
onClipEvent(enterFrame){if("shoot"==true ){
onClipEvent (mouseDown){ _root.blood.duplicateMovieClip("bulletNew", i);
if (i == 10) {
i = 0;}}
}}
I know it doesn't work...I can't put a movie clip into another one. Help!

Copyright © 2005-08 www.BigResource.com, All rights reserved