A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: strings maybe?

  1. #1
    God yeps's Avatar
    Join Date
    Dec 2005
    Location
    :noitacoL
    Posts
    660

    strings maybe?

    hey every body... im working with a picture viewer... and like what i want to happen when you click one of the pictures is for it to load the same picture number from a different source...

    so what i have now is when you press one of the pics, it traces which pic it is.... for example

    Code:
    _level0.images.pic15.pic
    or
    Code:
    _level0.images.pic2.pic
    now i just need the part where it says pic# so i thought i would try to rid it from every thing else but that part...

    here is my feeble attempt

    Code:
    trace(this.pic.substring(16, myLOC.length-4))
    but its not working for some reason... do i have to make this.pic a string before this is done or something?

    thank you for any responses...

  2. #2
    Total Universe Mod jAQUAN's Avatar
    Join Date
    Jul 2000
    Location
    Honolulu
    Posts
    2,429
    assuming that is the result for:
    Code:
    trace(this);
    you should try:
    Code:
    trace(this._parent.name);
    Last edited by jAQUAN; 10-29-2006 at 02:37 AM.

  3. #3
    God yeps's Avatar
    Join Date
    Dec 2005
    Location
    :noitacoL
    Posts
    660
    it was on the main time line... so i changed it to _root... but its still comming up undefined

    would i have to identify this.pic as a string or something?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center