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




[F8] I Started Exporting To Flash8 Instead F8 And My Loader Quit Working With Vars



I am using a loader component. I was setting the ContentPath parameter to a variable on the first frame of the timeline containing this component by using:

Quote:




tstone30.ContentPath=_root.page3_tphoto30;




However, I decided I wanted to take advantage of the justify feature for my dynamic text fields and began exporting to Flash 8 instead of Flash 6. For some reason, my loader quit pulling the images into the loader. If I switch back to Flash 6 it works again. Any ideas cause this is driving me crazy?



FlashKit > Flash Help > Flash ActionScript
Posted on: 11-07-2007, 12:31 AM


View Complete Forum Thread with Replies

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

I Started Exporting To Flash 8 Instead Of Flash 6 And My Loader Quit Working
I am using a loader component which I named tstone. I was setting the ContentPath to a variable on the first frame of the timeline containing this component by using:

tstone30.ContentPath=_root.page3_tphoto30;


However, I decided I wanted to take advantage of the justify feature for my dynamic text fields and began exporting to Flash 8 instead of Flash 6. For some reason, my loader quit pulling the images into the loader. If I switch back to Flash 6 it works again. Any ideas cause this is driving me crazy?

Newbie Getting Started With Vars And Functions
Hi all,

I am on day two of learning flash. I am not trying to convert an old flash file and try and get it to be more dynamic by using ActionScript. Here is what I am trying to do:

Have objects from the library loaded onto the timeline using AS. I have given these objects an instance name via the linkage dialog box. What I am trying to do is create a variable to hold details of what button a user has pressed, then, create a function that acts upon this variable and outputs the relevent page. The variable will initially be set to home so that it can display the home menu, then change to store any section that a user navigates to. I think I need to create a callback for all the buttons, however, I thought the below code would initially display the home menu since the variable had initially been set to home, nothing displays, here is the code:


Code:
//creates a variable to store the currently active menu
storepage = home;

// creates a function that tell flash which menu to show
loadnav = function (storepage) {
if (storepage = "modeling") {
nav_modeling = this.attachMovie("nav_modeling", "nav_modeling_mc","0",{_x:25, _y:108.8});
}

else if (storepage = home) {
nav_home = this.attachMovie("nav_home", "nav_home_mc","0",{_x:25, _y:108.8});
}
}

How To Know If A Loader Started?
i got this:

ActionScript Code:
var urlR:URLRequest = new URLRequest("image.jpg");
var loadr:Loader = new Loader();
var fSize:Number=0;

loadr.load(urlR);
fSize=loadr.contentLoaderInfo.bytesTotal;//i should do this after an event
trace(fSize);

and i get the file size = 0.. i expect that cuz i know the file didnt start to load and the file proprieties arent available.. is there an event that shows that the contentLoaderInfo properties are available?

Linkage Properties: Or How My Pre-Loader Quit
Ever since Flash MX came on the scene I've had a disturbing problem using pre-loaders with flash movies that use assets linked from the library.

I have a very simple pre-loader movieclip that sits on frame 1 of my movie; but my pre-loader doesn't even show up until the linked objects completely loads.

I think I've read somewhere that Flash preloads linked objects before frame 1. I know that is true for sound objects. So naturally if your pre-loader functionality occurs on frame 1 it can't even begin to play until the sound files have completely loaded.

I believe the same is true for movie clips dynamically inserted into the timeline with actionscript. They load before frame 1 so again my pre-loader is useless until such time as all the assets I happen to have linked in the library load.

Somewhere I read that simply by unchecking the box in the Linkage Properties that reads "Export in first frame" that my pre-loader will work.

I've tried that and while my pre-loader does work the library files I have linked do not work anymore.

Exporting your pre-loader in frame 1 and inserting it onto the stage with actionscript doesn't work either. I think sound objects precede movie clips in the order of precedence.

This is most troubling and any help would be greatly appreciated.

ScrollPane In Flash8 Not Working Quite Right Flash8
http://www.karaedwardsvo.com

When you click on either "about" or "clients" it takes you down the timeline to a ScollPane that is set to load an external swf (with a tranparent background if that makes a difference). This works fine for me 100% of the time on my Mac but have had a couple, including the client, who say the in IE on a PC the scroll bar doesn't appear and the swf shows up low on the screen. Anyone have any thoughts on this?

Changing True.false Vars...(flash8)
here is my code:

_root.rfast = false;

rocklee.onEnterFrame = function() {

if(_root.rfast == false) {
moveSpeed = 5;
}
if(_root.rfast ==true) {
moveSpeed = 8;
}
if(Key.isDown(Key.RIGHT)) {
this._x += moveSpeed;
dir = "right"
this.gotoAndStop(2);
this._xscale = 100;
}
else if(Key.isDown(Key.LEFT)) {
this._x -= moveSpeed;
dir = "left"
this.gotoAndStop(2);
this._xscale = -100;
}
else if((dir == "right") && Key.isDown(Key.CONTROL)) {
this.gotoAndStop(3);
this._xscale = 100;
}
else if((dir == "left") && Key.isDown(Key.CONTROL)) {
this.gotoAndStop(3);
this._xscale = -100;
}
}


i need to know where i need to state that the variable "rfast" is true. what i want is to make it so when i play a certain animation, the char. gets faster. the way i set it up is, the char. is a MC on the 1st frame, inside that is a few more frames, which are MC's that hold the animation. let me know if thats confusing, cause im a little confused and im writing it.

[Flash8]How Can I Use A Linked Object Without Exporting In First Frame?
How can I use a linked object without exporting it in the first frame? I'm asking that because I don't want to put an aditional load on the beggining of the loading progress...

OnEnterFrame And Clip Container Vars Within Class Definitions, Flash8
Hi there,

Let's say I want to use a class to move a movieclip, "A", in an fla file. Within my class definition, when I reference the clip directly like this:
code:
class moveElephant{

public function moveElephant(clip:Movieclip):Void{
clip.onEnterFrame=function(){
clip._x+=10;
}
}
}

and then create a new moveElephant object instance inside my .fla and pass movieclip "A" to it:

var moveIt:moveElephant= new moveElephant(A);

it works!

However, if instead I store the passed clip from my fla in a variable inside moveElephant:
code:
class moveElephant{

public var movie:MovieClip;

public function moveElephant(clip:Movieclip):Void{
movie=clip;
trace(movie);
movie.onEnterFrame=function(){
movie._x+=10;
}
}
}

it won't work! Note that the trace() action works-- the output window does display "_level0.A", but for some reason the onEnterFrame action does not affect it. Neither does setInterval.
Can anyone tell me why, and a way to animate movieclips stored in class variables?

Thanks!

Optimaze Quit Working?
Does anyone have optimaze? I have it and usd it about a month ago. Now all of the suden it stopped working. When I click on the optimaze.exe, nothing happens. Any Ideas here?

Thanks in advance

Net Debugger Has Quit Working
Hello Everyone!

I am building a Flash Pro forms application that uses Flash Remoting. All of my AS2 code is contained within external classes.

I've been using the net debugger for the last 2 months with no problems whatsoever. Yesterday, I opened net debugger, and the debugger no longer works -- the debugger window opens, but it now has no content whatsoever! The app works fine, flash remoting is working beautifully with the app server, but I no longer receive ANY trace statements, or other messages within the debugger!

I haven't changed my code -- I'm still calling the NetDebug.initialize() method to initialize the net debugger -- call is made when the form first loads. None of the code has changed at all.

Anybody else have this problem? If so, do you know how to fix it (short of reinstalling Flash Pro 2004 I mean)?

Thanks in advance,
CatDogCat

Net Debugger Has Quit Working
Hello Everyone!

I am building a Flash Pro forms application that uses Flash Remoting. All of my AS2 code is contained within external classes.

I've been using the net debugger for the last 2 months with no problems whatsoever. Yesterday, I opened net debugger, and the debugger no longer works -- the debugger window opens, but it now has no content whatsoever! The app works fine, flash remoting is working beautifully with the app server, but I no longer receive ANY trace statements, or other messages within the debugger!

I haven't changed my code -- I'm still calling the NetDebug.initialize() method to initialize the net debugger -- call is made when the form first loads. None of the code has changed at all.

Anybody else have this problem? If so, do you know how to fix it (short of reinstalling Flash Pro 2004 I mean)?

Thanks in advance,
CatDogCat

Buttons Quit Working On IE And Firefox
Ok, so I designed this website like 2 years ago for my friends band.

http://www.theoutline.net

Everything works and looks great on firefox and safari on a mac. No problems.

Then you look at it on a pc in firefox or IE and none of the buttons work except for the message board which I was going to get rid of cause of all the spam.

So, I have the flash being displayed with swfobject 1.0.
The buttons are just really simple rollovers with behaviors so they go to the direct link and I made them in flash 8 with actionscript 2.0.

So why is this happening all of a sudden?

Instance Names Quit Working
Here's a weird one. Maybe someone out there knows what going on.

The last two weeks or so, some instance names just randomly quit working. Once changed to something else, they work fine again.

For example: I've been making multiple drag and drop activities lately. They all use the same exact AS code, instance names, etc. The only difference is the content of the draggables. Out of nowhere, one draggable will quit working. All the others still work fine. If I change the instance name from say "b_btn" to "b_btnn" and change any reference to that name in the AS, the file works fine again.

This has happened several time in the last few weeks, with different files, different AS. In all cases, I'll have one version of the file that still works, and one that doesn't. I'm running Flash MX on a Mac 10.3. I've tried opening the files in MX 2004 and the same thing happens.

Any ideas?

Animation Quit Working With New Player
I made a cartoon face that the mouth moves when you speak into the microphone. I made it with MX. When I revisited it with flash 8 it dosen't work. There is a movie called mouth(has stop in 1st frame) inside the object called head on the root timeline.
When I open the animation the mouth plays all the time, even with no microphone. Here is my code that is on the 1st frame of the root timeline...
Code:

var active_mic:Microphone = Microphone.get();
_root.head.mouth.attachAudio(active_mic);

_root.head.mouth.onEnterFrame = function() {

   var level = active_mic.activityLevel;
   
   if (level>=60) {
      _root.head.mouth.play();
   
   }
   else{stop();
   }

};

Can anyone help me....thanx wo

Loader + Navigation Hell Flash8
Could someone please help me with this.
After working on this for far too long, rebuilding about 5 times in many different ways (still not sure if the structure is correct), I can no longer think straight enough to finish this stage.

I have 7 swfs each has an “in” and an “out”.
If one.swf is in the current frame and I press btn4
I want one.swf to play it’s “out” and then goto four.swf

download hinksta.rar

Global Function For Button...something Not Working Quit Right....
OK. I have a movie with 7 scenes. The issue I am having is that a button, contained within a movie clip in one scene (scene X) will not allow users to access any other scene.

On click, it should go from scene X to scene Y, but I am not able to get this to work if the button is contained within a movie clip.

The code is as follows:

on (release) {
gotoAndPlay("scene Y", 1);
}

Any assistance would be much appreciated.

Shortcut Keys Quit Working Periodically
I open up Flash and everything works fine, then after a few minutes (not noticeably related to any certain activity) the shortcut, or "hot", keys just quit working and I have to manually select tools from the tools panel. If I close Flash and reopen it, the hot keys work again, but the problem comes back after working for a while. It's a killer on my productivity.

If it helps I work on a PowerMac G5 running Mac OS X v10.5.5 w/ a Dual 2GHz PowerPC processor and I'm running CS3.

Styled Text Area Quit Working?
I created an entire web site using the attached code to scores of Text Area Components (originally in Flash 8 using AS 2.0 and saved for Flash Player 8 delivery). This code was placed on the frames in which the various Text Area Components resided. Only the Instance Names were changed (both on the component and in the AS for that frame). The sample code I am attaching is one such example of the frame code for a Text Area Component with an Instance Name of "MeetConnallyText".

This was working perfectly online for the past 15 months. I am now using Flash CS3 on Leopard. Today I opened the Fla. for this site, just changed a graphic and the re-published the site using the same settings as always Player 8, AS 2.0, only the Color Styles and CSS Formatting vanished?

I finally replaced the Text Area Components with the ones included with CS3 and gave them matching Instance Names. The external XML Text DOES LOAD into the Text Area Component - so PART of my script appears to be working.

My problem is ALL MY CSS FORMATTING is not being recognized and the BACKGROUND COLOR for the Text Area component is also ignored>

What changed? How can I fix this - the whole site looks like crap!

Thanks for any help







Attach Code

stop();

MeetConnallyText.html = true;
MeetConnallyText.wordWrap = true;
MeetConnallyText.multiline = true;
MeetConnallyText.editable = false;
MeetConnallyText.setStyle("borderStyle","none");
loadtextStyle = new TextField.StyleSheet();
loadtextStyle.load("Connally.css");
MeetConnallyText.styleSheet = loadtextStyle;
MeetConnallyText.setStyle("backgroundColor", "0xFFFFCC");
loadtextContent = new XML();
loadtextContent.ignoreWhite = true;
loadtextContent.load("Staff/MeetConnally.xml");
loadtextContent.onLoad = function(success) {
if (success) {
MeetConnallyText.text = loadtextContent;
// loads the file into the TextArea
}
};
MeetConnallyText.vPosition = 0;

Quit Button Not Working - PDA Flash Application - Help Please
Hi all,

This might be a pretty basic question for most of you, but I need some help with it.

Basically, I have a button called quit_btn. I've applied some actionscript to it (Actionscript 1) as follows:

on(release){
fscommand ("quit");
}

When I publish and test the app, it works fine, the code closes the application.

However, when I upload the .swf file to my PDA, the quit button doesn't work. Can anyone shed some light on why it doesn't work? Is it a conflict in the code which PDA's don't understand?

The model of PDA is a HP RW6815, with the Windows Mobile operating system version 5.

Thanks all.

Trying To Load Vars Into A Text Area & Loader
So I am trying to load variables from a .php file into a movie clip and then plug in those variables to various fields and for some reason its not working...so heres whats going on...(this is for the staff page for my church) (and yes I have read the tutorials :P )

In the primary timeline we have this line...

loadVariables("./middleware/staff.php?id=" + staffID, staff_panel, "GET");

We are loading the variables into the movie clip which contains our various fields...the value for staffID is created in the previous frame when the user click on that person's icon, we know for sure that this is being passed correctly to this frame, because I have a text box in the main timeline which displays the number.

The resulting string from the .php file looks like this...

staffNameE=Jason+Webb&staffTitleE=Lead+Pastor&staffDescE=Jason's+bio+goes+here...&picLoader=./images/staff_pics/jwebb.jpg&staffEmail=webmaster@brooklife.org

Within the movie clip that the variables are being loaded into we have this....it loops till the var load is done and then writes the information to the fields...

while (L ne "stop"){
if (staffNameE ne ""){
staffName = staffNameE;
staffTitle = staffTitleE;
staffDesc.text = staffDescE;
staffPhoto.load(picLoader);
L = "stop";
}
}

So lol what am I doing wrong, it all seems right to me but I am kind of new at the flash thing...thanks for the help. :)

Eh... Why Is This Not Working In Flash8?
Hi,

can sombody please tell me why this

nice elastic buttons

is not working in flash 8?
i don't get it

thnx in advance

Dick

Basic Movie Clip Loader And Load Vars Question
Hello,

I'm a designer who knows only the most basic Action Script, so i'm muddling through a fairly big project and learning as i go. I'm using AS2, mostly, though my version of Flash is CS3 (i just don't know any AS3 at all to know where to begin, so i'm publishing all swfs with AS2).

The thing that's throwing me off is that all info in the site -- jpeg thumbnails, text labels -- need to be easily changed outside Flash. I need to use MovieClipLoaders and LoadVars to keep all text and jpeg elements as external files. The IT guy at the company i'm doing the site for needs to be able to swap out thumbnails and text info whenever he needs to update the site, and he doesn't know Flash at all.

So, the first problem is that i am loading multiple jpegs into different containers. i basically have 12 containers in one fla file. I need to keep them in separate containers because they need to animate individually. So here is the code on the first frame:


stop();

var myMCL:MovieClipLoader = new MovieClipLoader();
myMCL.addListener(this);
myMCL.loadClip("homePage/images/HPthumb1.jpg", "container1");
myMCL.loadClip("homePage/images/HPthumb2.jpg", "container2");
myMCL.loadClip("homePage/images/HPthumb3.jpg", "container3");
myMCL.loadClip("homePage/images/HPthumb4.jpg", "container4");
myMCL.loadClip("homePage/images/HPthumb5.jpg", "container5");
myMCL.loadClip("homePage/images/HPthumb6.jpg", "container6");

myMCL.loadClip("homePage/images/HPvideothumb1.jpg", "containerV1");
myMCL.loadClip("homePage/images/HPvideothumb2.jpg", "containerV2");
myMCL.loadClip("homePage/images/HPvideothumb3.jpg", "containerV3");
myMCL.loadClip("homePage/images/HPvideothumb4.jpg", "containerV4");
myMCL.loadClip("homePage/images/HPvideothumb5.jpg", "containerV5");
myMCL.loadClip("homePage/images/HPvideothumb6.jpg", "containerV6");
function onLoadInit(mc:MovieClip) { trace("content has been loaded into "+mc);

gotoAndPlay("start");


}

i just want all the MCs to load on the first frame, even if they're not visible, so i can call on them later in the movie. i also want the playhead to freeze there while everything loads and then move to my "start" label frame once ALL MCs are loaded. i added a listener to do this. BUT it seems the listener works when ANY movie clip is loaded. so it means as each one loads, the playhead goes to "start" over and over again, kind of stuttering.

Is there a way to use a Listener to listen to when ALL movie clips have finished loading, and only then go to a specific frame?

My second problem is that I have a text MC that follows the user's mouse. I would like it to load in dynamic text from an external text file. The text needs to change depending on the mouse rollover. There are 6 hit areas (thumbnails), and the text changes while it follows the mouse along the 6 hits.

so to do this i have the following script on each hit :

on (rollOver) {
this.gotoAndPlay("thumb1");
label1.menuLabel = "LABEL1";

So here, for example, the menu label, "LABEL1" is for the first thumbnail, and would change to something else when the rollover goes to another thumbnail. Each hit has its own code similar to the above.

on the scrolling text itself i have the following code:


onClipEvent (enterFrame) {
//x movement
mx=_parent._xmouse;
if (mx<_x) {
dx=_x-mx;
}
else {
dx=mx-_x;
}
moveSpeedx=dx/10;
if (mx<_x) {
_x=Math.round(_x-moveSpeedx);
}
else {
_x=Math.round(_x+moveSpeedx);
}
}

...so that the text MC follows the user's mouse.

This works fine, but it doesn't have dynamic text, because the moving text MC has to be a single MC for the effect to work. In other words, I would normally make a sequence of 6 MCs that have LoadVars and dynamic text, but I can't do that in this case. How do I load the text into one MC dynamically so that the text changes with every rollover?

I would HUGELY appreciate any help!

thanks very much!

ScrollPane Not Working Right For Some Flash8
http://www.karaedwardsvo.com

When you click on either "about" or "clients" it takes you down the timeline to a ScollPane that is set to load an external swf (with a tranparent background if that makes a difference). This works fine for me 100% of the time on my Mac but have had a couple, including the client, who say the in IE on a PC the scroll bar doesn't appear and the swf shows up low on the screen. Anyone have any thoughts on this?

Pop-up Window In Flash8 - Not Working
Hi,

I tried to make a pop-up window like at http://www.kirupa.com/developer/mx/centered_popup.htm, in Flash8 but it doesn't work. I've IE 7.0.5730.11 version, pop-ups allowed.
Pls help me to find the reason, I've done everything like in your tutorial and the fla file is attached.It's very important for me. Thx!

Zoli

ragoz@juropnet.hu

ps:I tried do more pop-up windows by other tutorials from tutorialized.com or flashkit.com (for example with JavaScript) but those didn't work too...

[flash8] ForLOOP Not Working
Im having some trouble with some code. buttons are not working.

Code:
menuLoc = new Array("menu_main", "menu_philosophy", "menu_portfolio", "menu_resume", "menu_contact");
for(i=0; i < menuLoc.length; ++i){
_level0.navMenu.menuLoc[i].onRelease = function() {
trace("hit");
}
}
the array has the instance names of the movieclips which are located in navMenu.

[Flash8]Help Needed Pop-Up & Scroll Not Working?
[Flash8]Help needed! Pop-Up & Scroll not working?

--------------------------------------------------------------------------------

Hi, there
Im new to flash, mostly in to php and html, but i want to try out new things this is more of a hobby thing.. well, let me get in to my to major problems right now..

1. I cant seem to load external txt correctly.. i cant load it with fonts only if i select "use system fonts" and when it loads my Scroll dont work, like it isnt activated.. i double checked everything, names , codes, and started from strach..
the lay out is as follows..
Main scene -----|
|
|---MovieClip 1
|
|--- then in side movie 1 i have the txt area where it needs to load the external txt..
is that a problem because i have to many movies..?

2. now for my second problem is i cant get the pop script to work..
layout same as above
Main scene -----|
|
|---Movie 1
|
|---Movie 2--button<<with script<<
so can my problem be that i have it to deep in to flash??


thanks for the help

sorry i asked 2 questions in one thread just that i didnt want to make 2 spearate threads..

Winxp_menu_004 - Don't Working On Flash8 (undefined)
I ask about help! I have problem with this script(winxp_menu_004). I have flash8 and if paste script to flash it's not working.(?)


Code:
Object.prototype.Toolbar = function() {
T_CONTAINER = _root.createEmptyMovieClip("MXToolbarContainer",1);
T_BACKGROUND = T_CONTAINER.createEmptyMovieClip("MXToolbarBackground", 1);
with (T_BACKGROUND) {
clear();
moveTo(0, 0);
beginFill(0xDEDED6, 100);
lineStyle(1, 0x888888, 100);
lineTo(Stage.width+9, 0);
lineTo(Stage.width+9, 20);
lineTo(0, 20);
lineTo(0, 0);
endFill();
}

T_CONTAINER.T_MENUITEMS = new Array();

this.buttons = 0;
}
Toolbar.prototype.displayMenu = function(Caption,T_FROM) {

T_MENUCONTENT = T_CONTAINER.T_MENUITEMS[Caption];

yLen = (T_MENUCONTENT.length)*20+4;
xLen = T_FROM._width;
xPos = T_FROM._x;


T_MENU = T_CONTAINER.createEmptyMovieClip("DropDown",1000);
T_MENU._x = xPos;
with(T_MENU) {
/* Jetzt die Schatten */
moveTo(xLen,6);
beginFill(0x000000,30);
lineStyle(0,0xDBD7D1,0);
lineTo(xLen+3,6);
lineTo(xLen+3,18);
lineTo(xLen,18);
lineTo(xLen,6);
endFill();

moveTo(xLen+151,25);
beginFill(0x000000,30);
lineStyle(0,0x000000,0);
lineTo(xLen+154,25);
lineTo(xLen+154,yLen+20);
lineTo(xLen+151,yLen+20);
lineTo(xLen+151,25);
endFill();

moveTo(7,hei+19);
beginFill(0x000000,30);
lineStyle(0,0x000000,0);
lineTo(xLen+154,yLen+19);
lineTo(xLen+154,yLen+22);
lineTo(7,yLen+22);
lineTo(7,yLen+20);
endFill();

moveTo(3,18);
beginFill(0xF8F8F7,100);
lineStyle(1,0xFFFFFF,100);
lineTo(xLen,18);
lineStyle(1,0x888888,100);
lineTo(xLen+150,18);
lineTo(xLen+150,yLen+18);
lineTo(2,yLen+18);
lineTo(2,18);
endFill();

moveTo(3,19);
beginFill(0xDBD7D1,100);
lineStyle(0,0x888888,0);
lineTo(23,19);
lineTo(23,yLen+18);
lineTo(3,yLen+18);
endFill();

moveTo(2,2);
lineStyle(1,0x888888,100);
lineTo(len+5,2);
lineStyle(1,0x888888,100);
lineTo(len+5,18);
lineStyle(1,0xFFFFFF,100);
lineTo(2,18);
lineStyle(1,0x888888,100);
lineTo(2,2);

}

pLen = T_MENU._width-3;

for(T_ITEMCOUNT=0; T_ITEMCOUNT <= T_MENUCONTENT.length-1; T_ITEMCOUNT++) {
C_ITEM = T_MENU.createEmptyMovieClip(Caption+"MenuItem"+T_ITEMCOUNT,2000+T_ITEMCOUNT);
C_ITEM._y = (T_ITEMCOUNT+1)*20;
C_ITEM._x = 0;
with(C_ITEM) {
moveTo(4,1);
beginFill(0x000000,0);
lineStyle(1,0x000000,0);
lineTo(pLen-3,1);
lineTo(pLen-3,19);
lineTo(4,19);
lineTo(4,1);
endFill();

T_TEXTFORMAT = new TextFormat();
T_TEXTFORMAT.font = "Tahoma";
T_TEXTFORMAT.size = 11;
T_TEXTFORMAT.color = 0x222222;

createTextField("TxtValue",1,25,2,pLen,18);
TxtValue.text = T_MENUCONTENT[T_ITEMCOUNT][2][1];
TxtValue.setTextFormat(T_TEXTFORMAT);
}
C_ITEM.Action = T_MENUCONTENT[T_ITEMCOUNT][2][2];
C_ITEM.Arguments = T_MENUCONTENT[T_ITEMCOUNT][2][3];

C_ITEM.onPress = function() {
_root[this.Action](this.Arguments);
T_MENU.removeMovieClip();
}

C_ITEM.onRollOver = function() {
this.clear();
this.moveTo(4,1);
this.beginFill(0xB5BDD6,100);
this.lineStyle(1,0x08216B,100);
this.lineTo(pLen-3,1);
this.lineTo(pLen-3,19);
this.lineTo(4,19);
this.lineTo(4,1);
this.endFill();
}

C_ITEM.onRollOut = function() {
this.clear();
this.moveTo(4,1);
this.beginFill(0xB5BDD6,0);
this.lineStyle(1,0x08216B,0);
this.lineTo(pLen-3,1);
this.lineTo(pLen-3,19);
this.lineTo(4,19);
this.lineTo(4,1);
this.endFill();
}
}
}
Toolbar.prototype.addMenuFolder = function(Caption) {

T_CONTAINER.T_MENUITEMS[Caption] = new Array();

T_TEXTFORMAT = new TextFormat();
T_TEXTFORMAT.font = "Tahoma";
T_TEXTFORMAT.size = 11;

T_TEXT_DIMENSION = T_TEXTFORMAT.getTextExtent(Caption);
T_TEXT_WIDTH = T_TEXT_DIMENSION.width+10;

T_BUTTON = T_CONTAINER.createEmptyMovieClip("MXToolbarMenuButton"+this.buttons,this.buttons+2);

T_BUTTON.Caption = Caption;

T_BUTTON.onRelease = function() {
this.clear();
this.moveTo(0,0);
this.beginFill(0xDBD7D1,100);
this.lineStyle(1,0x888888,100);
this.lineTo(len+5,2);
this.lineStyle(1,0x888888,100);
this.lineTo(len+5,18);
this.lineStyle(1,0xFFFFFF,100);
this.lineTo(2,18);
this.lineStyle(1,0x888888,100);
this.lineTo(2,2);
this.endFill();
if(this["DropDown"] == undefined) {
TB.displayMenu(this.Caption, this);
}
}

T_BUTTON.onRollOver = function() {
T_CONTAINER["DropDown"].removeMovieClip();
len = this._width;
this.moveTo(1,1);
this.lineStyle(1,0xFFFFFF,100);
this.lineTo(len+5,1);
this.lineStyle(1,0x444444,100);
this.lineTo(len+5,19);
this.lineTo(1,19);
this.lineStyle(1,0xFFFFFF,100);
this.lineTo(1,1);
}
T_BUTTON.onRollOut = T_BUTTON.onReleaseOutside = function() {
this.clear();
}

T_BUTTON_NAME = "Button"+this.buttons;

T_BUTTON._x = T_BUTTON_POS;

T_BUTTON.createTextField(T_BUTTON_NAME, 1, 5, 2, T_TEXT_WIDTH, 20);
T_BUTTON[T_BUTTON_NAME].text = Caption;
T_BUTTON[T_BUTTON_NAME].border = false;
T_BUTTON[T_BUTTON_NAME].selectable = false;
T_BUTTON[T_BUTTON_NAME].setTextFormat(T_TEXTFORMAT);

T_BUTTON_POS += (T_TEXT_WIDTH+5);
this.buttons++;
}

Toolbar.prototype.addMenuItem = function(Folder,ItemText,ItemAction,Icon) {

T_CONTAINER.T_MENUITEMS[Folder][T_CONTAINER.T_MENUITEMS[Folder].length]=[ItemText,ItemAction,Arguments];

}

function Click(argc) {
_root.result = argc;
}

function Goto(argc) {
getURL(argc,"_blank");
}

TB = new Toolbar();
TB.addMenuFolder("File");
TB.addMenuItem("File","Open","Click","Du Hast 'Open' geklickt");
TB.addMenuItem("File","Test","Click","Du Hast 'Test' geklickt");
TB.addMenuItem("File","Hallo","Click","Du Hast 'Hallo' geklickt");
TB.addMenuItem("File","WinXP","Click","Du Hast 'WinXP' geklickt");
TB.addMenuItem("File","FlashMX","Click","Du Hast 'FlashMX' geklickt");
TB.addMenuItem("File","Gefällts?","Click","Du Hast 'Gefällts?' geklickt");
TB.addMenuFolder("Edit");
TB.addMenuItem("Edit","Lalelu","Click","Du Hast 'Lalelu' geklickt");
TB.addMenuItem("Edit","Ein Man im Mond","Click","Du Hast 'Ein Man im Mond' geklickt");
TB.addMenuItem("Edit","Schaut Dir zu","Click","Du Hast 'Schaut Dir zu' geklickt");
TB.addMenuItem("Edit","abcefghijkl","Click","Du Hast 'abcefghijkl' geklickt");
TB.addMenuFolder("Ansicht");
TB.addMenuItem("Ansicht","MX Actionscript","Click","Du Hast 'MX Actionscript' geklickt");
TB.addMenuItem("Ansicht","Von borisp","Click","Jawohl, der war's !!");
TB.addMenuItem("Ansicht","Für das Flashforum(.de)","Click","Viel Spass damit !");
TB.addMenuFolder("About");
TB.addMenuItem("About","Der Autor","Goto","http://www.gamate.com");
TB.addMenuItem("About","Zeit?","Click","Hat mich ca. 4 Stunden gekostet :)");
TB.addMenuItem("About","Fertig?","Click","Noch nicht soooo ganz ...");
TB.addMenuItem("About","Was fehlt denn?","Click","Submenus");

FileReference Working In Flash8 IDE But Not On The Server
I use FileReference for download a file.
If I test the code than she script works fine wihout error in Flash8 IDE but not on the server.
Maybe u can explane it why. thanx

SWF Files Stopped Working Flash8
Hi,
I have uploaded my swf file to the web. It is a video clip . Some of the swf loads on the web (the text part) when I click a button, to load it, but the video does not show ? see page 2 of link below
www.geocities/suddentlyisee.com

I have load swf files with video clips before, which worked perfectly, but suddenly stopped working ?

Thanks,
Paul

[Flash8]Help Needed Pop-Up & Scroll Not Working?
Hi, there
Im new to flash, mostly in to php and html, but i want to try out new things this is more of a hobby thing.. well, let me get in to my to major problems right now..

1. I cant seem to load external txt correctly.. i cant load it with fonts only if i select "use system fonts" and when it loads my Scroll dont work, like it isnt activated.. i double checked everything, names , codes, and started from strach..
the lay out is as follows..
Main scene -----|
|
|---Movie 1
|
|---Movie 2
|
|--- then in side movie 2 i have the txt area where it needs to load the external txt..
is that a problem because i have to many movies..?

2. no for my second problem is i cant get the pop script to work..
layout same as above
Main scene -----|
|
|---Movie 1
|
|---Movie 2--button<<with script<<
so can my problem be that i have it to deep in to flash??


thanks for the help

sorry i asked 2 questions in one thread just that i didnt want to make 2 spearate threads..

[Flash8] OnRelease Not Working For CreateEmptyMovieClip
Can anyone explain to me why this code doesn’t work?

Its suppose to create a Movie called container which has a text field in it then when the container movie clip is clicked on "Goodbye World" pops up in the trace window.

So far the only thing this code does is display "Hello World" but no action is taken when it is clicked on. Why is this?


Code:
var container:MovieClip = this.createEmptyMovieClip("container", this.getNextHighestDepth());
var label:TextField = this.createTextField("label", 1, 0, 0, 150, 20);
label.text = "Hello World";
container.onRelease = clickHandler;

function clickHandler():Void {
trace("Goodbye World");
}
Thank you
Graeme

How Can I Find Out If My Flash8 Software Is Working Right?
i've used the tutorial, and it doesn't work right, wondering if there is something wrong with my flash 8 software ????????????? is there a test or something ?

[Flash8]Bubbles Script Not Working
Hello there!

I am creating a game with a colleague of mine, from the university, that takes place underwater.

I have the following code, which i took from http://www.n99creations.com/?pID=use...=Bubble_Cursor (thanx to the creator) and i tried to embody it into the code of the game we are creating:


Code:
onClipEvent (load) {
_root.bubble._xscale=random(30)
_root.bubble._yscale=_root.bubble._xscale
bubblecount=0
xvelocity=Math.random()*2-Math.random()*2
yvelocity=1.02
_root.bubble._alpha=100;

}

onClipEvent (enterFrame) {
function bubbles() {
bubblename = "_root.bubble"+bubblecount;
_root.bubble.duplicateMovieClip(bubblename, bubblecount);
bubblecount++;
}

_root.bubble._x += xvelocity;
_root.bubble._y /= yvelocity;
_root.bubble_alpha--;
if (_root.bubble._alpha<1) {
_root.bubble.removeMovieClip();
}
if (_root.bubble._y>400) {
_root.bubble.removeMovieClip();
}
if (_root.bubble._y<0) {
_root.bubble.removeMovieClip();
}
if (_root.bubble._x>550) {
_root.bubble.removeMovieClip();
}
if (_root.bubble._x<0) {
_root.bubble.removeMovieClip();
}
This code is inside the rest of the code, inside a single mc.

I have taken out the part with the mouse, because i want the bubbles to get out from random places at the bottom, inside the scene. Should i write a initial position?
Although the example works, inside the game it doesn't.

The "bubble" mc is inside the main scene. Only a single bubble is generated

Thanks in advance!

Streaming Audio Not Working In Flash8?
When I import an MP3 into Flash 8 and set it on the timeline to stream, it doesn't play in the SWF and I don't think it even compiles into it when I publish the .FLA

Any thoughts?

FLASH8 - Button Link Not Working.
The button I have to geturl isn't working as I thought it would.


Code:

inv_bttn_eagle.onRelease = function(){

getURL("http://foo.gearsector.com", "_blank");

};



I read this link and a few other after searching. This one seemed most relevant.

http://forums.devshed.com/flash-help-38/geturl-issue-what-is-wrong-434564.html?&highlight=geturl

I cleared the cache on my browser. I also changed the name of the file and uploaded it to see if it had something to do with the server's cache. But still no luck. When I click the button in the browser, it won't respond. But inside flash and it's test movie, works perfectly.

Here is the flash I speak of, located right where the two-headed eagle that acts like a heartbeat has a hit state button over it:
http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=307947902

I am wondering if it's because the script is on my script layer in the last frame. And in that last frame I have a script that says gotoandplay a previous frame. Could this loop be causing my script to only last for one particular frame thus causing my clicks to miss it? The mouse arrow changes to a hand though as if I can click on the button throughout the process. I made sure to give the button an instance name. Maybe I need to set up an event handler as well for that button?

Thanks in advance!

[Flash8] DuplicateMovieClip Not Working Inside A Function
Hi.

I have duplicateMovieClip action inside a fuction and it doesnt work, however it works when placed outside of this function, right where the function is defined, 1st frame.



// WORKS WHEN PLACED HERE image_mc.duplicateMovieClip("newname", this.getNextHighestDepth());

function fadeimage() {
var a:Number = 10;
var l:Number = 0;
var o:Number = 100;
var t:Number = 0;
image_mc.duplicateMovieClip("newname", this.getNextHighestDepth()); // DOESNT WORK HERE
this.onEnterFrame = function() {
if (t == a) {
delete this.onEnterFrame;
setscroll();
} else {
image_mc._alpha = Quart.easeOut(t, l, o, a);
t++;
}
};
}


fadeimage function is triggered when image file has been loaded to image_mc.

what am I doing wrong? please help!

[flash8] For Loop SlideTo Is Not Working As Expected
In the following code, I create 12 buttons, label them, and control their onRollOver, onRollOut, and onRelease actions. Everything is working fine except for the line containing the "slideTo" method. Reading from the two arrays for the x and y values, it appears to be inserting the largest number in each array instead of stepping through all 12 values. Currently, clicking on any of the buttons moves the object (ralphMC) to x=100 and y=800. I am pretty stumped about this, as I've inserted quite a few various numbers into each array during testing. Can anyone tell me what I am doing wrong?

slideTo is part of the mcTween package, in case anyone wanted to know. code follows:


ActionScript Code:
//Creates an array of numbers that will evenly space the buttons out verticallyvar mcPosY:Array = new Array();for(var i = 0; i < 14; i++){    mcPosY[i] = i * 16;}//Creates button labels and the x and y positions of each of 12 cells in the searchAreaContent movieclipbtnLabels = ["Name/Keyword", "Type", "Race/Class", "Professions/Talent", "Faction/Flavor", "Allowed", "Cost/Card No.", "Rules", "Attack", "Health/Defense", "Rarity", "Artist/Set Name"];btnX       = [100, -200, -300, -400, -500, -600, -700, 100, -1000, 100, 100, 100];btnY      = [-100, -600, -200, -100, -100, -800, -100, -300, -100, -400, -100, -800];for(var i = 0; i < btnLabels.length; i++){    var myBtn = attachMovie("sambHolder", "gertrude_"+i, i);    var Xpos = btnX[i];    var Ypos = btnY[i];    this.myBtn.sambBtn.dyTxt.text = btnLabels[i];    this.myBtn._x = 4;    this.myBtn._y = mcPosY[i];        this.myBtn.onRollOver = function():Void{        this.gotoAndStop(2);    }    this.myBtn.onRollOut = function():Void{        this.gotoAndStop(1);    }    this.myBtn.onRelease = function():Void{        _root.searchPanelMC.sacHolderMC.ralphMC.slideTo(Xpos, Ypos, 2, "easeInOutQuad");        trace("x pos= " + _root.searchPanelMC.sacHolderMC.ralphMC._x)        trace("y pos= " + _root.searchPanelMC.sacHolderMC.ralphMC._y)            }}

Flash8-AS: Previous Working Fla's Return Multiple Errors
Hi!
I've just moved from Flash MX to Flash 8.
I've found out that when publishing with Flash 8 my previous MX's working fla files, I get multiple errors.
I've had a look at the Export publishing settings and I think they're all correct:
- Exporting version: 8
- AS Version: 1.0
So, I guess it must be a silly thing I'm doing wrong but after a long while I haven't been able to know what's wrong. Perhaps AS compatibility is not that accurate?

The most common error I get is:
"A ')' or ',' was expected" or
"An unexpected '}' was found"
(I'm using Spanish Flash 8, so I don't know if this is the exact message you're given in English Flash 8)

The 'supposed to be wrong' code seems to be in lines like
code:
posicion = posicion+eval("abc" add i)+gap;
abc=eval("_parent._parent.abc" add _parent.n)

and I even get a "Declaration must be inside a on/onClipEvent controller" here: code: this._xscale=abc*1.4;
While all this code worked perfectly in Flash MX, I get up to 104 errors in Flash 8.

Any help please?
Thank you very much.

Flash8-AS: Previous Working Fla's Return Multiple Errors
Hi!
I've just moved from Flash MX to Flash 8.
I've found out that when publishing with Flash 8 my previous MX's working fla files, I get multiple errors.
I've had a look at the Export publishing settings and I think they're all correct:
- Exporting version: 8
- AS Version: 1.0
So, I guess it must be a silly thing I'm doing wrong but after a long while I haven't been able to know what's wrong. Perhaps AS compatibility is not that accurate?

The most common error I get is:
"A ')' or ',' was expected" or
"An unexpected '}' was found"
(I'm using Spanish Flash 8, so I don't know if this is the exact message you're given in English Flash 8)

The 'supposed to be wrong' code seems to be in lines like

ActionScript Code:
.posicion = posicion+eval("abc" add i)+gap;abc=eval("_parent._parent.abc" add _parent.n)


and I even get a "Declaration must be inside a on/onClipEvent controller" here:
ActionScript Code:
._xscale=abc*1.4;
...while ALL of this code worked perfectly in Flash MX, I get up to 104 errors in Flash 8.

Any help please?
Thank you very much.

[Flash8] Suddenly My Project Went Havoc And Stopped Working By Itself
(Download here http://nord-personal.no/temp/np.rar)

My first and current flash project is located at http://nord-personal.no/
In the background is a XML-based slideshow. In addition to the pictures being loaded, each of these pictures have one or two words associated to it.

The word is supposed to fade in, stay for a second or two, then move and fade out. All this works fine locally, and it was working fine on the internet until one day.

Someone mentioned that I shouldnt use setInterval etc. but im really stuck here. Doesnt help that im totally green on flash either.

Included is the source and related files, I really hope someone can figure out this mess.

(Oh, and sorry for having a bit of a messy flash project)

PHP Vars - Nearly Working...
I'm trying to get some php vars into Flash MX, and it's working - but not if I pull the variable from an array.

Any ideas? I'm sure it's something obvious, but I can't see it...


PHP Code:



<?php
//$name = 'Category One'; // this works in Flash
$name = $categories['categories_name']; // this doesn't work, but prints ok in browser
$vars_for_flash = '&name=' . $name . '&';
echo $vars_for_flash ;
?>

FS "Quit" Command In .swf Not Working In Browser
Hello all.

I've got a flash movie with a FS quit command associated with a button that won't work when the swf is loaded into a html window. It works fine when viewing the swf or the exe alone.

Thoughts anyone?

I'm working with Flash 5.0 on a PC platform.

Flash Vars Not Working...
Hi all,

I am trying to use Flash Vars to pass images, I have this code on the first frame of my timeline


Code:
var a = myVar.slice(0,myVar.indexAt("#")); //the string before the # character
var b = myVar.slice(myVar.indexAt("#")+1,myVar.length); //the string after the # character
randomImageURL = a+(random(6)+1)+b;//random image 1-6
target_mc.loadMovie(randomImageURL);
debugger = FlashVars.indexOf("#")+"/"+FlashVars.length+"="+FlashVars;
The idea is that it should load 1 of 6 random images, the developer wants to just be able to add say 'images/whatevername'5'.jpg' so that they can use the file anywhere. But the Flash Vars aren't working correctly I have been able to get it to work with myURL, but not with the images. This is the code on my HTML file, if anyone could help would be greatly appreciated


Code:
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="745" height="110" id="variable_url" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="heardit_header.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="FlashVars" value="myURL=http://www.apple.com&myVar=images/#.jpg" />
<embed src="heardit_header.swf" quality="high" bgcolor="#ffffff" width="550" height="400" name="variable_url" FlashVars="myURL=http://www.apple.com&myVar=images/#.jpg" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
When I run the file, and look in my activity viewer of my browser I can see the error which is it can't find an image which it is looking for but the directory is all screwed up it is looking for /images/#.jpg4mages/#.jpg really it should be something like images/image4.jpg Any ideas anyone?

Only One Load Vars Not Working
Hi All,

I'm going crazy right now because I have a line of code thats not working in one place in my flash, that's working everywhere else in the flash:

this is what i'm using to load a variable from a cookie:

ActionScript Code:

ActionScript Code:


ActionScript Code:
<font face="Courier New">_root.<font color="#0000ff">loadVariables</font><font color="#000000">("</font><A href="http://www.bagbuilder.net/getsession.php?var="+Math.floor(Math.random()*1000000">http://www.bagbuilder.net/getsession.php?var="+Math.floor(Math.random()*1000000"><font color="#808080"><i>http://www.bagbuilder.net/getsession.php?var="+Math.floor(Math.random()*1000000), "GET");</i></font></font>  





this is the output of the file "getsession.php"

sessionid=12345

i'm trying to call this variable using:


ActionScript Code:

ActionScript Code:


ActionScript Code:
<font face="Courier New">var sessionid = <font color="#0000ff">_root</font>.<font color="#000080">sessionid</font>;</font>





I'm using this code everywhere on the site for different variables i'm pulling in. This is the only time it won't work. I'm really stumped. Anyone have any ideas? I've tried loadVariablesNum and LoadVars. Nothin...


Thanks,
Mat

Flash Vars Not Working...
Hi all,

I am trying to use Flash Vars to pass images, I have this code on the first frame of my timeline


Code:
var a = myVar.slice(0,myVar.indexAt("#")); //the string before the # character
var b = myVar.slice(myVar.indexAt("#")+1,myVar.length); //the string after the # character
randomImageURL = a+(random(6)+1)+b;//random image 1-6
target_mc.loadMovie(randomImageURL);
debugger = FlashVars.indexOf("#")+"/"+FlashVars.length+"="+FlashVars;
The idea is that it should load 1 of 6 random images, the developer wants to just be able to add say 'images/whatevername'5'.jpg' so that they can use the file anywhere. But the Flash Vars aren't working correctly I have been able to get it to work with myURL, but not with the images. This is the code on my HTML file, if anyone could help would be greatly appreciated


Code:
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="745" height="110" id="variable_url" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="heardit_header.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="FlashVars" value="myURL=http://www.apple.com&myVar=images/#.jpg" />
<embed src="heardit_header.swf" quality="high" bgcolor="#ffffff" width="550" height="400" name="variable_url" FlashVars="myURL=http://www.apple.com&myVar=images/#.jpg" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
When I run the file, and look in my activity viewer of my browser I can see the error which is it can't find an image which it is looking for but the directory is all screwed up it is looking for /images/#.jpg4mages/#.jpg really it should be something like images/image4.jpg Any ideas anyone?

Flash Vars Not Working...
Hi all,

I am trying to use Flash Vars to pass images, I have this code on the first frame of my timeline


Code:
var a = myVar.slice(0,myVar.indexAt("#")); //the string before the # character
var b = myVar.slice(myVar.indexAt("#")+1,myVar.length); //the string after the # character
randomImageURL = a+(random(6)+1)+b;//random image 1-6
target_mc.loadMovie(randomImageURL);
debugger = FlashVars.indexOf("#")+"/"+FlashVars.length+"="+FlashVars;
The idea is that it should load 1 of 6 random images, the developer wants to just be able to add say 'images/whatevername'5'.jpg' so that they can use the file anywhere. But the Flash Vars aren't working correctly I have been able to get it to work with myURL, but not with the images. This is the code on my HTML file, if anyone could help would be greatly appreciated


Code:
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="745" height="110" id="variable_url" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="heardit_header.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="FlashVars" value="myURL=http://www.apple.com&myVar=images/#.jpg" />
<embed src="heardit_header.swf" quality="high" bgcolor="#ffffff" width="550" height="400" name="variable_url" FlashVars="myURL=http://www.apple.com&myVar=images/#.jpg" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
When I run the file, and look in my activity viewer of my browser I can see the error which is it can't find an image which it is looking for but the directory is all screwed up it is looking for /images/#.jpg4mages/#.jpg really it should be something like images/image4.jpg Any ideas anyone?

Flash Vars Not Working...
Hi all,

I am trying to use Flash Vars to pass images, I have this code on the first frame of my timeline


Code:


var a = myVar.slice(0,myVar.indexAt("#")); //the string before the # character
var b = myVar.slice(myVar.indexAt("#")+1,myVar.length); //the string after the # character
randomImageURL = a+(random(6)+1)+b;//random image 1-6
target_mc.loadMovie(randomImageURL);
debugger = FlashVars.indexOf("#")+"/"+FlashVars.length+"="+FlashVars;



The idea is that it should load 1 of 6 random images, the developer wants to just be able to add say 'images/whatevername'5'.jpg' so that they can use the file anywhere. But the Flash Vars aren't working correctly I have been able to get it to work with myURL, but not with the images. This is the code on my HTML file, if anyone could help would be greatly appreciated


Code:


<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="745" height="110" id="variable_url" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="heardit_header.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="FlashVars" value="myURL=http://www.apple.com&myVar=images/#.jpg" />
<embed src="heardit_header.swf" quality="high" bgcolor="#ffffff" width="550" height="400" name="variable_url" FlashVars="myURL=http://www.apple.com&myVar=images/#.jpg" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>



When I run the file, and look in my activity viewer of my browser I can see the error which is it can't find an image which it is looking for but the directory is all screwed up it is looking for /images/#.jpg4mages/#.jpg really it should be something like images/image4.jpg Any ideas anyone?

[F8] Working With Sound / Exporting In .mov
Okay, the Flash swf file is fine, has sound and everything, but when I publish it as a .mov file- no sound. How can I fix this?

Also, right now I'm just putting in sound directly from library to stage, each track on it's own seperate layer. Is there any better way to work with sound files in Flash?

Exporting SWF To Animated GIF Not Working
Hello,

I'm trying to export a swf (which I did not create) as an animated gif, but when I do this only the first frame shows up. I see in the forum others have asked this same question but I didn't see an answer that applied (I believe these are timeline animated .fla files although how do I know that or ascertain that?)

I'd really appreciate the help...

Thanks!

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