PDA

View Full Version : flash actions in loaded text


Billy T
02-28-2002, 12:36 AM
Hey all

I have some text that I have loaded into flash and I have managed to make html a href links in this text and they work fine.

I was wondering if there was a way to make bits of this text perform flash actions such as load movie?

eg

<a href="loadMovie("hi.swf", 1)">Click here</a>

is this possible?

Thanks in advance

Billy T
02-28-2002, 01:57 AM
think I found the answer to my question - you can only trigger flash functions via html links.

So anyway I have decided to use a javascript popup window instead. I have the javascript in the head of the html for my main movie. My main movie loads external swfs into itself. The external swfs have a dynamic text box which has html text loaded into it.

I want to trigger the javascript in the head of my main movie html from the html text being loaded into the external files - anyone know how I can do this?

Thanks

nic
02-28-2002, 07:27 AM
Interesting prob Billy, maybe you can go:

getURL ("myVar");

and then in the text file:

&myVar="%22javascript:document.doSomethingNowPlease.whatev er%28%29%3B%22"&

Dunno if this would work, I have thrown in a couple of special chars, from: http://www.macromedia.com/support/flash/ts/documents/url_encoding.htm instead of using "javascript:document.doSomethingNowPlease.whatever( );"

Hope this enhances your possibilities...

Billy T
02-28-2002, 08:02 AM
thanks for the suggestion nic

unfortunately I cant use get url or anything because the link has to be within the html text and not within flash.

I think I could do it with a flash popup function but I only have a movieclip prototype popup and I couldnt seem to turn this into a function...

I shall persist

cheers

Billy T
02-28-2002, 08:35 AM
ok go it sorted

used this javascript in the head of my main page html

<script>
function PopUp(PopUpUrl){
var ScreenWidth=window.screen.width;
var ScreenHeight=window.screen.height;
var movefromedge=0;
placementx=(ScreenWidth/2)-((400)/2);
placementy=(ScreenHeight/2)-((300+50)/2);

WinPop=window.open(PopUpUrl,"","width=400,height=300,toolbar=0,location=0,director ies=0,status=0,scrollbars=0,menubar=0,resizable=0, left="+placementx+",top="+placementy+",screenX="+placementx+",screenY="+placementy+",");
}
</script>


and then in the external text file I put

Click <a href="javascript:PopUp('http://www.tableau.com.au')">"here"</a> to see ...

and it works :p

weird because that's exactly what I did earlier with a different javascript and it didnt work but oh well...


cheers

nic
02-28-2002, 11:10 PM
Nice one Billy!

That's going in my archive. Code, sweet code...


A question Billy (3D Mac man): is it possible to get high speed RAM to match the new Mac twin processors?

Oh yeah, & how about Photoshop (6 or 7) on OSX? Is that happening yet?

Billy T
02-28-2002, 11:43 PM
Hey nic

my dual processor (450) just takes PC133 ram. Not sure about the brand new macs but my friend did just but a new pc which came with some new ram that is meant to be double the speed of pc133.

Not sure about photoshop and osx either sorry - check out adobe.com. OSX scares me - looks pretty but I've got no idea where anything is (extensions etc)!! I did use it when I was rendering my filmclip though. OS9 would run out of memory and crash all the time - OSX was rock solid.

cheers

nic
03-01-2002, 12:38 AM
Cheers Billy!

OS 8.6 all the way!

Ricod
03-01-2002, 08:50 AM
Well Billy you're friends outta luck too, cuz the new chipset coming this period will allow RAM over 466 mHz :), almost double the standar 266 we have now ... where will this end ...
Thing is, I'd rater they made things more stable then just faster.

Billy T
03-01-2002, 09:03 AM
Originally posted by Ricod
Well Billy you're friends outta luck too, cuz the new chipset coming this period will allow RAM over 466 mHz :)

good - serves him right for buying a PC hehe ;)

just kidding

don't want to start any platform wars here ...

Ricod
03-01-2002, 09:28 AM
That's it ! I'm getting that "y" removed right now !

nic
03-03-2002, 05:39 AM
quote:
--------------------------------------------------------------------------------
Originally posted by Ricod
Well Billy you're friends outta luck too, cuz the new chipset coming this period will allow RAM over 466 mHz
--------------------------------------------------------------------------------



good - serves him right for buying a PC hehe

just kidding

don't want to start any platform wars here ...


>> Me's ain't no PC boy, of that you can be assured!

...just a bit tender about getting a new one...

gdeleon101
04-11-2002, 03:17 AM
I used this code in Flash MX and it worked for me, the only problem i have is being able to tell the function where to target (e.g. level or target).

Try this in your dynamic text box.

<a href='asfunction:loadmovie,YOUMOVIENAME.swf'>link</a>

What happens, is that it loads over the movie that is currently showing. Great for links. What I have is a main movie with navigation buttons that link to small swf's (movies). Inside these small movies, I have dynamic text boxes that point to .txt files. It is inside the txt file that i put this code. So now you don't have to just link to html pages outside of your movie! I just keep loading more movies (content)

Peace,

G

Billy T
04-11-2002, 03:28 AM
nice one!

Thanks